@import url('https://fonts.googleapis.com/css2?family=Tilt+Warp&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+25&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

#fiveserver-inject,
div[id*="fiveserver"] {
    display: none !important;
}

:root {
    --font-sans: "Nunito Sans", sans-serif;
    --font-title: "Tilt Warp", sans-serif;

    --bg: #ffffff;
    --bg-1: #F8FAFB;
    --text: #0f1419;
    --text-accent: #fff;
    --accent: #7a6eff;
    --accent-light: #ecebfe;
    --accent-dark: #5046c1;
    --danger: #c23a3f;
    --danger-light: #fdecec;
    --surface: #fff;
    --surface-accent: #e9edee;
    --surface-hover-light: #eff1f3;
    --surface-hover-dark: #cfd9de;

    --border-light: #cfd9de;
    --border-dark: #b9cad3;

    --box-shadow-thin: rgba(89, 89, 89, 0.364);
    --box-shadow-wide: rgba(0, 0, 0, 0.12);
}

/*#region THEMES*/

[data-theme="dark"] {
    --bg: #000000;
    --bg-1: #0a0a0d;
    --text: #f1f1f5;
    --text-accent: #f1f1f5;
    --accent: #7a6eff;
    --accent-light: #2a2850;
    --accent-dark: #c1bbf9;
    --danger: #ff6b70;
    --danger-light: #36191c;
    --surface: #0b0b0e;
    --surface-accent: #1a1a20;
    --surface-hover-light: #1a1a20;
    --surface-hover-dark: #33333d;

    --border-light: #26262e;
    --border-dark: #3a3a46;

    --box-shadow-thin: rgba(122, 110, 255, 0.25);
    --box-shadow-wide: rgba(0, 0, 0, 0.6);
}

[data-theme="dim"] {
    --bg: #1b2330;
    --bg-1: #151c27;
    --text: #e4e8ee;
    --text-accent: #1b2330;
    --accent: #b6aff5;
    --accent-light: #3d4c63;
    --accent-dark: #b6aff5;
    --danger: #ff7b80;
    --danger-light: #402a33;
    --surface: #232d3b;
    --surface-accent: #2a3546;
    --surface-hover-light: #2d394b;
    --surface-hover-dark: #3d4c63;

    --border-light: #3a475b;
    --border-dark: #4a5a73;

    --box-shadow-thin: rgba(0, 0, 0, 0.45);
    --box-shadow-wide: rgba(0, 0, 0, 0.3);
}

[data-theme="mist"] {
    --bg: #eceff3;
    --bg-1: #e1e6ec;
    --text: #1c2530;
    --text-accent: #f8fafc;
    --accent: #4f6b8f;
    --accent-light: #dde6f1;
    --accent-dark: #2f4666;
    --danger: #b3342b;
    --danger-light: #fae6e3;
    --surface: #f8fafc;
    --surface-accent: #e1e6ec;
    --surface-hover-light: #eef2f6;
    --surface-hover-dark: #c9d3de;

    --border-light: #d0d8e1;
    --border-dark: #b4c0cd;

    --box-shadow-thin: rgba(40, 60, 85, 0.3);
    --box-shadow-wide: rgba(30, 50, 75, 0.12);
}

[data-theme="sakura"] {
    --bg: #fdf1f4;
    --bg-1: #f9e4ea;
    --text: #3a2430;
    --text-accent: #fff7f9;
    --accent: #c2456b;
    --accent-light: #fbe0e8;
    --accent-dark: #8f2a4a;
    --danger: #b3261e;
    --danger-light: #fde8e6;
    --surface: #fff7f9;
    --surface-accent: #fad1de;
    --surface-hover-light: #fbeaef;
    --surface-hover-dark: #f5bacc;

    --border-light: #f0d3dc;
    --border-dark: #e3b8c6;

    --box-shadow-thin: rgba(120, 50, 75, 0.3);
    --box-shadow-wide: rgba(120, 50, 75, 0.12);
}

[data-theme="matcha"] {
    --bg: #e3eadd;
    --bg-1: #eef2ea;
    --text: #1f2a22;
    --text-accent: #f8faf5;
    --accent: #4a7c59;
    --accent-light: #dcebdc;
    --accent-dark: #2f5a3c;
    --danger: #b3402f;
    --danger-light: #fbe9e5;
    --surface: #f8faf5;
    --surface-accent: #e3eadd;
    --surface-hover-light: #edf5ea;
    --surface-hover-dark: #cbd8c4;

    --border-light: #cfdac8;
    --border-dark: #b3c4aa;

    --box-shadow-thin: rgba(40, 70, 50, 0.3);
    --box-shadow-wide: rgba(30, 50, 35, 0.12);
}

[data-theme="marshmallow"] {
    --bg: #fff4f8;
    --bg-1: #ffe9f1;
    --text: #43303d;
    --text-accent: #fffdfe;
    --accent: #c74477;
    --accent-light: #dcecfb;
    --accent-dark: #2f5f96;
    --danger: #c0301f;
    --danger-light: #ffe4e0;
    --surface: #fffdfe;
    --surface-accent: #e3f6ea;
    --surface-hover-light: #fff8dc;
    --surface-hover-dark: #cfe6fa;

    --border-light: #d9e8f5;
    --border-dark: #f3bfd4;

    --box-shadow-thin: rgba(199, 68, 119, 0.25);
    --box-shadow-wide: rgba(199, 68, 119, 0.1);

    --flag: linear-gradient(135deg, #ffb3cf, #ffe9a8, #bfeccf, #b5d9fb, #ffb3cf);
}

[data-theme="mocha"] {
    --bg: #efe5d8;
    --bg-1: #e6d9c8;
    --text: #3a2a20;
    --text-accent: #faf5ec;
    --accent: #96593a;
    --accent-light: #f1ddcd;
    --accent-dark: #6b3a21;
    --danger: #b3342b;
    --danger-light: #f9e3de;
    --surface: #faf5ec;
    --surface-accent: #eadfce;
    --surface-hover-light: #f3eadc;
    --surface-hover-dark: #d9c8b2;

    --border-light: #dccdb8;
    --border-dark: #c6b199;

    --box-shadow-thin: rgba(80, 55, 35, 0.3);
    --box-shadow-wide: rgba(60, 40, 25, 0.14);
}

[data-theme="ocean"] {
    --bg: #0b1f26;
    --bg-1: #07171c;
    --text: #e3f1f4;
    --text-accent: #07171c;
    --accent: #137f96;
    --accent-light: #123c48;
    --accent-dark: #8fdbe9;
    --danger: #ff7a7f;
    --danger-light: #3a2227;
    --surface: #102a33;
    --surface-accent: #153540;
    --surface-hover-light: #163743;
    --surface-hover-dark: #24505f;

    --border-light: #25464f;
    --border-dark: #34606c;

    --box-shadow-thin: rgba(0, 0, 0, 0.5);
    --box-shadow-wide: rgba(0, 0, 0, 0.35);
}

[data-theme="honey"] {
    --bg: #fbf5dc;
    --bg-1: #f4ebc6;
    --text: #3a2d0f;
    --text-accent: #fefcf3;
    --accent: #a66a00;
    --accent-light: #fbebb8;
    --accent-dark: #6b4300;
    --danger: #b3342b;
    --danger-light: #fbe5df;
    --surface: #fffbea;
    --surface-accent: #f4ebc6;
    --surface-hover-light: #f9f1d4;
    --surface-hover-dark: #e6d9a6;

    --border-light: #e8dcab;
    --border-dark: #d3c283;

    --box-shadow-thin: rgba(110, 80, 10, 0.3);
    --box-shadow-wide: rgba(90, 65, 5, 0.13);
}

[data-theme="neon"] {
    --bg: #0e0b1f;
    --bg-1: #08060f;
    --text: #ece9ff;
    --text-accent: #0d1e2e;
    --accent: #ff71fa;
    --accent-light: #2a1e52;
    --accent-dark: #14ced4;
    --danger: #ff82b4;
    --danger-light: #531c29;
    --surface: #15112b;
    --surface-accent: #1e1840;
    --surface-hover-light: #231c4a;
    --surface-hover-dark: #3a2f73;

    --border-light: #352a6b;
    --border-dark: #4b3d94;

    --box-shadow-thin: rgba(212, 20, 143, 0.35);
    --box-shadow-wide: rgba(0, 0, 0, 0.5);
}

[data-theme="piltover"] {
    --bg: #0f1829;
    --bg-1: #0a111e;
    --text: #efe8d6;
    --text-accent: #152238;
    --accent: #bf840f;
    --accent-light: #31496f;
    --accent-dark: #e8b54f;
    --danger: #ff7a7f;
    --danger-light: #3d2328;
    --surface: #152238;
    --surface-accent: #1b2c47;
    --surface-hover-light: #1f3354;
    --surface-hover-dark: #2f4a75;

    --border-light: #2a3f63;
    --border-dark: #3d5a8a;

    --box-shadow-thin: rgba(0, 0, 0, 0.5);
    --box-shadow-wide: rgba(0, 0, 0, 0.35);
}

[data-theme="zaun"] {
    --bg: #152022;
    --bg-1: #0f1818;
    --text: #dfe9d6;
    --text-accent: #0a0e0c;
    --accent: #f35dcd;
    --accent-light: #23572b;
    --accent-dark: #d9ff7f;
    --danger: #ff7a6b;
    --danger-light: #3f2420;
    --surface: #1d2d2c;
    --surface-accent: #263a37;
    --surface-hover-light: #2b4238;
    --surface-hover-dark: #3f5e4f;

    --border-light: #36524a;
    --border-dark: #4b6e5f;

    --box-shadow-thin: rgba(189, 240, 110, 0.18);
    --box-shadow-wide: rgba(0, 0, 0, 0.4);
}

[data-theme="lesbian"] {
    --bg: #ffe6dd;
    --bg-1: #fff1ec;
    --text: #3b0d26;
    --text-accent: #fffaf8;
    --accent: #d52d00;
    --accent-light: #fbdcec;
    --accent-dark: #a30262;
    --danger: #b00a30;
    --danger-light: #fde3e8;
    --surface: #fffaf8;
    --surface-accent: #f8d5ea;
    --surface-hover-light: #fbd4c4;
    --surface-hover-dark: #efb1d6;

    --border-light: #f1cddd;
    --border-dark: #e3a9c6;

    --box-shadow-thin: rgba(163, 2, 98, 0.3);
    --box-shadow-wide: rgba(163, 2, 98, 0.12);

    --flag: linear-gradient(135deg, #d52d00, #ff9a56, #fff, #d362a4, #a30262);
}

[data-theme="marshmallow"] .header,
[data-theme="lesbian"] .header {
    padding-bottom: calc(0.5rem + 4px);
}

/*#endregion*/

/*#region RESET*/
[data-no-anim] *,
[data-no-anim] *::before,
[data-no-anim] *::after {
    animation: none !important;
    transition: none !important;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-dark) var(--bg-1);
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: #f0f0f0;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 4px;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

*:not(dialog) {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

html {
    font-size: clamp(16px, 0.6vw + 9.6px, 24px);
    scroll-behavior: smooth;
}

/* html {
    font-size: 16px;
} */

html[data-ui-size="xs"] {
    font-size: 13px;
}

html[data-ui-size="sm"] {
    font-size: 14.5px;
}

html[data-ui-size="md"] {
    font-size: 16px;
}

html[data-ui-size="lg"] {
    font-size: 18px;
}

html[data-ui-size="xl"] {
    font-size: 20px;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
    background-color: transparent;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

a {
    color: var(--text);
    text-decoration: none;
}

#root,
#__next {
    isolation: isolate;
}

/*#endregion*/

/*#region COMMS STATUS*/

.comms-status-wrap {
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 0 0.6rem;

    margin-left: auto;
    margin-right: 1rem;
}

.comms-status-wrap .comms-text {
    font-size: 0.8rem;
    font-weight: 300;
    margin-right: 0.2rem;
}

.comms-status {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}

.comms-status .status-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background-color: var(--border-dark);
    flex-shrink: 0;
}

.comms-status .status-dot.open {
    background-color: #19ce6b;
    animation: pulse-green 2s ease infinite;
}

.comms-status .status-dot.closed {
    background-color: #e91111;
}

.comms-status .status-dot.closed+.status-text {
    color: #e91111;
}

.comms-status .status-dot.ask {
    background-color: #eab308;
    animation: pulse-yellow 2s ease infinite;
}

.comms-status .status-dot.full {
    background-color: #eab308;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 206, 107, 0.5);
    }

    70% {
        box-shadow: 0 0 0 0.4rem rgba(25, 206, 107, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 206, 107, 0);
    }
}

@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.5);
    }

    70% {
        box-shadow: 0 0 0 0.4rem rgba(234, 179, 8, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
    }
}

