/* Demonic Perks planner */
body.reason-theme .reason-content.demonic-perks-page {
    z-index: 2;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    color: #f5eadb;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body.reason-theme .demonic-perks-page button,
body.reason-theme .demonic-perks-page input {
    font-family: inherit;
}

body.reason-theme .demonic-perks-app {
    --perk-panel: rgba(27, 22, 18, 0.94);
    --perk-panel-deep: rgba(12, 9, 8, 0.97);
    --perk-border: rgba(222, 180, 111, 0.24);
    --perk-gold: #fae17d;
    --perk-orange: #e06b3b;
    --perk-red: #bd2630;
    --perk-green: #43d27b;
    --perk-muted: #b9aa9a;
    position: relative;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    background: #17130f;
}

body.reason-theme .demonic-perks-toolbar {
    position: sticky;
    top: 0;
    z-index: 42;
    display: flex;
    min-width: 0;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 3vw, 44px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 4px solid #6e5e50;
    background:
        radial-gradient(circle at 16% 0, rgba(174, 47, 38, 0.18), transparent 24rem),
        linear-gradient(180deg, #2e2822 0%, #241f1a 100%);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

body.reason-theme .demonic-perks-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

body.reason-theme .demonic-perks-brand-icon {
    display: block;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border: 1px solid rgba(250, 225, 125, 0.32);
    border-radius: 12px;
    object-fit: contain;
    background: rgba(7, 5, 4, 0.45);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38), 0 0 20px rgba(190, 38, 44, 0.2);
}

body.reason-theme .demonic-perks-eyebrow,
body.reason-theme .demonic-perks-panel-kicker {
    display: block;
    margin: 0 0 3px;
    color: #df8f67;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.reason-theme .demonic-perks-brand h1 {
    margin: 0;
    color: #fff7e9;
    font-family: "Spectral SC", Georgia, serif;
    font-size: clamp(25px, 2.5vw, 38px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 2px 0 #000, 0 0 18px rgba(224, 107, 59, 0.2);
}

body.reason-theme .demonic-perks-brand p {
    max-width: 650px;
    margin: 5px 0 0;
    color: #cbbcaf;
    font-size: 12px;
    line-height: 1.35;
}

body.reason-theme .demonic-perks-toolbar-actions {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

body.reason-theme .demonic-perks-count {
    display: grid;
    min-width: 110px;
    min-height: 54px;
    align-content: center;
    justify-items: center;
    padding: 5px 14px;
    border: 1px solid rgba(250, 225, 125, 0.2);
    border-radius: 8px;
    color: #d7c9b9;
    background: rgba(8, 6, 5, 0.42);
    line-height: 1;
}

body.reason-theme .demonic-perks-count strong {
    color: var(--perk-gold);
    font-family: "Spectral SC", Georgia, serif;
    font-size: 25px;
    line-height: 1;
}

body.reason-theme .demonic-perks-count span {
    margin-top: 3px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.reason-theme .demonic-perks-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid rgba(232, 113, 71, 0.42);
    border-radius: 7px;
    color: #fff1df;
    background: linear-gradient(180deg, rgba(108, 32, 27, 0.98), rgba(48, 16, 15, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.22);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

body.reason-theme .demonic-perks-action:hover {
    border-color: rgba(250, 225, 125, 0.64);
    background: linear-gradient(180deg, rgba(144, 43, 34, 0.98), rgba(65, 20, 18, 0.98));
    transform: translateY(-1px);
}

body.reason-theme .demonic-perks-action:focus-visible,
body.reason-theme .demonic-perks-zoom-controls button:focus-visible,
body.reason-theme .demonic-perk-node:focus-visible,
body.reason-theme .demonic-perks-canvas:focus-visible {
    outline: 3px solid #8ee6ff;
    outline-offset: 3px;
}

body.reason-theme .demonic-perks-layout {
    position: relative;
    display: grid;
    grid-template-areas: "map";
    min-width: 0;
    background: #4a4034;
}

body.reason-theme .demonic-perks-map-panel {
    grid-area: map;
    min-width: 0;
}

body.reason-theme .demonic-perks-canvas {
    position: relative;
    width: 100%;
    height: 760px;
    height: clamp(680px, calc(100vh - 224px), 860px);
    min-width: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    user-select: none;
    background-color: #4a4034;
    background-image: radial-gradient(circle, rgba(231, 211, 184, 0.24) 1.2px, transparent 1.3px);
    background-position: 0 0;
    background-size: 23px 23px;
    box-shadow: inset 0 22px 42px rgba(0, 0, 0, 0.24), inset 0 -22px 42px rgba(0, 0, 0, 0.25);
}

body.reason-theme .demonic-perks-canvas.is-panning {
    cursor: grabbing;
}

body.reason-theme .demonic-perks-world {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

body.reason-theme .demonic-perks-edges,
body.reason-theme .demonic-perks-nodes {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

body.reason-theme .demonic-perks-edges {
    z-index: 1;
    overflow: visible;
    pointer-events: none;
}

body.reason-theme .demonic-perks-edges line {
    stroke: rgba(12, 10, 8, 0.9);
    stroke-width: 1;
    transition: stroke 130ms ease, stroke-width 130ms ease;
}

body.reason-theme .demonic-perks-edges line.is-partial {
    stroke: #bd2630;
    stroke-width: 2;
}

body.reason-theme .demonic-perks-edges line.is-selected {
    stroke: var(--perk-gold);
    stroke-width: 3;
    filter: drop-shadow(0 0 3px rgba(250, 225, 125, 0.48));
}

body.reason-theme .demonic-perks-edges line.is-preview {
    stroke: var(--perk-green);
    stroke-width: 3;
    filter: drop-shadow(0 0 4px rgba(67, 210, 123, 0.66));
}

body.reason-theme .demonic-perks-nodes {
    z-index: 2;
    pointer-events: none;
}

body.reason-theme .demonic-perk-node {
    --node-size: 45px;
    position: absolute;
    display: grid;
    width: var(--node-size);
    height: var(--node-size);
    min-width: 0;
    min-height: 0;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    box-shadow: none;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    isolation: isolate;
    opacity: 0.88;
    transition: opacity 140ms ease, filter 140ms ease;
}

body.reason-theme .demonic-perk-node.is-minor {
    --node-size: 30px;
}

body.reason-theme .demonic-perk-node.is-master {
    --node-size: 60px;
}

body.reason-theme .demonic-perk-node.is-root {
    --node-size: 45px;
}

body.reason-theme .demonic-perk-node::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

body.reason-theme .demonic-perk-node::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("../img/demonic-perks/frames/standard-locked.png") center / contain no-repeat;
    filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.52));
    pointer-events: none;
}

body.reason-theme .demonic-perk-node::after {
    display: none;
}

body.reason-theme .demonic-perk-node[data-frame="capstone"]::before {
    background-image: url("../img/demonic-perks/frames/capstone-locked.png");
}

body.reason-theme .demonic-perk-node img {
    position: relative;
    z-index: 2;
    display: block;
    width: 66.666%;
    height: 66.666%;
    object-fit: contain;
    image-rendering: pixelated;
    pointer-events: none;
}

body.reason-theme .demonic-perk-node.is-minor img {
    width: 50%;
    height: 50%;
}

body.reason-theme .demonic-perk-node.has-missing-icon img {
    display: none;
}

body.reason-theme .demonic-perk-node.has-missing-icon::after {
    content: "?";
    display: grid;
    inset: 22%;
    place-items: center;
    color: #d8c9b7;
    font-weight: 900;
    z-index: 2;
    transform: none;
}

body.reason-theme .demonic-perk-node-cost {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

body.reason-theme .demonic-perk-node.is-reachable,
body.reason-theme .demonic-perk-node.is-selected,
body.reason-theme .demonic-perk-node.is-preview {
    opacity: 1;
}

body.reason-theme .demonic-perk-node.is-reachable::before {
    background-image: url("../img/demonic-perks/frames/standard-available.png");
}

body.reason-theme .demonic-perk-node[data-frame="capstone"].is-reachable::before {
    background-image: url("../img/demonic-perks/frames/capstone-available.png");
}

body.reason-theme .demonic-perk-node.is-selected::before {
    background-image: url("../img/demonic-perks/frames/standard-selected.png");
    filter: drop-shadow(0 0 5px rgba(250, 225, 125, 0.48));
}

body.reason-theme .demonic-perk-node[data-frame="capstone"].is-selected::before {
    background-image: url("../img/demonic-perks/frames/capstone-selected.png");
}

body.reason-theme .demonic-perk-node.is-preview::before {
    background-image: url("../img/demonic-perks/frames/standard-available.png");
    filter: drop-shadow(0 0 7px rgba(67, 210, 123, 0.9));
}

body.reason-theme .demonic-perk-node[data-frame="capstone"].is-preview::before {
    background-image: url("../img/demonic-perks/frames/capstone-available.png");
}

body.reason-theme .demonic-perk-node.is-search-match {
    opacity: 1;
    filter: drop-shadow(0 0 9px rgba(67, 210, 123, 0.98));
    animation: demonic-perk-search-pulse 1.35s ease-in-out infinite alternate;
}

body.reason-theme .demonic-perk-node:hover {
    opacity: 1;
    filter: brightness(1.12) drop-shadow(0 0 8px rgba(250, 225, 125, 0.5));
}

@keyframes demonic-perk-search-pulse {
    from { filter: drop-shadow(0 0 5px rgba(67, 210, 123, 0.68)); }
    to { filter: drop-shadow(0 0 14px rgba(67, 210, 123, 1)); }
}

body.reason-theme .demonic-perks-panel {
    position: absolute;
    top: 18px;
    z-index: 20;
    width: min(350px, calc(50% - 30px));
    min-width: 0;
    border: 1px solid var(--perk-border);
    border-radius: 8px;
    color: #eee3d5;
    background:
        radial-gradient(circle at 15% 0, rgba(151, 42, 34, 0.14), transparent 15rem),
        linear-gradient(180deg, var(--perk-panel), var(--perk-panel-deep));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

body.reason-theme .demonic-perks-search-panel {
    left: 18px;
    padding-bottom: 15px;
}

body.reason-theme .demonic-perks-effects-panel {
    right: 18px;
    display: flex;
    max-height: calc(100% - 36px);
    flex-direction: column;
}

body.reason-theme .demonic-perks-panel-heading {
    flex: 0 0 auto;
    padding: 15px 17px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(152, 43, 34, 0.2), transparent);
}

body.reason-theme .demonic-perks-panel-heading h2 {
    margin: 0;
    color: #fff6e8;
    font-family: "Spectral SC", Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
}

body.reason-theme .demonic-perks-search-field {
    padding: 14px 15px 10px;
}

body.reason-theme .demonic-perks-search-field label {
    display: block;
    margin: 0 0 7px;
    color: #cbbdaf;
    font-size: 11px;
    font-weight: 900;
}

body.reason-theme .demonic-perks-search-field input[type="search"] {
    height: 44px;
    min-height: 44px;
    padding: 0 13px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    line-height: 44px !important;
}

body.reason-theme .demonic-perks-search-field p {
    min-height: 18px;
    margin: 8px 1px 0;
    color: #b9aa9a;
    font-size: 11px;
    line-height: 1.45;
}

body.reason-theme .demonic-perks-legend {
    margin: 0 15px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

body.reason-theme .demonic-perks-legend h3 {
    margin: 0 0 9px;
    color: #d9cbb9;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.reason-theme .demonic-perks-legend ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.reason-theme .demonic-perks-legend li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: #bcae9e;
    font-size: 10px;
    line-height: 1.2;
}

body.reason-theme .demonic-perks-legend-mark {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border: 1px solid #423830;
    transform: rotate(45deg);
    background: #191513;
}

body.reason-theme .demonic-perks-legend-mark.is-selected {
    border-color: var(--perk-gold);
    background: #7d2023;
    box-shadow: 0 0 6px rgba(250, 225, 125, 0.38);
}

body.reason-theme .demonic-perks-legend-mark.is-available {
    border-color: #d57951;
    background: #493226;
}

body.reason-theme .demonic-perks-legend-mark.is-locked {
    opacity: 0.45;
}

body.reason-theme .demonic-perks-legend-line {
    width: 19px;
    height: 3px;
    flex: 0 0 19px;
    border-radius: 99px;
    background: var(--perk-gold);
}

body.reason-theme .demonic-perks-effects {
    min-width: 0;
    padding: 5px 13px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #80503b #17120f;
    scrollbar-width: thin;
}

body.reason-theme .demonic-perks-effects::-webkit-scrollbar {
    width: 8px;
}

body.reason-theme .demonic-perks-effects::-webkit-scrollbar-track {
    background: #17120f;
}

body.reason-theme .demonic-perks-effects::-webkit-scrollbar-thumb {
    border: 2px solid #17120f;
    border-radius: 99px;
    background: #80503b;
}

body.reason-theme .demonic-perks-effect {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-width: 0;
    padding: 12px 3px 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

body.reason-theme .demonic-perks-effect-content {
    min-width: 0;
}

body.reason-theme .demonic-perks-effect-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: url("../img/demonic-perks/frames/standard-selected.png") center / contain no-repeat;
}

body.reason-theme .demonic-perks-effect-icon[data-frame="capstone"] {
    background-image: url("../img/demonic-perks/frames/capstone-selected.png");
}

body.reason-theme .demonic-perks-effect-icon img {
    display: block;
    width: 66.666%;
    height: 66.666%;
    object-fit: contain;
    image-rendering: pixelated;
}

body.reason-theme .demonic-perks-effect-icon.is-minor img {
    width: 50%;
    height: 50%;
}

body.reason-theme .demonic-perks-effect:last-child {
    border-bottom: 0;
}

body.reason-theme .demonic-perks-effect-heading {
    display: flex;
    min-width: 0;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
}

body.reason-theme .demonic-perks-effect-heading strong {
    min-width: 0;
    color: #fff0db;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

body.reason-theme .demonic-perks-effect-heading span {
    flex: 0 0 auto;
    padding: 3px 6px;
    border: 1px solid rgba(222, 180, 111, 0.18);
    border-radius: 99px;
    color: #bcae9c;
    background: rgba(0, 0, 0, 0.2);
    font-size: 8px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

body.reason-theme .demonic-perks-effect p {
    margin: 6px 0 0;
    color: #cbbdaf;
    font-size: 11px;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

body.reason-theme .demonic-perks-effect-content > small {
    display: block;
    margin-top: 6px;
    color: #aa9b8d;
    font-size: 9px;
    font-style: italic;
    line-height: 1.4;
}

body.reason-theme .demonic-perks-highlight {
    color: #ffcf62;
    font-weight: 900;
}

body.reason-theme .demonic-perks-effects-empty {
    margin: 12px 2px;
    color: #b9aa9a;
    font-size: 12px;
}

body.reason-theme .demonic-perks-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 35;
    min-width: 230px;
    max-width: calc(100% - 32px);
    padding: 14px 18px;
    border: 1px solid rgba(250, 225, 125, 0.34);
    border-radius: 7px;
    color: #fff0d8;
    background: rgba(20, 15, 12, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transform: translate(-50%, -50%);
}

body.reason-theme .demonic-perks-loading.is-error {
    border-color: rgba(235, 91, 84, 0.7);
    color: #ffd8d4;
}

body.reason-theme .demonic-perks-tooltip {
    position: absolute;
    z-index: 30;
    width: min(384px, calc(100% - 20px));
    min-width: 0;
    padding: 13px 15px 12px;
    border: 1px solid rgba(250, 225, 125, 0.45);
    border-radius: 7px;
    color: #e8ddd0;
    background:
        radial-gradient(circle at 18% 0, rgba(160, 44, 35, 0.22), transparent 14rem),
        rgba(17, 13, 11, 0.97);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

body.reason-theme .demonic-perks-tooltip[hidden],
body.reason-theme .demonic-perks-toast[hidden],
body.reason-theme .demonic-perks-loading[hidden] {
    display: none !important;
}

body.reason-theme .demonic-perks-tooltip h3 {
    display: block;
    margin: 0 0 6px;
    color: #fff0d7;
    font-family: "Spectral SC", Georgia, serif;
    font-size: 14px;
    line-height: 1.25;
}

body.reason-theme .demonic-perks-tooltip p {
    margin: 0;
    color: #d3c5b6;
    font-size: 11px;
    line-height: 1.48;
    overflow-wrap: anywhere;
}

body.reason-theme .demonic-perks-tooltip > span {
    display: block;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #b5a797;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.35;
}

body.reason-theme .demonic-perks-zoom-controls {
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 25;
    display: grid;
    grid-template-columns: 44px 44px auto;
    gap: 5px;
}

body.reason-theme .demonic-perks-zoom-controls button {
    min-width: 44px;
    min-height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid rgba(231, 204, 164, 0.34);
    border-radius: 6px;
    color: #fff1dc;
    background: linear-gradient(180deg, rgba(43, 34, 28, 0.96), rgba(20, 15, 13, 0.98));
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.36);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

body.reason-theme .demonic-perks-zoom-controls button:last-child {
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.reason-theme .demonic-perks-zoom-controls button:hover {
    border-color: rgba(250, 225, 125, 0.68);
    background: linear-gradient(180deg, rgba(86, 45, 32, 0.98), rgba(34, 20, 16, 0.98));
}

body.reason-theme .demonic-perks-map-status {
    margin: 0;
    padding: 9px 18px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #bcae9e;
    background: #241f1a;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
}

body.reason-theme .demonic-perks-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 150;
    padding: 12px 16px;
    border: 1px solid rgba(67, 210, 123, 0.52);
    border-radius: 7px;
    color: #e2ffeb;
    background: rgba(14, 43, 27, 0.96);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48);
    font-size: 11px;
    font-weight: 950;
}

body.reason-theme .demonic-perks-noscript {
    margin: 16px;
    padding: 16px;
    border: 1px solid rgba(235, 91, 84, 0.52);
    border-radius: 7px;
    color: #ffd9d5;
    background: rgba(67, 18, 20, 0.8);
    font-size: 13px;
    font-weight: 800;
}

body.reason-theme .demonic-perks-page .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 1050px) {
    body.reason-theme .demonic-perks-toolbar {
        top: 82px;
    }

    body.reason-theme .demonic-perks-panel {
        width: min(310px, calc(50% - 24px));
    }
}

@media (max-width: 780px) {
    body.reason-theme .demonic-perks-toolbar {
        position: relative;
        top: auto;
        display: grid;
        gap: 13px;
        padding: 13px 14px 14px;
    }

    body.reason-theme .demonic-perks-toolbar-actions {
        justify-content: stretch;
    }

    body.reason-theme .demonic-perks-count,
    body.reason-theme .demonic-perks-action {
        flex: 1 1 0;
    }

    body.reason-theme .demonic-perks-layout {
        grid-template-areas:
            "map"
            "search"
            "effects";
        gap: 12px;
        padding: 0 0 12px;
        background: #17130f;
    }

    body.reason-theme .demonic-perks-canvas {
        height: 610px;
        max-width: 100vw;
    }

    body.reason-theme .demonic-perks-panel {
        position: static;
        width: auto;
        max-width: none;
        margin: 0 12px;
    }

    body.reason-theme .demonic-perks-search-panel {
        grid-area: search;
    }

    body.reason-theme .demonic-perks-effects-panel {
        grid-area: effects;
        height: 340px;
        max-height: 340px;
    }

    body.reason-theme .demonic-perks-map-panel {
        grid-area: map;
    }
}

@media (max-width: 520px) {
    body.reason-theme .demonic-perks-brand-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    body.reason-theme .demonic-perks-brand h1 {
        font-size: 25px;
    }

    body.reason-theme .demonic-perks-brand p {
        display: none;
    }

    body.reason-theme .demonic-perks-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    body.reason-theme .demonic-perks-count {
        grid-column: 1 / -1;
        min-height: 45px;
    }

    body.reason-theme .demonic-perks-count strong {
        font-size: 21px;
    }

    body.reason-theme .demonic-perks-action {
        min-height: 42px;
    }

    body.reason-theme .demonic-perks-canvas {
        height: 560px;
    }

    body.reason-theme .demonic-perks-tooltip {
        padding: 11px 12px;
    }

    body.reason-theme .demonic-perks-zoom-controls {
        bottom: 12px;
        left: 12px;
        grid-template-columns: 42px 42px auto;
    }

    body.reason-theme .demonic-perks-zoom-controls button {
        min-width: 42px;
        min-height: 40px;
    }

    body.reason-theme .demonic-perks-legend ul {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.reason-theme .demonic-perk-node,
    body.reason-theme .demonic-perks-edges line,
    body.reason-theme .demonic-perks-action {
        transition: none;
    }

    body.reason-theme .demonic-perk-node.is-search-match {
        animation: none;
    }
}
