:root {
    --tracker-header-height: 70px;
    --ink: #172421;
    --paper: #f2f0e8;
    --panel: #fbfaf4;
    --line: #b9beb1;
    --moss: #315b45;
    --moss-dark: #152f27;
    --signal: #e8b647;
    --danger: #bd382f;
    --muted: #66716c;
    --shadow: 0 18px 42px rgba(21, 35, 31, 0.16);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background-color: #dfe3d9;
    background-image:
        linear-gradient(rgba(45, 74, 61, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 74, 61, 0.06) 1px, transparent 1px),
        linear-gradient(145deg, #eef0e7 0%, #d7ddd2 58%, #c7d0c5 100%);
    background-size: 28px 28px, 28px 28px, auto;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 18px;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tracker-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    align-items: center;
    min-height: var(--tracker-header-height);
    padding: 10px clamp(14px, 3vw, 34px);
    color: #f5f2e8;
    background: rgba(17, 42, 34, 0.96);
    border-bottom: 3px solid var(--signal);
    box-shadow: 0 7px 24px rgba(12, 29, 24, 0.28);
}

.home-link {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-right: 14px;
    color: #f5f2e8;
    text-decoration: none;
    border: 1px solid #567566;
    background: #203e34;
}

.title-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tracker-kicker,
.eyebrow,
.alarm-code {
    color: var(--signal);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tracker-title {
    overflow: hidden;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-status {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 0 18px;
    color: #cedbd3;
    border-left: 1px solid #49675a;
}

.header-status strong {
    color: var(--signal);
    font-family: 'Chakra Petch', sans-serif;
}

.header-actions {
    position: relative;
    display: flex;
    gap: 7px;
}

.header-actions > button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-height: 36px;
    padding: 0;
    color: #f5f2e8;
    border: 1px solid #627c70;
    background: #24473a;
    font-size: 1.15rem;
}

.options-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 35;
    width: 250px;
    padding: 8px;
    color: #eaf1ec;
    border: 1px solid #557065;
    background: rgba(15, 35, 29, 0.98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.options-menu-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 8px 11px;
    border-bottom: 1px solid #40594e;
}

.options-menu-heading strong {
    font-family: 'Chakra Petch', sans-serif;
}

.options-menu-heading span {
    overflow: hidden;
    color: #9eb2a8;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.options-menu > button {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    color: #edf4ef;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #334d42;
    background: transparent;
}

.options-menu > button:hover,
.options-menu > button:focus-visible {
    background: #294b3e;
}

.options-menu > button:last-child {
    color: #f0b4ae;
    border-bottom: 0;
}

main {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 0;
}

.screen {
    min-height: calc(100dvh - var(--tracker-header-height));
    overflow: hidden;
    border: 0;
    background: transparent;
}

.screen[hidden] {
    display: none;
}

.setup-screen {
    position: relative;
    display: flex;
    justify-content: flex-end;
    min-height: calc(100dvh - var(--tracker-header-height));
    background: transparent;
}

.vantage-orbit-scene {
    position: fixed;
    z-index: 0;
    inset: var(--tracker-header-height) 0 0;
    background: #03080d;
}

.vantage-orbit-scene canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.setup-screen .workspace-panel {
    position: relative;
    z-index: 2;
    width: min(660px, 58%);
    margin: 34px;
    align-self: center;
    border: 1px solid rgba(209, 220, 212, 0.52);
    background: rgba(247, 248, 242, 0.76);
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.workspace-panel,
.stage-main,
.active-turn-panel,
.turn-order-panel {
    padding: clamp(24px, 4vw, 48px);
}

.screen-heading h1,
.stage-aside h1,
.active-turn-panel h1 {
    margin: 6px 0 8px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: 0;
}

.screen-heading p,
.stage-aside p,
.dialog-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.game-name-field {
    display: grid;
    gap: 6px;
    margin: 28px 0 24px;
    color: #3f4c46;
    font-weight: 700;
}

.game-name-field small {
    margin-left: 5px;
    color: #7c8580;
    font-weight: 500;
}

input,
select {
    min-width: 0;
    min-height: 43px;
    padding: 8px 10px;
    color: var(--ink);
    border: 1px solid #9ca9a0;
    border-radius: 0;
    background: #fff;
}

input:focus,
select:focus,
button:focus-visible {
    outline: 3px solid rgba(232, 182, 71, 0.55);
    outline-offset: 2px;
}

.character-select.has-character {
    color: var(--character-color);
    border-color: color-mix(in srgb, var(--character-color), #172421 34%);
    background: #fff;
    font-weight: 700;
}

.character-select.has-light-character {
    color: #a47b00;
}

.setup-table-heading,
.player-row {
    display: grid;
    grid-template-columns: 48px 68px minmax(120px, 0.8fr) minmax(230px, 1.35fr) 38px;
    align-items: center;
    gap: 9px;
}

.setup-table-heading {
    padding: 0 7px 7px;
    color: #68736d;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.player-rows {
    display: grid;
    gap: 8px;
}

.player-row {
    padding: 8px;
    border-left: 6px solid var(--player-color, #89938c);
    background: rgba(237, 240, 233, 0.46);
}

.start-player-control,
.organizer-control {
    display: grid;
    place-items: center;
    height: 43px;
    cursor: pointer;
}

.start-player-control input,
.organizer-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.start-player-control > span[aria-hidden] {
    width: 25px;
    height: 25px;
    border: 2px solid #768179;
    border-radius: 50%;
    background: #fff;
}

.start-player-control input:checked + span {
    border: 7px solid var(--moss);
    box-shadow: 0 0 0 3px rgba(49, 91, 69, 0.18);
}

.organizer-control > span[aria-hidden] {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    color: #7d877f;
    border: 2px solid #939d96;
    border-radius: 50%;
    background: #fff;
    font-size: 0.78rem;
}

.organizer-control input:checked + span {
    color: #4f3b08;
    border-color: #d0a12d;
    background: #f2c653;
    box-shadow: 0 0 0 3px rgba(208, 161, 45, 0.2);
}

.organizer-control input:disabled + span {
    cursor: not-allowed;
    opacity: 0.55;
}

.remove-player {
    width: 36px;
    height: 36px;
    padding: 0;
    color: #77443f;
    border: 1px solid #c8aaa6;
    background: #f7eae7;
    font-size: 1.2rem;
}

.panel-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.split-actions {
    justify-content: space-between;
}

.button-primary,
.button-secondary,
.button-danger,
.end-turn-button {
    min-height: 46px;
    padding: 9px 18px;
    border: 1px solid transparent;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
}

.button-primary {
    color: #fff;
    background: var(--moss);
    border-color: var(--moss-dark);
}

.button-secondary {
    color: #27352f;
    background: #e8ebe4;
    border-color: #a4aea6;
}

.button-danger {
    color: #fff;
    background: var(--danger);
    border-color: #82241e;
}

.form-error {
    min-height: 1.25em;
    margin: 10px 0 0;
    color: #a32a24;
    font-weight: 700;
    text-align: right;
}

.stage-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.65fr) minmax(500px, 1.35fr);
    min-height: 650px;
}

.emergency-layout {
    grid-template-columns: 1fr;
    min-height: 0;
}

.emergency-layout .stage-main {
    width: min(580px, calc(100% - 68px));
    padding: 22px;
    justify-self: end;
}

.emergency-layout .section-title-row {
    padding-bottom: 10px;
}

.emergency-layout .assignment-list {
    gap: 6px;
    margin-top: 12px;
}

.emergency-layout .assignment-row {
    padding: 8px 10px;
}

.emergency-layout .panel-actions {
    margin-top: 16px;
}

.landing-layout {
    grid-template-columns: 1fr;
    min-height: 0;
}

.landing-layout .stage-main {
    width: min(520px, calc(100% - 68px));
    padding: 22px;
    justify-self: end;
}

.landing-layout .section-title-row {
    padding-bottom: 10px;
}

.landing-layout .landing-pod-list {
    gap: 6px;
    margin-top: 12px;
}

.landing-layout .pod-card {
    padding: 9px 11px;
}

.landing-layout .pod-card-heading {
    margin-bottom: 0;
}

.landing-layout .panel-actions {
    margin-top: 16px;
}

.stage-main {
    margin: 34px;
    align-self: center;
    border: 1px solid rgba(209, 220, 212, 0.52);
    background: rgba(247, 248, 242, 0.72);
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.stage-aside {
    position: relative;
    padding: clamp(30px, 5vw, 62px);
    color: #fff;
    overflow: hidden;
}

.stage-aside p {
    color: rgba(255, 255, 255, 0.78);
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 2px solid #c5cbc2;
}

.section-title-row h2,
.section-title-row h1,
.dialog-heading h2 {
    margin: 4px 0 0;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0;
}

.completion-count {
    color: var(--muted);
    white-space: nowrap;
}

.assignment-list,
.landing-pod-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.assignment-row {
    display: grid;
    grid-template-columns: 12px minmax(150px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #c1c8bf;
    background: rgba(242, 243, 237, 0.34);
}

.character-stripe {
    align-self: stretch;
    background: var(--player-color);
}

.assignment-person strong,
.assignment-person span {
    display: block;
}

.assignment-person span {
    color: var(--muted);
    font-size: 0.88rem;
}

.pod-card {
    padding: 16px;
    border: 1px solid #b7c1b8;
    border-left: 7px solid var(--signal);
    background: rgba(237, 241, 233, 0.34);
}

.pod-card-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pod-card-heading strong {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.15rem;
}

.pod-crew {
    color: var(--muted);
    font-size: 0.9rem;
}

.turn-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: 650px;
}

.turn-order-panel {
    color: #f3f4ed;
    background: linear-gradient(160deg, rgba(24, 54, 44, 0.54), rgba(16, 36, 30, 0.48));
    backdrop-filter: blur(8px);
}

.turn-order-panel .section-title-row {
    border-color: #456054;
}

.turn-order-panel h2 {
    color: #fff;
}

.turn-order {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.turn-order-item {
    display: grid;
    grid-template-columns: 32px 9px 1fr;
    align-items: center;
    gap: 10px;
    padding: 11px;
    color: #c9d6cf;
    border: 1px solid #385548;
    background: rgba(255, 255, 255, 0.025);
}

.turn-order-item.is-active {
    color: #fff;
    border-color: var(--signal);
    background: rgba(232, 182, 71, 0.1);
}

.turn-order-position {
    color: #8da095;
    font-family: 'Chakra Petch', sans-serif;
}

.turn-order-color {
    align-self: stretch;
    background: var(--player-color);
}

.turn-order-person strong,
.turn-order-person span {
    display: block;
}

.turn-order-person span {
    color: #91a49a;
    font-size: 0.8rem;
}

.active-turn-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    width: min(680px, calc(100% - 68px));
    min-height: 520px;
    padding: 32px;
    justify-self: end;
    align-self: center;
    margin: 34px;
    border: 1px solid rgba(209, 220, 212, 0.52);
    background: rgba(247, 248, 242, 0.72);
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(10px);
}

.active-turn-panel::before {
    content: '';
    position: absolute;
    inset: 22px;
    pointer-events: none;
    border: 1px solid #d1d4cb;
}

.active-character-mark {
    position: relative;
    width: 82px;
    height: 82px;
    margin: 18px 0 4px;
    border: 8px solid var(--active-color, var(--moss));
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 6px rgba(39, 64, 53, 0.1);
}

.active-character-mark::after {
    content: '';
    position: absolute;
    inset: 19px;
    border: 3px solid var(--active-color, var(--moss));
    transform: rotate(45deg);
}

.active-turn-panel h1 {
    position: relative;
    margin-top: 13px;
    font-size: clamp(2.5rem, 6vw, 4.6rem);
}

.active-character-name {
    position: relative;
    margin: 0;
    color: var(--moss);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.active-meta {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    width: min(460px, 100%);
    margin: 24px 0;
    border-block: 1px solid #c4cbc2;
}

.active-meta span {
    display: grid;
    gap: 3px;
    padding: 13px;
    border-right: 1px solid #c4cbc2;
}

.active-meta span:last-child {
    border-right: 0;
}

.active-meta small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.active-meta strong {
    overflow-wrap: anywhere;
    font-family: 'Chakra Petch', sans-serif;
}

.end-turn-button {
    position: relative;
    min-width: 220px;
    min-height: 54px;
    color: #fff;
    border-color: #173b2e;
    background: var(--moss);
    font-size: 1.1rem;
}

.turn-utilities {
    position: relative;
    display: flex;
    gap: 18px;
    margin-top: 20px;
}

.turn-utilities button {
    padding: 5px 0;
    color: #5d6963;
    border: 0;
    border-bottom: 1px solid #9aa49e;
    background: transparent;
    font-size: 0.86rem;
}

.music-track-widget {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 12;
    width: min(290px, calc(100vw - 28px));
    padding: 5px 8px;
    color: #dceaf3;
    border: 1px solid #344c5d;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(29, 47, 60, 0.92), rgba(14, 25, 34, 0.94));
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    font-size: 0.78rem;
    line-height: 1.15;
}

.music-track-widget[data-can-advance-track="1"] {
    cursor: pointer;
}

.music-track-widget[data-can-advance-track="1"]:hover,
.music-track-widget[data-can-advance-track="1"]:focus-visible {
    border-color: #5f7f95;
    background: linear-gradient(180deg, rgba(36, 57, 72, 0.95), rgba(17, 31, 42, 0.96));
}

.music-track-widget-label {
    display: block;
    margin-bottom: 2px;
    color: #91aabc;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.music-track-widget-value {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-width: 0;
    min-height: 18px;
    padding-left: 25px;
    column-gap: 10px;
    color: #f2d38a;
    font-weight: 700;
    line-height: 18px;
}

.music-track-widget-play {
    position: absolute;
    top: 50%;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    color: #dceaf3;
    border: 1px solid #4c6a80;
    border-radius: 50%;
    appearance: none;
    background: linear-gradient(180deg, #223849, #162735);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
}

.music-track-widget-play::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    margin-left: 1px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid currentColor;
}

.music-track-widget-play[data-state="pause"]::before {
    width: 7px;
    height: 8px;
    margin-left: 0;
    border: 0;
    background: linear-gradient(90deg, currentColor 0 2.5px, transparent 2.5px 4.5px, currentColor 4.5px 7px);
}

.music-track-widget-play:hover:not(:disabled),
.music-track-widget-play:focus-visible {
    color: #fff;
    border-color: #7fa3bc;
}

.music-track-widget-play:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.music-track-widget-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-track-widget-time {
    margin-left: auto;
    color: #c8d7e1;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.view-player .music-track-widget {
    display: none;
}

.emergency-share-qr {
    position: fixed;
    left: 14px;
    bottom: 67px;
    z-index: 12;
    display: grid;
    width: 190px;
    padding: 8px;
    color: #dceaf3;
    text-align: center;
    border: 1px solid #344c5d;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(29, 47, 60, 0.9), rgba(14, 25, 34, 0.92));
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    font-size: 0.72rem;
}

.emergency-share-qr[hidden] {
    display: none;
}

.emergency-share-qr-label {
    margin-bottom: 6px;
    color: #f2d38a;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.emergency-share-qr img {
    display: block;
    width: 172px;
    height: 172px;
    margin-bottom: 6px;
    background: #fff;
}

body.view-player .emergency-share-qr {
    display: none;
}

.device-player-dialog {
    width: min(520px, calc(100% - 24px));
    padding: 0;
    color: var(--ink);
    border: 1px solid #718178;
    border-radius: 0;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(7, 21, 16, 0.4);
}

.confirmation-dialog {
    width: min(460px, calc(100% - 24px));
    padding: 0;
    color: var(--ink);
    border: 1px solid #8c6d68;
    border-radius: 0;
    background: rgba(250, 249, 243, 0.97);
    box-shadow: 0 24px 70px rgba(7, 21, 16, 0.48);
}

.confirmation-dialog::backdrop {
    background: rgba(8, 20, 16, 0.76);
    backdrop-filter: blur(3px);
}

.confirmation-dialog form {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 26px;
}

.confirmation-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #fff;
    border: 1px solid #8b2922;
    background: var(--danger);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.confirmation-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.confirmation-actions button {
    width: 100%;
}

.share-game-dialog {
    width: min(390px, calc(100% - 24px));
    padding: 26px;
    color: var(--ink);
    text-align: center;
    border: 1px solid #718178;
    border-radius: 0;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(7, 21, 16, 0.4);
}

.share-game-dialog::backdrop {
    background: rgba(10, 27, 21, 0.72);
}

.share-game-dialog img {
    display: block;
    width: min(260px, 100%);
    aspect-ratio: 1;
    margin: 22px auto;
    border: 1px solid #cad1ca;
    background: #fff;
}

.share-game-dialog > button {
    width: 100%;
    margin-top: 8px;
}

.device-player-dialog::backdrop {
    background: rgba(10, 27, 21, 0.72);
}

.device-player-dialog form {
    padding: 26px;
}

.device-player-options {
    display: grid;
    gap: 8px;
    margin: 22px 0;
}

.device-player-option {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 12px;
    padding: 12px;
    text-align: left;
    border: 1px solid #b4beb5;
    background: #edf0e9;
}

.device-player-option span:first-child {
    background: var(--player-color, var(--moss));
}

.device-player-option strong,
.device-player-option small {
    display: block;
}

.device-player-option small {
    color: var(--muted);
}

.dialog-close {
    width: 100%;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    max-width: min(360px, calc(100% - 36px));
    padding: 12px 16px;
    color: #fff;
    background: #173b2e;
    border-left: 4px solid var(--signal);
    box-shadow: var(--shadow);
}

@media (max-width: 820px) {
    body {
        font-size: 17px;
    }

    .tracker-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .header-status {
        display: none;
    }

    .stage-layout,
    .turn-layout {
        grid-template-columns: 1fr;
    }

    .setup-screen {
        min-height: calc(100dvh - var(--tracker-header-height));
    }

    .setup-screen .workspace-panel {
        width: calc(100% - 28px);
        margin: 210px 14px 14px;
        align-self: flex-start;
        background: rgba(247, 248, 242, 0.8);
    }

    .workspace-panel,
    .stage-main,
    .active-turn-panel,
    .turn-order-panel {
        padding: 24px 18px;
    }

    .stage-layout,
    .turn-layout {
        min-height: 0;
    }

    .landing-layout .stage-main {
        margin-top: 220px;
    }

    .stage-aside {
        min-height: 210px;
        padding: 28px 22px;
    }

    .turn-order-panel {
        order: 2;
    }

    .active-turn-panel {
        width: calc(100% - 68px);
        min-height: 480px;
        padding: 24px 18px;
        justify-self: stretch;
    }

    body.view-player .stage-aside {
        min-height: 150px;
    }

    body.view-player .stage-main,
    body.view-player .active-turn-panel {
        background: rgba(247, 248, 242, 0.76);
    }

    .music-track-widget {
        display: none;
    }

    .emergency-share-qr {
        display: none;
    }
}

@media (max-width: 560px) {
    .tracker-kicker {
        display: none;
    }

    .tracker-title {
        font-size: 1rem;
    }

    .home-link {
        margin-right: 8px;
    }

    .setup-table-heading {
        display: none;
    }

    .player-row {
        grid-template-columns: 42px 42px minmax(0, 1fr) 36px;
    }

    .character-select {
        grid-column: 3 / 5;
    }

    .remove-player {
        grid-column: 4;
        grid-row: 1;
    }

    .panel-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .split-actions {
        flex-direction: column-reverse;
    }

    .assignment-row {
        grid-template-columns: 9px 1fr;
    }

    .assignment-row select {
        grid-column: 2;
    }

    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .active-meta {
        grid-template-columns: 1fr;
        width: min(310px, 100%);
    }

    .active-meta span {
        border-right: 0;
        border-bottom: 1px solid #c4cbc2;
    }

    .active-meta span:last-child {
        border-bottom: 0;
    }

    .confirmation-dialog form {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 20px;
    }

    .confirmation-icon {
        width: 40px;
        height: 40px;
    }
}