/*#endregion*/

/*#region LAYOUT*/

body {
    -webkit-font-smoothing: antialiased;
    font-family: var(--font-sans);
    color: var(--text);
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;

    background-color: var(--bg);
}

body.resizing {
    cursor: nwse-resize !important;
}

body.resizing * {
    cursor: nwse-resize !important;
    user-select: none;
}

.main-wrapper {
    height: 100vh;
    height: 100dvh;
    width: 100%;

    max-width: 1440px;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    flex: 1;
}

.page-wrapper {
    height: 100%;
    background-color: var(--bg);
    display: flex;
    flex-direction: row;

    overflow: hidden;

    border-left: 1px solid var(--border-dark);
    border-right: 1px solid var(--border-dark);
}

.page-content {
    flex: 1;
    height: 100%;
    width: 100%;
    padding: 1rem;
    overflow: hidden;
    overflow-y: auto;
    background-color: var(--bg-1);

    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-content: flex-start;
    gap: 1rem;
}

/*#endregion*/

/*#region HEADER*/

.header {
    background-color: var(--bg);
    border: 1px solid var(--border-dark);
    border-top: none;

    display: flex;
    flex-direction: row;
    align-items: center;

    padding: 0.5rem 1rem;

    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: var(--flag, none);
    pointer-events: none;
}

.header .bio {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;

    margin-right: auto;
}

.header .bio .portrait {
    width: clamp(1.75rem, 1.5rem + 0.8vw, 2.25rem);
    aspect-ratio: 1;
    background: linear-gradient(to bottom, var(--accent-light), var(--accent));
    border-radius: 50%;

    overflow: hidden;

    position: relative;
}

.header .bio .portrait::after {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;

    background-image: url('/shared/img/portrait.webp');
    background-position: bottom center;
    background-size: 95%;
    background-repeat: no-repeat;
}

.header .bio .text {
    font-family: var(--font-title);
    font-size: 1.2rem;
}

.header .bio .text span {
    color: var(--accent);
}

.header .page-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    pointer-events: none;
}

.header .settings-toggle {
    font-size: clamp(1.05rem, 0.85rem + 0.5vw, 1.25rem);
    color: var(--text);
    border: none;
    padding: 0.3rem;
    border-radius: 0.3rem;
    border: solid 1px transparent;
    line-height: 1;
    cursor: pointer;

    display: grid;
    place-items: center;

    transition: background-color 0.2s ease, color 0.2s ease;
}

.header .settings-toggle:hover {
    background-color: var(--surface-hover-light);
}

.header .settings-toggle .lucide {
    grid-area: 1 / 1;
    transition: transform 0.3s ease, opacity 0.2s ease, stroke-width 0.125s ease;
}

.header .settings-toggle .icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.header .settings-toggle.active {
    background-color: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent-dark);
}

.header .settings-toggle.active .icon-gear {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

.header .settings-toggle.active .icon-close {
    opacity: 1;
    transform: none;
    stroke-width: 2;
}

/*#endregion*/

/*#region SETTINGS*/
.setting {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}

.u-select {
    position: relative;
    width: 9rem;
    background-color: var(--surface);
    border: solid 1px var(--border-dark);
    border-radius: 0.5rem;
    user-select: none;
}

.u-select-trigger {
    width: 100%;
    padding: 0.2rem 0.5rem 0.2rem 0.6rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--text);
    text-align: left;
}

.u-select-value {
    line-height: 1.2;
}

.u-select-trigger::after {
    content: '\e06d';
    font-family: 'lucide';
    font-size: 1rem;
    line-height: 1;
    color: var(--text);
    margin-left: auto;
    transition: transform 0.18s ease;
}

.u-select.open .u-select-trigger::after {
    transform: rotate(180deg);
}

.u-select-menu {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.25rem) scale(0.97);
    transform-origin: top center;
    transition: opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0s linear 0.15s;

    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background-color: var(--surface);
    border: solid 1px var(--border-dark);
    border-radius: 0.5rem;
    z-index: 30;
    box-shadow: 0 1px 2px var(--box-shadow-thin),
        2px 4px 12px var(--box-shadow-wide);
    padding: 0.25rem;
    flex-direction: column;
    gap: 0.1rem;

    max-height: 20rem;
    overflow-y: auto;
}

.u-select.open .u-select-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
}

.u-select-option {
    padding: 0.3rem 0.5rem;
    border-radius: 0.35rem;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.u-select-option:hover {
    background-color: var(--surface-hover-light);
}

.u-select-option.selected {
    background-color: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 700;
}

.settings-menu {
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.5rem) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0s linear 0.18s;

    position: absolute;
    top: calc(100% + 0.4rem);
    right: 1rem;
    padding: 0.75rem 0.9rem;
    background-color: var(--surface);
    border: solid 1px var(--border-dark);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px var(--box-shadow-thin),
        2px 6px 16px var(--box-shadow-wide);
    z-index: 40;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
}

.settings-menu .setting {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.settings-menu .setting label {
    color: var(--text);
    white-space: nowrap;
}

.u-switch {
    position: relative;
    width: 2.5rem;
    height: 1.35rem;
    padding: 0.15rem;
    border-radius: 999px;
    background-color: var(--surface-hover-dark);
    border: solid 1px var(--border-dark);
    flex-shrink: 0;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.u-switch[aria-checked="true"] {
    background-color: var(--accent);
    border-color: var(--accent-dark);
}

.u-switch-thumb {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background-color: var(--surface);
    box-shadow: 0 1px 2px var(--box-shadow-thin);
    transform: translateX(0);
    transition: transform 0.18s ease;
}

.u-switch[aria-checked="true"] .u-switch-thumb {
    transform: translateX(1.15rem);
}

/*#endregion*/

/*#region SIDEBAR*/
.lucide {
    width: 1em;
    height: 1em;
    min-width: 1em;
    min-height: 1em;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-width 0.125s ease;
}

.site-sidebar {
    height: 100%;
    width: 5rem;

    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;

    padding: 1.5rem 1rem;

    flex-shrink: 0;

    border-right: 1px solid var(--border-dark);
}

.site-sidebar .sep {
    border-bottom: solid 1px var(--border-dark);
    margin: 1rem 0;
}

.site-sidebar .menu-sec {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 0.5rem + 1.25vw, 1.25rem);
}

.site-sidebar .menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-sidebar .menu-btn .icon {
    font-size: clamp(1.15rem, 0.95rem + 0.45vw, 1.35rem);
    color: var(--text);
    line-height: 1;
}

.site-sidebar .menu-btn .label {
    font-size: 0.9rem;
    line-height: 1.1;
    text-align: center;
    margin-top: 0.35rem;
}

.site-sidebar .menu-btn.active {
    pointer-events: none;
}

.site-sidebar .menu-btn.active .lucide {
    stroke-width: 2;
}

.site-sidebar .menu-btn.active .icon {
    color: var(--accent);
}

.site-sidebar .menu-btn.active .label {
    color: var(--accent);
    font-weight: 700;
}

.site-sidebar .menu-btn:active {
    transform: scale(0.9);
}

@media (min-width: 701px) {
    .site-sidebar .menu-btn {
        padding: 0.35rem 0.5rem;
        margin: -0.35rem -0.5rem;
        border-radius: 0.5rem;
        transition: background-color 0.125s ease;
    }

    .site-sidebar .menu-btn:hover {
        background-color: var(--surface-hover-light);
    }
}

/*#endregion*/

/*#region FOOTER*/

.footer {
    width: 100%;
    max-width: 1440px;
    background-color: var(--bg);
    border-top: 1px solid var(--border-dark);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem;
}

.footer .copy {
    font-size: 0.7rem;
    color: var(--text);
    opacity: 0.4;
}

.footer .socials {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.footer .socials .social-icon {
    width: 1.2rem;
    aspect-ratio: 1;
    background-color: var(--text);

    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;

    cursor: pointer;

    opacity: 0.4;

    transition: opacity 0.2s ease, transform 0.125s ease;
}

.footer .socials .social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/*#endregion*/

/*#region SOCIAL ICONS*/
.socials .social-icon.twitter {
    mask-image: url('/shared/svg/socials/twitter.svg');
}

.socials .social-icon.insta {
    mask-image: url('/shared/svg/socials/insta.svg');
}

.socials .social-icon.tumblr {
    mask-image: url('/shared/svg/socials/tumblr.svg');
}

.socials .social-icon.kofi {
    mask-image: url('/shared/svg/socials/kofi.svg');
}

.socials .social-icon.prints {
    mask-image: url('/shared/svg/socials/inprnt.svg');
}

.socials .social-icon.ao3 {
    mask-image: url('/shared/svg/socials/ao3.svg');
}

.socials .social-icon.twitch {
    mask-image: url('/shared/svg/socials/twitch.svg');
}

.socials .social-icon.patreon {
    mask-image: url('/shared/svg/socials/patreon.svg');
}

/*#endregion*/

/*#region WINDOW SHELL*/

.window-shell {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    overflow: hidden;

    min-width: 0;
    height: fit-content;
    flex-shrink: 0;

}

.window-shell .head {
    height: 1.8rem;
    background-color: var(--surface-accent);
    border-bottom: solid 1px var(--border-light);

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.window-shell .head .title {
    font-weight: 700;
    padding: 0 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.window-shell .head .min-btn {
    margin-right: 0.2rem;
    height: 1.3rem;
    aspect-ratio: 1;
    border-radius: 0.2rem;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.window-shell .head .min-btn:hover {
    background-color: var(--surface-hover-dark);
}

.window-shell .head .min-btn::after {
    content: '\e06d';
    font-family: 'lucide';
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
    cursor: pointer;

    transition: transform 0.125s ease;
}

.window-shell.minimized .head .min-btn::after {
    transform: rotate(180deg);
}

.window-shell .content {
    padding: 0.8rem;
    background-color: var(--surface);
    height: 100%;
    overflow-y: auto;

    transition: padding 0.2s ease;
}

.window-shell.minimized .content {
    padding: 0 0.8rem;
    opacity: 0;
    max-height: 0;
}

.window-shell.minimized .head {
    border-bottom-color: transparent;
}

/*#endregion*/

/*#region STRIP GALLERY*/

.gallery {
    --gallery-h: 13rem;
}

.gallery-viewport {
    position: relative;
    contain: inline-size;
}

.gallery-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.gallery-btn {
    padding: 0;
    border: none;
    background-color: var(--surface-accent);
    border-radius: 0.3rem;
    color: var(--text);
    opacity: 0.6;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: opacity 0.125s ease, color 0.125s ease;
}

.gallery-btn::after {
    font-family: 'lucide';
    line-height: 1;
    font-size: 0.85rem;
    font-weight: 900;
}

.gallery-btn.prev::after {
    content: '\e06e';
}

.gallery-btn.next::after {
    content: '\e06f';
}

.gallery-btn:hover:not(:disabled) {
    opacity: 1;
}

.gallery-btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.gallery-rail {
    position: relative;
    flex: 1;
    height: 0.85rem;
    touch-action: none;
}

.gallery-rail::before {
    content: '';
    position: absolute;
    inset: 0.275rem 0;
    border-radius: 3rem;
    background-color: var(--surface-hover-light);
}

.gallery-thumb {
    position: absolute;
    top: 0.275rem;
    bottom: 0.275rem;
    left: 0;
    border-radius: 3rem;
    background-color: var(--surface-hover-dark);
    transition: background-color 0.125s ease;
}

.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: -0.3rem 0;
}

.gallery-thumb:hover,
.gallery-thumb:active {
    background-color: var(--accent);
}

.gallery-track img {
    display: block;
    height: var(--gallery-h);
    width: auto;
    max-width: none;
    flex-shrink: 0;
    border-radius: 0.5rem;
    user-select: none;

    border: solid 1px var(--border-light);
}

.gallery-link {
    padding: 0.2rem 0.8rem;
    border: 1px solid var(--border-dark);
    border-radius: 3rem;

    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;

    margin-top: 0.8rem;
    margin-left: auto;

    transition: all 0.2s ease;
}

.gallery-link:hover {
    border-color: var(--accent);
    background-color: var(--accent-light);
    color: var(--accent-dark);
}

/*#endregion*/

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fade-in 0.4s ease both;
}

/*#region RESPONSIVE*/

@media (max-width: 600px) {
    .page-wrapper {
        display: flex;
        flex-direction: column-reverse;
        overflow-y: auto;
    }

    .site-sidebar {
        height: auto;
        width: 100%;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        overflow-y: auto;
        overflow-x: auto;

        padding: 0;
        padding-bottom: 0;

        flex-shrink: 0;

        border-top: 1px solid var(--border-dark);
        border-right: none;

        background-color: var(--surface);

        gap: 0;

        z-index: 21;
    }

    .site-sidebar .menu-sec {
        flex-direction: row;
        gap: 0;
    }

    .site-sidebar .sep {
        display: none;
    }

    .site-sidebar .menu-btn {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 0.3rem;
        flex: 1;

        padding: 0.5rem 0.6rem;
        padding-bottom: 0.8rem;
    }

    .site-sidebar .menu-btn:hover {
        background-color: var(--surface-hover-light);
    }

    .site-sidebar .menu-btn .icon {
        aspect-ratio: 1;
        margin-bottom: -0.03rem;
    }

    .site-sidebar .menu-btn:hover .icon {
        transform: scale(1);
    }

    .site-sidebar .menu-btn .label {
        white-space: nowrap;
        font-size: 1rem;
        font-weight: 500;
    }

    .site-sidebar .menu-btn .label br {
        display: none;
    }

    .site-sidebar .menu-btn:hover .label {
        font-weight: 500;
    }

    .header {
        gap: 0.4rem;
        padding-inline: 0.75rem;
    }

    .header .bio {
        min-width: 0;
        flex-shrink: 1;
    }

    .header .bio .text {
        font-size: 1.05rem;
    }

    .comms-status-wrap {
        min-width: 0;
        flex-shrink: 1;
        margin-right: 0.4rem;
        padding: 0 0.45rem;
    }

    .header .settings-toggle {
        flex-shrink: 0;
        font-size: 1.35rem;
    }

    .header .page-title {
        display: none;
    }

    .settings-menu {
        right: 0.75rem;
        max-width: calc(100vw - 1.5rem);
    }

    .page-content {
        height: auto;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-y: auto;
        gap: 1rem;
    }

    .window-shell {
        position: static;
        width: 100% !important;
        height: auto !important;
        min-width: 0;
        min-height: 0;
    }

    .window-shell.minimized {
        width: 100% !important;
        height: auto !important;
    }

    .window-shell .head {
        cursor: default;
        border-bottom: none;
    }

    .window-shell .resize-handle {
        display: none;
    }
}

@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .main-wrapper {
        height: auto;
        overflow: visible;
    }

    .page-wrapper {
        height: auto;
        overflow: visible;
        flex: 1;
    }

    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 20;

        height: 3rem;
        padding: 0 1rem;
    }

    .header .bio .portrait {
        width: 2.2rem;
    }

    .header .settings-toggle {
        font-size: 1.5rem;
    }

    .site-sidebar {
        position: fixed;
        bottom: 3rem;
        left: 0;
        right: 0;
        z-index: 20;

        background-color: var(--bg);
    }

    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 21;
        padding: 0 1rem;
        height: 3rem;
    }

    .page-content {
        padding-top: 3.5rem;
        padding-bottom: 6.5rem;
        position: relative;
    }
}

@media (max-width: 480px) {
    .comms-status-wrap .comms-text span {
        display: none;
    }

    .comms-status {
        margin-right: 0.5rem;
    }
}

/*#endregion*/