.fk-riftguard {
    --fk-ink: #14110f;
    --fk-panel: #211b18;
    --fk-panel-2: #2b2520;
    --fk-line: rgba(255, 255, 255, 0.14);
    --fk-text: #f8f3ea;
    --fk-muted: #c9bdad;
    --fk-gold: #f2b84b;
    --fk-red: #e85d45;
    --fk-teal: #39b7c5;
    --fk-green: #66b95c;
    --fk-focus: #a9f5ff;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    color: var(--fk-text);
    background:
        linear-gradient(135deg, rgba(242, 184, 75, 0.12), transparent 28%),
        linear-gradient(225deg, rgba(57, 183, 197, 0.12), transparent 26%),
        var(--fk-ink);
    border: 0;
    border-radius: 0;
    overflow: clip;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fk-riftguard *,
.fk-riftguard *::before,
.fk-riftguard *::after {
    box-sizing: inherit;
}

.fk-riftguard * {
    scrollbar-width: thin;
    scrollbar-color: rgba(242, 184, 75, 0.86) rgba(15, 12, 10, 0.74);
}

.fk-riftguard *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.fk-riftguard *::-webkit-scrollbar-track {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.24)),
        rgba(15, 12, 10, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;
}

.fk-riftguard *::-webkit-scrollbar-thumb {
    background:
        linear-gradient(180deg, #f7d778, #a86d2d);
    border: 2px solid rgba(15, 12, 10, 0.86);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.fk-riftguard *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fff2b0, #f2b84b);
}

.fk-riftguard a {
    color: inherit;
    text-decoration: none;
}

.fk-riftguard button,
.fk-riftguard input {
    font: inherit;
}

.fk-riftguard button:disabled,
.fk-riftguard input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.fk-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 66px;
    padding: 10px 18px;
    background: rgba(20, 17, 15, 0.94);
    border-bottom: 1px solid var(--fk-line);
    backdrop-filter: blur(14px);
}

body.admin-bar .fk-topbar {
    top: 32px;
}

.fk-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fk-brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #1c1510;
    background: conic-gradient(from 35deg, var(--fk-gold), var(--fk-teal), var(--fk-green), var(--fk-red), var(--fk-gold));
    border-radius: 8px;
    font-weight: 900;
    letter-spacing: 0;
}

.fk-brand-text {
    display: grid;
    gap: 1px;
    min-width: 0;
    line-height: 1.05;
}

.fk-brand-text strong {
    font-size: 1rem;
}

.fk-brand-text span {
    color: var(--fk-muted);
    font-size: 0.86rem;
}

.fk-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.fk-nav a,
.fk-session-button,
.fk-auth-tabs button,
.fk-primary {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.fk-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: var(--fk-muted);
}

.fk-nav a:hover,
.fk-nav a:focus-visible {
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
}

.fk-session-button {
    padding: 0 14px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--fk-line);
}

.fk-main {
    display: grid;
    gap: 0;
}

.fk-core-warning {
    display: grid;
    gap: 10px;
    max-width: 760px;
    margin: 18px;
    padding: 18px;
    color: var(--fk-text);
    background: rgba(232, 93, 69, 0.14);
    border: 1px solid rgba(232, 93, 69, 0.42);
    border-radius: 8px;
}

.fk-core-warning h1,
.fk-core-warning p {
    margin: 0;
}

.fk-core-warning h1 {
    font-size: 1.5rem;
}

.fk-core-warning p:last-child {
    color: var(--fk-muted);
    line-height: 1.5;
}

.fk-play-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-height: calc(100vh - 66px);
    margin: 0 auto;
    padding: 10px;
}

.fk-stage,
.fk-auth-box,
.fk-kingdom-card,
.fk-community-card,
.fk-leader-list {
    border: 1px solid var(--fk-line);
    border-radius: 8px;
    background: rgba(33, 27, 24, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.fk-stage {
    width: min(100%, 1800px);
    min-width: 0;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(12, 11, 10, 0.94);
}

.fk-left-panel,
.fk-right-panel {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
    max-height: calc(100vh - 96px);
    overflow: auto;
    padding-right: 2px;
}

.fk-player-card,
.fk-vitals,
.fk-objectives,
.fk-chat {
    min-width: 0;
    padding: 12px;
    background: rgba(33, 27, 24, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.fk-auth {
    min-height: min(760px, calc(100vh - 96px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    background:
        linear-gradient(90deg, rgba(20, 17, 15, 0.42), rgba(20, 17, 15, 0.84)),
        repeating-linear-gradient(135deg, rgba(242, 184, 75, 0.11) 0 2px, transparent 2px 26px),
        linear-gradient(135deg, #322419, #173940 48%, #263c25);
}

.fk-auth-copy {
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 14px;
    min-width: 0;
    padding: 46px;
}

.fk-kicker {
    margin: 0;
    color: var(--fk-gold);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fk-auth-copy h1,
.fk-section-head h2,
.fk-player-card h2 {
    margin: 0;
    letter-spacing: 0;
}

.fk-auth-copy h1 {
    max-width: 11ch;
    font-size: 3.65rem;
    line-height: 0.95;
}

.fk-auth-copy p:last-child {
    max-width: 42ch;
    margin: 0;
    color: var(--fk-muted);
    font-size: 1.02rem;
    line-height: 1.6;
}

.fk-auth-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    margin: 16px;
    padding: 18px;
    align-self: stretch;
}

.fk-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.fk-auth-tabs button {
    color: var(--fk-muted);
    background: transparent;
}

.fk-auth-tabs button.is-active {
    color: #1b1511;
    background: var(--fk-gold);
}

.fk-form {
    display: none;
    gap: 14px;
}

.fk-form.is-active {
    display: grid;
}

.fk-form label,
.fk-kingdom-picker {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: var(--fk-muted);
    font-size: 0.9rem;
}

.fk-form input[type="text"],
.fk-form input[type="email"],
.fk-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    color: var(--fk-text);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
}

.fk-form input:focus {
    border-color: var(--fk-focus);
    box-shadow: 0 0 0 3px rgba(169, 245, 255, 0.18);
}

.fk-kingdom-picker {
    margin: 0;
    padding: 0;
    border: 0;
}

.fk-kingdom-picker legend {
    padding: 0 0 4px;
}

.fk-kingdom-option {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 6px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.fk-kingdom-option:has(input:checked) {
    border-color: var(--kingdom-tone, var(--fk-gold));
    background: rgba(255, 255, 255, 0.1);
}

.fk-kingdom-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fk-swatch,
.fk-crest {
    display: grid;
    place-items: center;
    color: #15100d;
    background: var(--kingdom-tone, var(--fk-gold));
    border-radius: 8px;
    font-weight: 900;
}

.fk-swatch {
    width: 42px;
    height: 42px;
}

.fk-kingdom-option-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.fk-kingdom-option-text strong,
.fk-kingdom-option-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-kingdom-option-text small {
    color: var(--fk-muted);
}

.fk-primary {
    width: 100%;
    min-height: 48px;
    color: #17110c;
    background: linear-gradient(90deg, var(--fk-gold), #f7d778);
    border-color: rgba(0, 0, 0, 0.18);
    font-weight: 800;
}

.fk-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-weight: 900;
}

.fk-primary:hover,
.fk-secondary:hover,
.fk-session-button:hover {
    transform: translateY(-1px);
}

.fk-home {
    display: grid;
    min-height: calc(100vh - 66px);
    background:
        linear-gradient(180deg, rgba(8, 7, 6, 0.24), rgba(8, 7, 6, 0.98) 74%),
        #080706;
}

.fk-home-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: clamp(520px, calc(100svh - 118px), 780px);
    overflow: hidden;
    padding: clamp(38px, 6vw, 76px) clamp(20px, 5vw, 78px);
    background-image:
        linear-gradient(90deg, rgba(8, 7, 6, 0.95) 0%, rgba(8, 7, 6, 0.72) 42%, rgba(8, 7, 6, 0.34) 100%),
        linear-gradient(0deg, rgba(8, 7, 6, 0.96), rgba(8, 7, 6, 0.08) 46%),
        url("../images/riftguard-world-preview.jpg");
    background-position: center;
    background-size: cover;
    border-bottom: 1px solid rgba(242, 184, 75, 0.18);
}

.fk-home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 24%, rgba(169, 245, 255, 0.18), transparent 27%),
        radial-gradient(circle at 46% 72%, rgba(242, 184, 75, 0.16), transparent 26%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.fk-home-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    max-width: 760px;
}

.fk-home-hero-copy h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(3rem, 8vw, 7.4rem);
    line-height: 0.9;
    letter-spacing: 0;
    text-shadow: 0 8px 34px rgba(0, 0, 0, 0.72);
}

.fk-home-hero-copy p:not(.fk-kicker) {
    max-width: 54ch;
    margin: 0;
    color: #efe2cc;
    font-size: clamp(1rem, 2vw, 1.26rem);
    line-height: 1.58;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.fk-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 440px;
}

.fk-hero-actions .fk-primary,
.fk-hero-actions .fk-secondary {
    width: auto;
    min-width: 160px;
}

.fk-hero-status {
    position: absolute;
    right: clamp(18px, 4vw, 64px);
    bottom: clamp(18px, 4vw, 52px);
    z-index: 1;
    display: grid;
    gap: 2px;
    min-width: 190px;
    padding: 12px 14px;
    background: rgba(15, 11, 8, 0.78);
    border: 1px solid rgba(242, 184, 75, 0.3);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
}

.fk-hero-status span {
    color: var(--fk-gold);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.fk-hero-status strong {
    font-size: 1.05rem;
}

.fk-home-section {
    display: grid;
    gap: 18px;
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 54px 18px;
}

.fk-home-section .fk-section-head p:not(.fk-kicker) {
    max-width: 760px;
    margin: 0;
    color: var(--fk-muted);
    line-height: 1.55;
}

.fk-screenshot-frame {
    overflow: hidden;
    background: #0d0a08;
    border: 1px solid rgba(242, 184, 75, 0.26);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.fk-screenshot-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.fk-feature-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fk-feature-band article,
.fk-world-grid article,
.fk-roadmap li {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(54, 42, 32, 0.76), rgba(19, 14, 11, 0.9)),
        rgba(33, 27, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
}

.fk-feature-band h3,
.fk-feature-band p,
.fk-world-grid strong,
.fk-world-grid span,
.fk-roadmap strong,
.fk-roadmap span {
    margin: 0;
}

.fk-feature-band p,
.fk-world-grid span,
.fk-roadmap span {
    color: var(--fk-muted);
    line-height: 1.45;
}

.fk-feature-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.28), transparent 25%),
        linear-gradient(145deg, #f2b84b, #5b3322);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 8px;
    box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.28);
}

.fk-feature-icon::before,
.fk-feature-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.fk-feature-combat::before {
    width: 5px;
    height: 30px;
    background: #fff4c8;
    border-radius: 3px;
    transform: rotate(40deg);
}

.fk-feature-world::before {
    width: 28px;
    height: 28px;
    background: radial-gradient(circle, #66b95c 0 42%, #236f8d 43% 62%, #d8e2e6 63%);
    border-radius: 999px;
}

.fk-feature-social::before {
    width: 24px;
    height: 18px;
    background: rgba(248, 243, 234, 0.9);
    border-radius: 14px 14px 14px 4px;
}

.fk-world-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fk-roadmap ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fk-roadmap li {
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: start;
}

.fk-message {
    min-height: 22px;
    margin: 0;
    color: #ffd3c6;
    line-height: 1.45;
}

.fk-character-select {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(440px, 660px);
    gap: clamp(18px, 5vw, 70px);
    align-items: end;
    width: 100%;
    min-height: 100vh;
    padding: clamp(28px, 5vw, 74px);
    overflow: hidden;
    background-image:
        linear-gradient(90deg, rgba(8, 7, 6, 0.98), rgba(8, 7, 6, 0.78) 48%, rgba(8, 7, 6, 0.54)),
        linear-gradient(0deg, rgba(8, 7, 6, 0.98), rgba(8, 7, 6, 0.2) 52%),
        repeating-linear-gradient(90deg, rgba(255, 220, 148, 0.04) 0 1px, transparent 1px 96px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 96px),
        linear-gradient(135deg, #21160e 0%, #17100b 36%, #102018 62%, #0a1116 100%);
    background-position: center;
    background-size: cover;
}

.fk-character-select::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(112deg, transparent 0 58%, rgba(242, 184, 75, 0.13) 58% 58.5%, transparent 58.5%),
        linear-gradient(18deg, transparent 0 64%, rgba(102, 185, 92, 0.12) 64% 64.5%, transparent 64.5%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 34%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.44), transparent 42%);
    opacity: 0.9;
    pointer-events: none;
}

.fk-character-select-copy,
.fk-character-select-panel,
.fk-character-slot {
    position: relative;
    z-index: 1;
}

.fk-character-select-copy {
    display: grid;
    gap: 14px;
    max-width: 680px;
}

.fk-character-select-copy h1 {
    max-width: 10ch;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.6rem);
    line-height: 0.92;
    letter-spacing: 0;
    text-shadow: 0 8px 34px rgba(0, 0, 0, 0.72);
}

.fk-character-select-copy p:not(.fk-kicker) {
    max-width: 52ch;
    margin: 0;
    color: #efe2cc;
    line-height: 1.56;
}

.fk-launcher-objective {
    display: grid;
    gap: 5px;
    width: min(100%, 440px);
    margin-top: 12px;
    padding: 14px 16px;
    background:
        linear-gradient(110deg, rgba(242, 184, 75, 0.16), rgba(26, 19, 13, 0.8)),
        rgba(18, 13, 9, 0.72);
    border: 1px solid rgba(242, 184, 75, 0.3);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.fk-launcher-objective span,
.fk-launcher-briefing span {
    color: var(--fk-gold);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.fk-launcher-objective strong {
    font-size: 1.2rem;
}

.fk-launcher-objective p {
    margin: 0;
    color: var(--fk-muted);
    line-height: 1.45;
}

.fk-character-select-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.fk-character-slot {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-width: 0;
    padding: 18px;
    background:
        radial-gradient(circle at 14% 16%, color-mix(in srgb, var(--select-tone, var(--fk-gold)) 28%, transparent), transparent 34%),
        linear-gradient(180deg, rgba(57, 45, 35, 0.94), rgba(17, 12, 9, 0.96)),
        rgba(33, 27, 24, 0.92);
    border: 1px solid rgba(242, 184, 75, 0.36);
    border-radius: 8px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.56), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.fk-character-portrait {
    position: relative;
    display: block;
    width: 128px;
    height: 172px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--select-aura, var(--fk-gold)) 42%, transparent), transparent 32%),
        radial-gradient(circle at 50% 82%, rgba(0, 0, 0, 0.56), transparent 38%),
        linear-gradient(180deg, color-mix(in srgb, var(--select-tone, var(--fk-gold)) 34%, #24180e), #110c08 78%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 8px;
    box-shadow: inset 0 -28px 42px rgba(0, 0, 0, 0.44), 0 18px 38px rgba(0, 0, 0, 0.32);
}

.fk-character-portrait > span {
    position: absolute;
    display: block;
}

.fk-portrait-aura {
    inset: 18px 18px auto;
    height: 92px;
    background:
        radial-gradient(circle, color-mix(in srgb, var(--select-aura, var(--fk-gold)) 58%, transparent), transparent 66%);
    opacity: 0.85;
    filter: blur(3px);
}

.fk-portrait-shadow {
    left: 26px;
    right: 24px;
    bottom: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 999px;
}

.fk-portrait-cape {
    left: 34px;
    top: 64px;
    width: 62px;
    height: 88px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.2), transparent 45%, rgba(255, 255, 255, 0.1)),
        color-mix(in srgb, var(--select-tone, var(--fk-gold)) 62%, #17110c);
    clip-path: polygon(17% 0, 84% 0, 100% 100%, 0 100%);
    opacity: 0.88;
}

.fk-portrait-body {
    left: 40px;
    top: 78px;
    width: 52px;
    height: 70px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 45%, rgba(0, 0, 0, 0.24)),
        linear-gradient(180deg, var(--select-trim, #f7d778) 0 9px, var(--select-armor, #5b4b86) 9px 100%);
    border: 2px solid rgba(20, 12, 6, 0.72);
    border-radius: 18px 18px 12px 12px;
    box-shadow:
        -22px 10px 0 -11px var(--select-armor, #5b4b86),
        22px 10px 0 -11px var(--select-armor, #5b4b86),
        -12px 67px 0 -7px #1c1713,
        12px 67px 0 -7px #1c1713;
}

.fk-portrait-head {
    left: 47px;
    top: 39px;
    width: 38px;
    height: 40px;
    background:
        radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.42), transparent 18%),
        #f3d2aa;
    border: 2px solid rgba(20, 12, 6, 0.66);
    border-radius: 44% 44% 48% 48%;
}

.fk-portrait-helm {
    left: 42px;
    top: 28px;
    width: 48px;
    height: 27px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 44%, rgba(0, 0, 0, 0.24)),
        var(--select-trim, #f2b84b);
    border: 2px solid rgba(20, 12, 6, 0.66);
    border-radius: 18px 18px 8px 8px;
}

.fk-portrait-weapon {
    right: 22px;
    top: 50px;
    width: 10px;
    height: 94px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 42%),
        var(--select-weapon, #f7d778);
    border: 1px solid rgba(20, 12, 6, 0.7);
    border-radius: 8px;
    transform: rotate(18deg);
    transform-origin: 50% 88%;
    box-shadow: 0 0 18px color-mix(in srgb, var(--select-weapon, #f7d778) 44%, transparent);
}

.fk-character-portrait[data-class-key="ranger"] .fk-portrait-weapon {
    right: 16px;
    top: 52px;
    width: 42px;
    height: 74px;
    background:
        radial-gradient(ellipse at 100% 50%, transparent 0 44%, var(--select-weapon, #d8f0a2) 45% 50%, transparent 51%),
        linear-gradient(90deg, transparent 0 47%, #3b2418 48% 55%, transparent 56%);
    border: 0;
    box-shadow: none;
    transform: rotate(7deg);
}

.fk-character-portrait[data-class-key="spellblade"] .fk-portrait-weapon {
    width: 13px;
    box-shadow: 0 0 26px color-mix(in srgb, var(--select-weapon, #a9f5ff) 76%, transparent);
}

.fk-character-portrait[data-class-key="mender"] .fk-portrait-weapon {
    width: 13px;
    background:
        radial-gradient(circle at 50% 13%, #efffff 0 11px, transparent 12px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 42%),
        var(--select-weapon, #9bf0c2);
}

.fk-character-select-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.fk-character-select-info h2 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.05;
}

.fk-character-select-info p:not(.fk-kicker) {
    margin: 0;
    color: var(--fk-muted);
}

.fk-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}

.fk-select-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    color: #fff5d8;
    background:
        linear-gradient(180deg, rgba(242, 184, 75, 0.22), rgba(45, 31, 18, 0.7)),
        rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(242, 184, 75, 0.22);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}

.fk-select-bars {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.fk-select-bars span {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.fk-select-bars b {
    color: var(--fk-muted);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.fk-select-bars i {
    display: block;
    height: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.fk-select-bars em {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e85d45, #f2b84b, #8bd36f);
    border-radius: inherit;
}

.fk-select-bars span:nth-child(2) em {
    background: linear-gradient(90deg, #5278ff, #a9f5ff);
}

.fk-select-bars span:nth-child(3) em {
    background: linear-gradient(90deg, #c1a1ff, #f2b84b);
}

.fk-select-vitals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 8px;
}

.fk-select-vitals span {
    display: grid;
    gap: 2px;
    min-height: 52px;
    padding: 8px;
    color: var(--fk-muted);
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.fk-select-vitals strong {
    color: var(--fk-text);
    font-size: 1.05rem;
}

.fk-character-select-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.fk-character-select-actions .fk-session-button {
    min-width: 120px;
}

.fk-launcher-briefing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.fk-launcher-briefing article {
    display: grid;
    gap: 6px;
    min-width: 0;
    min-height: 116px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(43, 33, 25, 0.92), rgba(13, 10, 8, 0.94)),
        rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(242, 184, 75, 0.2);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.fk-launcher-briefing strong,
.fk-launcher-briefing p {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.fk-launcher-briefing strong {
    color: var(--fk-text);
    font-size: 0.94rem;
    line-height: 1.16;
}

.fk-launcher-briefing p {
    color: var(--fk-muted);
    font-size: 0.8rem;
    line-height: 1.36;
}

.fk-roster {
    display: grid;
    gap: 12px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(30, 24, 19, 0.94), rgba(12, 9, 7, 0.96)),
        rgba(21, 16, 13, 0.92);
    border: 1px solid rgba(242, 184, 75, 0.24);
    border-radius: 8px;
    box-shadow: 0 22px 62px rgba(0, 0, 0, 0.48), inset 0 0 0 1px rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
}

.fk-roster-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fk-roster-head span {
    color: var(--fk-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.fk-roster-list {
    display: grid;
    gap: 8px;
    max-height: min(30vh, 260px);
    overflow: auto;
    padding-right: 4px;
}

.fk-roster-slot {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 72px;
    padding: 10px;
    color: var(--fk-text);
    text-align: left;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 18%, transparent), transparent 58%),
        rgba(255, 255, 255, 0.052);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
}

.fk-roster-slot:hover,
.fk-roster-slot:focus-visible {
    border-color: color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 72%, #ffffff 8%);
    outline: 0;
}

.fk-roster-slot.is-active {
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 28%, transparent), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.07);
    border-color: color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 78%, #ffffff 10%);
    box-shadow: inset 3px 0 0 var(--roster-tone, var(--fk-gold)), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.fk-roster-crest {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    overflow: hidden;
    color: #140e08;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.5), transparent 24%),
        linear-gradient(180deg, color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 88%, #ffffff 10%), color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 72%, #000000 24%));
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 8px;
    font-weight: 950;
}

.fk-roster-crest i {
    position: absolute;
    display: block;
}

.fk-roster-mini-cape {
    left: 14px;
    top: 17px;
    width: 17px;
    height: 23px;
    background: color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 66%, #130c07);
    clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.fk-roster-mini-body {
    left: 15px;
    top: 21px;
    width: 15px;
    height: 19px;
    background: #2d2119;
    border-top: 4px solid color-mix(in srgb, var(--roster-tone, var(--fk-gold)) 78%, #fff 10%);
    border-radius: 7px 7px 4px 4px;
}

.fk-roster-mini-head {
    left: 15px;
    top: 9px;
    width: 15px;
    height: 15px;
    background: #f3d2aa;
    border: 1px solid rgba(20, 12, 6, 0.72);
    border-radius: 999px;
}

.fk-roster-mini-weapon {
    right: 9px;
    top: 14px;
    width: 4px;
    height: 28px;
    background: #f7d778;
    border-radius: 4px;
    transform: rotate(20deg);
}

.fk-roster-slot[data-class-key="ranger"] .fk-roster-mini-weapon {
    right: 5px;
    top: 16px;
    width: 16px;
    height: 24px;
    background:
        radial-gradient(ellipse at 100% 50%, transparent 0 44%, #e6f2bd 45% 52%, transparent 53%),
        linear-gradient(90deg, transparent 0 45%, #342018 46% 54%, transparent 55%);
    transform: none;
}

.fk-roster-slot[data-class-key="mender"] .fk-roster-mini-weapon {
    box-shadow: 0 0 12px rgba(155, 240, 194, 0.76);
}

.fk-roster-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fk-roster-body strong,
.fk-roster-body small,
.fk-roster-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-roster-body strong {
    font-size: 1rem;
}

.fk-roster-body small {
    color: var(--fk-muted);
    font-size: 0.78rem;
}

.fk-roster-meta {
    display: grid;
    gap: 4px;
    max-width: 130px;
    color: var(--fk-muted);
    font-size: 0.72rem;
    text-align: right;
}

.fk-create-character {
    display: grid;
    gap: 10px;
}

.fk-create-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.fk-create-character input {
    width: 100%;
    min-height: 46px;
    color: var(--fk-text);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    padding: 0 14px;
}

.fk-create-character button {
    min-height: 46px;
    padding: 0 16px;
    color: #1f1508;
    background: linear-gradient(180deg, #ffdc74, #d99a31);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.fk-create-choice-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fk-create-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.fk-create-choice-grid .fk-kingdom-option {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    min-height: 42px;
    padding: 5px;
}

.fk-create-choice-grid .fk-swatch {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
}

.fk-create-choice-grid .fk-kingdom-option-text small {
    display: none;
}

.fk-create-choice-grid .fk-kingdom-option-text strong {
    font-size: 0.74rem;
}

.fk-character-select .fk-message.is-success {
    color: #baf7c9;
}

.fk-game {
    display: grid;
    padding: 8px;
}

.fk-canvas-shell {
    position: relative;
    width: min(100%, 160vh);
    aspect-ratio: 16 / 9;
    min-height: min(640px, calc(100vh - 92px));
    max-height: calc(100vh - 92px);
    margin: 0 auto;
    overflow: hidden;
    background: #10100f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.fk-canvas-shell canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

.fk-canvas-shell canvas:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(169, 245, 255, 0.7);
}

.fk-target-frame {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 3;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: min(360px, calc(100% - 32px));
    min-width: 280px;
    padding: 8px 10px;
    color: var(--fk-text);
    background:
        linear-gradient(180deg, rgba(38, 30, 24, 0.92), rgba(12, 9, 7, 0.9)),
        rgba(20, 17, 15, 0.86);
    border: 1px solid color-mix(in srgb, var(--target-tone, var(--fk-gold)) 44%, rgba(255, 255, 255, 0.14));
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(12px);
    pointer-events: none;
    transform: translateX(-50%);
}

.fk-target-frame.is-hostile-target {
    border-color: color-mix(in srgb, var(--target-tone, #ff9b8a) 60%, rgba(255, 255, 255, 0.14));
}

.fk-target-frame.is-incoming-attack {
    background:
        linear-gradient(180deg, rgba(72, 24, 18, 0.94), rgba(18, 10, 8, 0.92)),
        rgba(20, 17, 15, 0.86);
    border-color: rgba(255, 120, 88, 0.78);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36), 0 0 28px rgba(255, 95, 77, 0.24);
}

.fk-target-portrait {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background:
        radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.26), transparent 24%),
        linear-gradient(145deg, var(--target-tone, var(--fk-gold)), #20140c);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.28);
}

.fk-target-info {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fk-target-info strong,
.fk-target-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-target-info span {
    color: var(--fk-muted);
    font-size: 0.75rem;
}

.fk-target-health {
    height: 7px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 999px;
}

.fk-target-health i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #e85d45, var(--target-tone, var(--fk-gold)));
    border-radius: inherit;
    transition: width 160ms ease;
}

.fk-mobile-vitals,
.fk-mobile-toolbar,
.fk-mobile-orientation {
    display: none;
}

.fk-mobile-vitals {
    position: absolute;
    z-index: 4;
    color: var(--fk-text);
    pointer-events: none;
}

.fk-mobile-vitals-main {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.fk-mobile-vitals-main strong,
.fk-mobile-vitals-main span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-mobile-vitals-main span {
    color: var(--fk-muted);
}

.fk-mobile-vitals-bars {
    display: grid;
    gap: 3px;
}

.fk-mobile-vitals-bars i {
    display: block;
    height: 5px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.11);
    border-radius: 999px;
}

.fk-mobile-vitals-bars b {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
}

.fk-mobile-health b {
    background: linear-gradient(90deg, #e85d45, #f2b84b, #66b95c);
}

.fk-mobile-mana b {
    background: linear-gradient(90deg, #3d7dff, #a9f5ff);
}

.fk-mobile-xp b {
    background: linear-gradient(90deg, #cba6ff, #f2b84b);
}

.fk-mobile-toolbar {
    position: absolute;
    z-index: 5;
    gap: 7px;
}

.fk-mobile-control {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--fk-text);
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.18), transparent 28%),
        rgba(20, 17, 15, 0.86);
    border: 1px solid rgba(242, 184, 75, 0.28);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
    touch-action: manipulation;
}

.fk-mobile-control i,
.fk-mobile-control i::before,
.fk-mobile-control i::after {
    position: absolute;
    display: block;
    content: "";
}

.fk-mobile-hud-toggle i,
.fk-mobile-hud-toggle i::before,
.fk-mobile-hud-toggle i::after {
    width: 20px;
    height: 3px;
    background: #f8f3ea;
    border-radius: 999px;
}

.fk-mobile-hud-toggle i::before {
    top: -7px;
}

.fk-mobile-hud-toggle i::after {
    top: 7px;
}

.fk-mobile-chat-toggle i {
    width: 23px;
    height: 18px;
    background: #f8f3ea;
    border-radius: 8px 8px 8px 3px;
}

.fk-mobile-chat-toggle i::after {
    left: 2px;
    bottom: -5px;
    width: 8px;
    height: 8px;
    background: #f8f3ea;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.fk-mobile-fullscreen-toggle i {
    width: 22px;
    height: 22px;
}

.fk-mobile-fullscreen-toggle i::before,
.fk-mobile-fullscreen-toggle i::after {
    width: 8px;
    height: 8px;
    border-color: #f8f3ea;
    border-style: solid;
}

.fk-mobile-fullscreen-toggle i::before {
    left: 0;
    top: 0;
    border-width: 3px 0 0 3px;
}

.fk-mobile-fullscreen-toggle i::after {
    right: 0;
    bottom: 0;
    border-width: 0 3px 3px 0;
}

.fk-mobile-orientation {
    position: absolute;
    inset: 0;
    z-index: 30;
    place-items: center;
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    color: var(--fk-text);
    background:
        radial-gradient(circle at 50% 35%, rgba(242, 184, 75, 0.18), transparent 32%),
        rgba(7, 6, 5, 0.9);
    backdrop-filter: blur(14px);
    pointer-events: auto;
}

.fk-mobile-orientation-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: min(360px, 100%);
    padding: 22px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(39, 32, 25, 0.95), rgba(16, 13, 11, 0.96)),
        var(--fk-panel);
    border: 1px solid rgba(242, 184, 75, 0.32);
    border-radius: 10px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
}

.fk-mobile-orientation-card h2,
.fk-mobile-orientation-card p {
    margin: 0;
}

.fk-mobile-orientation-card h2 {
    font-size: 1.55rem;
    line-height: 1.08;
}

.fk-mobile-orientation-card p:not(.fk-kicker) {
    color: var(--fk-muted);
    line-height: 1.45;
}

.fk-mobile-orientation-card .fk-mobile-fullscreen-note {
    color: #ffe0a1;
    font-size: 0.86rem;
}

.fk-mobile-orientation-card button {
    min-height: 46px;
    padding: 0 18px;
    color: #1d1308;
    background: linear-gradient(180deg, #ffd979, var(--fk-gold));
    border: 0;
    border-radius: 8px;
    font-weight: 1000;
    cursor: pointer;
}

.fk-mobile-control,
.fk-touch-pad button,
.fk-hotbar button,
.fk-chat-form button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.fk-mobile-control:focus,
.fk-touch-pad button:focus,
.fk-hotbar button:focus {
    outline: none;
}

.fk-rotate-mark {
    position: relative;
    display: block;
    width: 78px;
    height: 48px;
    border: 4px solid rgba(242, 184, 75, 0.9);
    border-radius: 12px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.fk-rotate-mark::before {
    position: absolute;
    content: "";
    left: 50%;
    top: -14px;
    width: 18px;
    height: 18px;
    border: 3px solid #f8f3ea;
    border-left: 0;
    border-bottom: 0;
    transform: translateX(-50%) rotate(-45deg);
}

.fk-rotate-mark::after {
    position: absolute;
    content: "";
    left: 50%;
    top: -17px;
    width: 42px;
    height: 28px;
    border-top: 3px solid #f8f3ea;
    border-radius: 50%;
    transform: translateX(-50%);
}

.fk-game:fullscreen,
.fk-game:-webkit-full-screen {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #060504;
}

.fk-game:fullscreen .fk-canvas-shell,
.fk-game:-webkit-full-screen .fk-canvas-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
}

.fk-toast {
    position: absolute;
    left: 50%;
    top: 16px;
    max-width: min(360px, calc(100% - 32px));
    padding: 10px 12px;
    color: var(--fk-text);
    background: rgba(20, 17, 15, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    opacity: 0;
    transform: translate(-50%, -8px);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}

.fk-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.fk-hotbar {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 7px;
    width: min(940px, calc(100% - 330px));
    min-width: min(780px, calc(100% - 32px));
    padding: 0;
    transform: translateX(-50%);
}

.fk-hotbar button,
.fk-chat-form button {
    min-height: 50px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid var(--fk-line);
    border-radius: 8px;
    cursor: pointer;
}

.fk-hotbar button {
    position: relative;
    display: grid;
    grid-template-columns: 18px 40px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 54px;
    padding: 6px 7px;
    text-align: left;
    background: rgba(20, 17, 15, 0.82);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 26px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.fk-hotbar button::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.64);
    transform: scaleY(var(--cooldown-progress, 0));
    transform-origin: bottom;
    pointer-events: none;
}

.fk-hotbar button.is-cooling {
    border-color: color-mix(in srgb, var(--skill-color, var(--fk-gold)) 54%, rgba(255, 255, 255, 0.12));
}

.fk-hotbar button.is-ready {
    border-color: color-mix(in srgb, var(--skill-color, var(--fk-gold)) 70%, rgba(255, 255, 255, 0.12));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 1px color-mix(in srgb, var(--skill-color, var(--fk-gold)) 22%, transparent),
        0 12px 30px rgba(0, 0, 0, 0.3),
        0 0 18px color-mix(in srgb, var(--skill-color, var(--fk-gold)) 24%, transparent);
}

.fk-hotbar button.is-ready .fk-skill-icon {
    box-shadow:
        inset 0 -10px 18px rgba(0, 0, 0, 0.25),
        0 0 16px color-mix(in srgb, var(--skill-color, var(--fk-gold)) 42%, transparent);
}

.fk-hotbar button.is-low-mana {
    border-color: rgba(82, 120, 255, 0.52);
    filter: saturate(0.72);
}

.fk-hotbar button.is-low-mana .fk-skill-icon {
    opacity: 0.74;
}

.fk-hotbar-tool {
    --skill-color: #c28b54;
}

.fk-hotbar-emotes {
    --skill-color: #66f2a3;
}

.fk-hotbar-crafting {
    --skill-color: #ffd36b;
}

.fk-hotbar button > * {
    position: relative;
    z-index: 2;
}

.fk-hotbar span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--fk-muted);
    background: rgba(0, 0, 0, 0.36);
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 900;
}

.fk-skill-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #17110c;
    background:
        radial-gradient(circle at 30% 24%, rgba(255,255,255,0.34), transparent 24%),
        linear-gradient(135deg, var(--skill-color, var(--fk-gold)), color-mix(in srgb, var(--skill-color, var(--fk-gold)) 68%, #111));
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px;
    box-shadow: inset 0 -10px 18px rgba(0, 0, 0, 0.25);
    font-style: normal;
    font-weight: 1000;
}

.fk-skill-icon::before,
.fk-skill-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.fk-skill-basic-strike-icon::before {
    width: 5px;
    height: 28px;
    background: #fff8d8;
    border-radius: 3px 3px 1px 1px;
    box-shadow: 0 0 0 1px rgba(43, 33, 28, 0.22);
    transform: rotate(42deg);
}

.fk-skill-basic-strike-icon::after {
    width: 18px;
    height: 5px;
    background: #2b211c;
    border-radius: 4px;
    transform: rotate(42deg) translateY(9px);
}

.fk-skill-class-skill-icon::before {
    width: 23px;
    height: 23px;
    background: rgba(248, 243, 234, 0.92);
    clip-path: polygon(50% 0, 86% 16%, 78% 72%, 50% 100%, 22% 72%, 14% 16%);
}

.fk-skill-class-skill[data-fk-class-key="spellblade"] .fk-skill-class-skill-icon::before {
    width: 6px;
    height: 28px;
    background: #e7efff;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(142, 181, 255, 0.8);
    transform: rotate(-36deg);
    clip-path: none;
}

.fk-skill-class-skill[data-fk-class-key="ranger"] .fk-skill-class-skill-icon::before {
    width: 27px;
    height: 5px;
    background: #f8f3ea;
    border-radius: 4px;
    transform: rotate(-34deg);
    clip-path: none;
}

.fk-skill-class-skill[data-fk-class-key="ranger"] .fk-skill-class-skill-icon::after {
    right: 8px;
    top: 13px;
    width: 10px;
    height: 10px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 10px solid #2b211c;
    transform: rotate(-34deg);
}

.fk-skill-class-skill[data-fk-class-key="mystic"] .fk-skill-class-skill-icon::before {
    width: 22px;
    height: 22px;
    background: radial-gradient(circle, #f8f3ea 0 26%, rgba(169, 245, 255, 0.82) 27% 52%, transparent 54%);
    border: 2px solid rgba(248, 243, 234, 0.88);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(169, 245, 255, 0.76);
    clip-path: none;
}

.fk-skill-potion-icon::before {
    top: 9px;
    width: 15px;
    height: 22px;
    background: rgba(248, 243, 234, 0.94);
    border-radius: 4px 4px 8px 8px;
}

.fk-skill-potion-icon::after {
    top: 22px;
    width: 11px;
    height: 6px;
    background: #37d985;
    border-radius: 0 0 6px 6px;
}

.fk-skill-portal-icon::before {
    width: 24px;
    height: 24px;
    border: 4px solid rgba(248, 243, 234, 0.92);
    border-left-color: rgba(43, 33, 28, 0.58);
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(203, 166, 255, 0.8);
}

.fk-skill-portal-icon::after {
    width: 8px;
    height: 8px;
    background: #2b211c;
    border-radius: 999px;
}

.fk-skill-backpack::before {
    top: 13px;
    width: 23px;
    height: 20px;
    background: #6f4d35;
    border: 2px solid rgba(248, 243, 234, 0.8);
    border-radius: 5px 5px 8px 8px;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18);
}

.fk-skill-backpack::after {
    top: 8px;
    width: 15px;
    height: 12px;
    border: 3px solid rgba(248, 243, 234, 0.78);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}

.fk-skill-crafting::before {
    width: 22px;
    height: 22px;
    background: rgba(248, 243, 234, 0.94);
    clip-path: polygon(50% 0, 66% 32%, 100% 42%, 72% 62%, 78% 100%, 50% 82%, 22% 100%, 28% 62%, 0 42%, 34% 32%);
}

.fk-skill-crafting::after {
    width: 18px;
    height: 4px;
    background: #2b211c;
    border-radius: 3px;
    transform: rotate(-36deg) translateY(9px);
}

.fk-skill-emotes::before {
    width: 23px;
    height: 23px;
    background: rgba(248, 243, 234, 0.94);
    border-radius: 999px;
}

.fk-skill-emotes::after {
    top: 20px;
    width: 12px;
    height: 5px;
    border-bottom: 3px solid #2b211c;
    border-radius: 0 0 12px 12px;
    box-shadow: -6px -6px 0 -4px #2b211c, 6px -6px 0 -4px #2b211c;
}

.fk-hotbar strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
}

.fk-cooldown-text {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    color: #fff7d4;
    font-size: 1.15rem;
    font-weight: 1000;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
    transform: translate(-50%, -50%);
}

.fk-chat {
    display: grid;
    gap: 8px;
}

.fk-canvas-chat {
    position: absolute;
    left: 298px;
    right: auto;
    bottom: 84px;
    z-index: 2;
    width: min(410px, calc(100% - 312px));
    padding: 7px;
    background:
        linear-gradient(180deg, rgba(39, 31, 24, 0.88), rgba(13, 10, 8, 0.86)),
        rgba(20, 17, 15, 0.78);
    border-color: rgba(242, 184, 75, 0.22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(10px);
    opacity: 0.92;
    transition: opacity 160ms ease, background 160ms ease;
}

.fk-canvas-chat:hover,
.fk-canvas-chat:focus-within {
    background: rgba(20, 17, 15, 0.92);
    opacity: 1;
}

.fk-chat-log {
    display: grid;
    align-content: end;
    gap: 4px;
    min-height: 160px;
    max-height: 240px;
    overflow: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.fk-canvas-chat .fk-chat-log {
    min-height: 60px;
    max-height: 84px;
    padding: 6px 7px;
}

.fk-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fk-chat-head [data-fk-chat-channel],
.fk-chat-channel-badge {
    display: inline-grid;
    place-items: center;
    min-height: 20px;
    padding: 2px 7px;
    color: #17110c;
    background: var(--fk-gold);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
}

.fk-canvas-chat .fk-kicker {
    margin: 0;
    font-size: 0.68rem;
}

.fk-canvas-chat .fk-chat-form {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 5px;
}

.fk-canvas-chat .fk-chat-form input,
.fk-canvas-chat .fk-chat-form button {
    min-height: 34px;
}

.fk-canvas-chat .fk-chat-line,
.fk-canvas-chat .fk-chat-empty {
    font-size: 0.74rem;
}

.fk-canvas-chat .fk-chat-line {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
}

.fk-chat-time {
    flex: 0 0 auto;
    color: rgba(201, 189, 173, 0.72);
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
}

.fk-canvas-chat .fk-chat-line strong {
    flex: 0 1 auto;
    color: #a9f5ff;
}

.fk-chat-message {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-chat-channel-badge {
    flex: 0 0 auto;
    min-height: 16px;
    padding: 2px 5px;
    color: #f8f3ea;
    background: rgba(142, 181, 255, 0.28);
    border: 1px solid rgba(142, 181, 255, 0.38);
    font-size: 0.58rem;
}

.fk-chat-line[data-channel="Trading"] .fk-chat-channel-badge { background: rgba(242, 184, 75, 0.25); border-color: rgba(242, 184, 75, 0.42); }
.fk-chat-line[data-channel="English"] .fk-chat-channel-badge { background: rgba(57, 183, 197, 0.24); border-color: rgba(57, 183, 197, 0.42); }
.fk-chat-line[data-channel="Dutch"] .fk-chat-channel-badge { background: rgba(232, 93, 69, 0.22); border-color: rgba(232, 93, 69, 0.42); }
.fk-chat-line[data-channel="Help"] .fk-chat-channel-badge { background: rgba(102, 185, 92, 0.24); border-color: rgba(102, 185, 92, 0.42); }
.fk-chat-line[data-channel="Party"] .fk-chat-channel-badge { background: rgba(203, 166, 255, 0.25); border-color: rgba(203, 166, 255, 0.42); }
.fk-chat-line[data-channel="Guild"] .fk-chat-channel-badge { background: rgba(102, 242, 163, 0.22); border-color: rgba(102, 242, 163, 0.42); }

.fk-game-hud {
    position: absolute;
    z-index: 2;
    top: 14px;
    display: grid;
    gap: 8px;
    width: min(270px, calc(50% - 30px));
    max-height: calc(100% - 112px);
    overflow: auto;
    pointer-events: none;
}

.fk-game-hud-left {
    left: 14px;
    max-height: calc(100% - 92px);
}

.fk-game-hud-right {
    right: 178px;
    width: min(260px, calc(50% - 200px));
    max-height: calc(100% - 150px);
}

.fk-hud-panel {
    min-width: 0;
    color: var(--fk-text);
    background: rgba(20, 17, 15, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.fk-hud-panel[open] {
    background: rgba(20, 17, 15, 0.9);
}

.fk-hud-panel summary {
    min-height: 30px;
    padding: 6px 9px;
    color: var(--fk-gold);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    list-style: none;
    text-transform: uppercase;
}

.fk-hud-panel summary::-webkit-details-marker {
    display: none;
}

.fk-hud-panel summary::after {
    content: "+";
    float: right;
    color: var(--fk-muted);
}

.fk-hud-panel[open] summary::after {
    content: "-";
}

.fk-hud-panel .fk-player-card,
.fk-hud-panel .fk-vitals,
.fk-hud-panel .fk-objectives {
    padding: 0 8px 8px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.fk-hud-panel .fk-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 0 8px 6px;
}

.fk-hud-panel .fk-stat-grid div {
    min-height: 30px;
    padding: 3px 4px;
}

.fk-hud-panel .fk-stat-grid span {
    font-size: 0.62rem;
}

.fk-hud-panel .fk-stat-grid strong {
    font-size: 0.76rem;
    white-space: nowrap;
}

.fk-hud-panel .fk-objectives ul {
    max-height: 196px;
    overflow: auto;
}

.fk-hud-panel .fk-objectives li {
    padding: 6px 7px;
    font-size: 0.82rem;
}

.fk-quest-entry {
    display: grid;
    gap: 4px;
}

.fk-quest-entry strong {
    color: var(--fk-text);
    font-size: 0.86rem;
}

.fk-quest-entry small {
    color: var(--fk-muted);
    line-height: 1.22;
}

.fk-quest-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--fk-gold);
    font-size: 0.72rem;
}

.fk-quest-meta em,
.fk-quest-meta i {
    font-style: normal;
    white-space: nowrap;
}

.fk-quest-entry.is-story strong {
    color: #cba6ff;
}

.fk-quest-entry.is-tracked {
    background:
        linear-gradient(90deg, rgba(242, 184, 75, 0.18), transparent 62%),
        rgba(255, 255, 255, 0.055);
    border-color: rgba(242, 184, 75, 0.3);
}

.fk-quest-entry.is-tracked strong::after {
    content: "Tracked";
    margin-left: 6px;
    padding: 2px 5px;
    color: #17110c;
    background: var(--fk-gold);
    border-radius: 5px;
    font-size: 0.58rem;
    font-weight: 1000;
    vertical-align: middle;
}

.fk-quest-entry.is-complete {
    color: var(--fk-muted);
}

.fk-hud-panel .fk-item-row {
    grid-template-columns: 16px minmax(0, 1fr) auto;
}

.fk-hud-panel .fk-equip-button {
    min-height: 26px;
    padding: 0 8px;
}

.fk-character-panel .fk-player-card h2 {
    max-width: 100%;
    font-size: 0.88rem;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-character-panel .fk-player-card p {
    margin: 2px 0 0;
    font-size: 0.68rem;
    line-height: 1.12;
}

.fk-character-panel .fk-vitals {
    gap: 3px;
}

.fk-character-panel .fk-progress span {
    font-size: 0.58rem;
}

.fk-character-panel .fk-progress div {
    height: 6px;
}

.fk-hud-panel [data-fk-equipment] {
    gap: 6px;
}

.fk-bag-summary {
    gap: 8px;
}

.fk-bag-summary p {
    margin: 0;
    color: var(--fk-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.fk-open-window {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    color: var(--fk-text);
    text-align: left;
    background:
        linear-gradient(180deg, rgba(242, 184, 75, 0.2), rgba(99, 68, 34, 0.18)),
        rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(242, 184, 75, 0.28);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
}

.fk-open-window kbd {
    display: grid;
    place-items: center;
    min-width: 26px;
    min-height: 24px;
    color: #17110c;
    background: var(--fk-gold);
    border-radius: 6px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 1000;
}

.fk-equipment-slot {
    min-height: 34px;
}

.fk-game-window {
    position: absolute;
    right: 28px;
    top: 78px;
    z-index: 4;
    display: grid;
    gap: 12px;
    width: min(720px, calc(100% - 56px));
    max-height: calc(100% - 170px);
    min-width: 0;
    padding: 14px;
    color: var(--fk-text);
    background:
        linear-gradient(180deg, rgba(55, 43, 33, 0.96), rgba(18, 13, 10, 0.96)),
        radial-gradient(circle at 20% 0%, rgba(242, 184, 75, 0.16), transparent 42%);
    border: 1px solid rgba(242, 184, 75, 0.32);
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.065);
    overflow: hidden;
    pointer-events: auto;
}

.fk-window-head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(242, 184, 75, 0.22);
}

.fk-window-head h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.05;
}

.fk-window-head button {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin-left: auto;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.28rem;
}

.fk-window-body {
    min-height: 0;
    overflow: auto;
}

.fk-emote-window {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 86px;
    width: min(520px, calc(100% - 56px));
    transform: translateX(-50%);
}

.fk-inventory-window {
    width: min(840px, calc(100% - 56px));
}

.fk-shop-window {
    width: min(760px, calc(100% - 56px));
}

.fk-crafting-window {
    top: 54px;
    width: min(820px, calc(100% - 56px));
    max-height: calc(100% - 286px);
}

.fk-emote-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.fk-emote-grid button,
.fk-player-action-grid button {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 7px 9px;
    color: var(--fk-text);
    text-align: left;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
}

.fk-emote-grid button:hover,
.fk-player-action-grid button:hover {
    border-color: rgba(242, 184, 75, 0.48);
    background: rgba(242, 184, 75, 0.12);
    transform: translateY(-1px);
}

.fk-emote-grid i,
.fk-player-action-grid i {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.28), transparent 24%),
        linear-gradient(145deg, #b4864d, #342119);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;
}

.fk-emote-grid i::before,
.fk-emote-grid i::after,
.fk-player-action-grid i::before,
.fk-player-action-grid i::after {
    content: "";
    position: absolute;
    display: block;
}

.fk-emote-grid i::before,
.fk-action-wave::before,
.fk-action-cheer::before {
    width: 19px;
    height: 19px;
    background: rgba(248, 243, 234, 0.9);
    border-radius: 999px;
}

.fk-emote-grid i::after,
.fk-action-wave::after,
.fk-action-cheer::after {
    top: 17px;
    width: 9px;
    height: 4px;
    border-bottom: 3px solid #2b211c;
    border-radius: 0 0 10px 10px;
}

.fk-emote-grid kbd {
    color: #17110c;
    background: var(--fk-gold);
    border-radius: 5px;
    padding: 2px 5px;
    font: inherit;
    font-size: 0.66rem;
}

.fk-player-actions {
    position: absolute;
    right: 174px;
    top: 190px;
    z-index: 5;
    display: grid;
    gap: 10px;
    width: min(300px, calc(100% - 36px));
    padding: 12px;
    color: var(--fk-text);
    background: linear-gradient(180deg, rgba(42, 32, 25, 0.96), rgba(16, 12, 10, 0.96));
    border: 1px solid rgba(142, 181, 255, 0.36);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.fk-player-actions-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: start;
}

.fk-player-actions-head h2 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.05rem;
}

.fk-player-actions-head span {
    display: block;
    margin-top: 3px;
    color: var(--fk-muted);
    font-size: 0.78rem;
}

.fk-player-actions-head button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    cursor: pointer;
}

.fk-player-action-grid {
    display: grid;
    gap: 7px;
}

.fk-player-action-grid button {
    grid-template-columns: 32px minmax(0, 1fr);
}

.fk-action-party::before {
    width: 18px;
    height: 18px;
    background: rgba(248, 243, 234, 0.9);
    border-radius: 999px;
    box-shadow: 8px 4px 0 -2px rgba(248, 243, 234, 0.78), -8px 4px 0 -2px rgba(248, 243, 234, 0.78);
}

.fk-action-follow::before {
    width: 22px;
    height: 4px;
    background: rgba(248, 243, 234, 0.92);
    border-radius: 4px;
}

.fk-action-follow::after {
    right: 8px;
    width: 11px;
    height: 11px;
    border-top: 4px solid rgba(248, 243, 234, 0.92);
    border-right: 4px solid rgba(248, 243, 234, 0.92);
    transform: rotate(45deg);
}

.fk-inventory-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 14px;
}

.fk-bag-help {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    color: var(--fk-muted);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.fk-bag-help strong {
    color: var(--fk-gold);
}

.fk-bag-help p {
    margin: 0;
    line-height: 1.4;
}

.fk-bag-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.fk-bag-tags span {
    padding: 4px 7px;
    color: #f8f3ea;
    background: rgba(242, 184, 75, 0.14);
    border: 1px solid rgba(242, 184, 75, 0.2);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
}

.fk-shop-layout,
.fk-crafting-layout {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
}

.fk-crafting-layout {
    grid-template-columns: 170px minmax(0, 1fr);
}

.fk-shop-wallet,
.fk-crafting-help {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    color: var(--fk-muted);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.fk-shop-wallet strong,
.fk-crafting-help strong {
    color: var(--fk-gold);
}

.fk-shop-wallet span,
.fk-crafting-help span {
    color: #f8f3ea;
    font-weight: 900;
}

.fk-crafting-help p {
    margin: 0;
    line-height: 1.4;
}

.fk-shop-list,
.fk-crafting-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.fk-shop-item,
.fk-craft-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 76px;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 68px;
    padding: 9px;
    background:
        radial-gradient(circle at 16% 20%, rgba(242, 184, 75, 0.1), transparent 30%),
        rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.fk-craft-item {
    grid-template-columns: 44px minmax(0, 1fr) minmax(150px, 0.8fr) auto 76px;
}

.fk-shop-item.is-unavailable,
.fk-craft-item.is-unavailable {
    opacity: 0.58;
}

.fk-craft-item.is-locked {
    opacity: 0.72;
    background:
        linear-gradient(90deg, rgba(203, 166, 255, 0.11), transparent 32%),
        rgba(255, 255, 255, 0.04);
    border-color: rgba(203, 166, 255, 0.22);
}

.fk-craft-item.is-locked .fk-item-icon {
    filter: grayscale(0.3);
}

.fk-shop-info,
.fk-craft-info {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fk-shop-info strong,
.fk-shop-info small,
.fk-craft-info strong,
.fk-craft-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-shop-info strong,
.fk-craft-info strong {
    color: #f8f3ea;
    font-size: 0.9rem;
    font-weight: 1000;
}

.fk-shop-info small,
.fk-craft-info small {
    color: var(--fk-muted);
    font-size: 0.72rem;
}

.fk-shop-price,
.fk-craft-reward {
    color: var(--fk-gold);
    font-size: 0.78rem;
    font-weight: 1000;
    white-space: nowrap;
}

.fk-shop-price.is-crystals {
    color: #a9f5ff;
}

.fk-craft-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.fk-craft-materials em {
    padding: 3px 6px;
    color: #f8f3ea;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.fk-craft-materials em.needs-material {
    color: #ffd3c6;
    border-color: rgba(255, 155, 138, 0.28);
}

.fk-craft-materials em.has-material {
    color: #d8f0a2;
    border-color: rgba(102, 242, 163, 0.25);
}

.fk-shop-buy,
.fk-craft-button {
    min-height: 36px;
    color: #17110c;
    background: linear-gradient(180deg, #ffd36b, #c58a2f);
    border: 1px solid rgba(255, 231, 163, 0.7);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 1000;
}

.fk-shop-buy:disabled,
.fk-craft-button:disabled {
    color: rgba(248, 243, 234, 0.48);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    cursor: not-allowed;
}

.fk-inventory-window [data-fk-inventory].fk-inventory-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(58px, 1fr));
    gap: 9px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fk-inventory-window .fk-inventory-slot {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 74px;
    padding: 0;
    color: var(--fk-muted);
    text-align: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(145deg, rgba(18, 15, 13, 0.98), rgba(45, 37, 31, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.58), 0 10px 20px rgba(0, 0, 0, 0.25);
    overflow: visible;
}

.fk-bag-slot.is-empty {
    background:
        linear-gradient(145deg, rgba(0, 0, 0, 0.42), rgba(255, 255, 255, 0.035)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px);
}

.fk-bag-slot.is-uncommon { border-color: rgba(102, 185, 92, 0.72); }
.fk-bag-slot.is-rare { border-color: rgba(57, 183, 197, 0.78); }
.fk-bag-slot.is-epic { border-color: rgba(203, 166, 255, 0.84); }
.fk-bag-slot.is-legendary {
    border-color: rgba(242, 184, 75, 0.94);
    box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.24), 0 0 20px rgba(242, 184, 75, 0.14);
}

.fk-inventory-item {
    position: relative;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
    min-height: 70px;
    padding: 6px 5px 5px;
    color: var(--fk-text);
    background: transparent;
    border: 0;
    cursor: default;
}

.fk-inventory-item:is(button) {
    cursor: pointer;
}

.fk-inventory-item:is(button):hover,
.fk-inventory-item:is(button):focus-visible {
    background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--item-color, var(--fk-gold)) 28%, transparent), rgba(255, 255, 255, 0.06));
    transform: translateY(-1px);
}

.fk-item-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 28%),
        linear-gradient(145deg, var(--item-color, #927557), color-mix(in srgb, var(--item-color, #927557) 58%, #090706));
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 6px;
    box-shadow: inset 0 -9px 12px rgba(0, 0, 0, 0.28);
}

.fk-inventory-window .fk-item-icon {
    width: 38px;
    height: 38px;
}

.fk-item-icon::before,
.fk-item-icon::after {
    content: "";
    position: absolute;
    display: block;
}

.fk-icon-weapon::before {
    width: 4px;
    height: 25px;
    background: #f8f3ea;
    border-radius: 2px;
    transform: rotate(42deg);
}

.fk-icon-weapon::after {
    width: 15px;
    height: 4px;
    background: #2b211c;
    transform: rotate(42deg) translateY(8px);
}

.fk-icon-armor::before,
.fk-icon-trinket::before {
    width: 18px;
    height: 22px;
    background: rgba(248, 243, 234, 0.88);
    clip-path: polygon(50% 0, 86% 14%, 78% 72%, 50% 100%, 22% 72%, 14% 14%);
}

.fk-icon-helm::before {
    width: 20px;
    height: 16px;
    background: rgba(248, 243, 234, 0.9);
    border-radius: 11px 11px 4px 4px;
}

.fk-icon-cloak::before {
    width: 20px;
    height: 24px;
    background: rgba(248, 243, 234, 0.88);
    clip-path: polygon(50% 0, 88% 100%, 12% 100%);
}

.fk-icon-potion::before {
    width: 14px;
    height: 20px;
    background: rgba(248, 243, 234, 0.88);
    border-radius: 4px 4px 8px 8px;
}

.fk-icon-potion::after {
    top: 13px;
    width: 10px;
    height: 5px;
    background: #66f2a3;
    border-radius: 0 0 5px 5px;
}

.fk-icon-scroll::before {
    width: 19px;
    height: 23px;
    background: #e7d7b4;
    border-radius: 3px;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.12);
}

.fk-icon-resource::before {
    width: 18px;
    height: 22px;
    background: rgba(248, 243, 234, 0.88);
    clip-path: polygon(50% 0, 72% 32%, 100% 48%, 70% 58%, 60% 100%, 43% 100%, 35% 58%, 0 48%, 28% 32%);
}

.fk-icon-resource::after {
    width: 9px;
    height: 9px;
    background: var(--item-color, #66f2a3);
    border-radius: 50%;
    box-shadow: 0 0 10px color-mix(in srgb, var(--item-color, #66f2a3) 80%, transparent);
}

.fk-icon-loot::before {
    width: 18px;
    height: 18px;
    background: rgba(248, 243, 234, 0.88);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.fk-inventory-slot .fk-item-name {
    width: 100%;
    max-width: 58px;
    color: #f8f3ea;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-inventory-window .fk-inventory-slot .fk-item-name {
    max-width: 72px;
    line-height: 1.05;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fk-item-type {
    color: rgba(220, 208, 190, 0.78);
    font-size: 0.54rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.fk-item-qty {
    position: absolute;
    right: 5px;
    bottom: 4px;
    color: #fff7d4;
    font-size: 0.72rem;
    font-weight: 1000;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.fk-dialogue {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    display: grid;
    gap: 12px;
    width: min(520px, calc(100% - 28px));
    max-height: calc(100% - 28px);
    overflow: auto;
    padding: 14px;
    color: var(--fk-text);
    background: rgba(20, 17, 15, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    transform: translate(-50%, -50%);
    backdrop-filter: blur(14px);
}

.fk-dialogue-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fk-dialogue-head .fk-kicker {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-dialogue-head button {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: auto;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--fk-line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.fk-dialogue h2,
.fk-dialogue p {
    margin: 0;
}

.fk-dialogue h2 {
    font-size: 1.35rem;
    line-height: 1.15;
}

.fk-dialogue p:not(.fk-kicker) {
    color: var(--fk-muted);
    line-height: 1.45;
}

.fk-dialogue-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fk-dialogue-choice {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    padding: 9px 10px;
    color: var(--fk-text);
    text-align: left;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid color-mix(in srgb, var(--choice-tone, var(--fk-gold)) 52%, rgba(255, 255, 255, 0.16));
    border-radius: 8px;
    cursor: pointer;
}

.fk-choice-key {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #17110c;
    background: var(--choice-tone, var(--fk-gold));
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 1000;
}

.fk-dialogue-choice strong,
.fk-dialogue-choice small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-dialogue-choice strong {
    color: var(--choice-tone, var(--fk-gold));
}

.fk-dialogue-choice small {
    color: var(--fk-muted);
    font-size: 0.78rem;
}

.fk-chat-line,
.fk-chat-empty {
    margin: 0;
    color: var(--fk-muted);
    line-height: 1.35;
}

.fk-chat-line strong {
    color: var(--fk-focus);
}

.fk-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 8px;
}

.fk-chat-form input {
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    color: var(--fk-text);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    outline: none;
}

.fk-touch-pad {
    display: none;
    grid-template-columns: repeat(3, 54px);
    grid-template-rows: repeat(3, 54px);
    justify-content: center;
    gap: 8px;
}

.fk-touch-pad button,
.fk-touch-pad-center {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
}

.fk-touch-pad button {
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--fk-line);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.fk-touch-pad-center {
    grid-column: 2;
    grid-row: 2;
    background:
        radial-gradient(circle at 50% 50%, rgba(242, 184, 75, 0.24), transparent 42%),
        rgba(20, 17, 15, 0.5);
    border: 1px solid rgba(242, 184, 75, 0.16);
    pointer-events: none;
}

.fk-touch-pad [data-dir="up"] {
    grid-column: 2;
    grid-row: 1;
}

.fk-touch-pad [data-dir="left"] {
    grid-column: 1;
    grid-row: 2;
}

.fk-touch-pad [data-dir="down"] {
    grid-column: 2;
    grid-row: 3;
}

.fk-touch-pad [data-dir="right"] {
    grid-column: 3;
    grid-row: 2;
}

.fk-player-card {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.fk-player-card h2 {
    overflow-wrap: anywhere;
    font-size: 1.55rem;
    line-height: 1.15;
}

.fk-player-card p:not(.fk-kicker) {
    margin: 0;
    color: var(--fk-muted);
}

.fk-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fk-stat-grid div {
    display: grid;
    gap: 4px;
    min-height: 76px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.fk-stat-grid span,
.fk-progress span {
    color: var(--fk-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.fk-stat-grid strong {
    overflow-wrap: anywhere;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.fk-progress {
    display: grid;
    gap: 8px;
}

.fk-progress div {
    height: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.fk-progress i {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--fk-red), var(--fk-gold), var(--fk-green));
    border-radius: inherit;
    transition: width 180ms ease;
}

.fk-progress-mana i {
    background: linear-gradient(90deg, #3d7dff, var(--fk-focus));
}

.fk-progress-xp i {
    background: linear-gradient(90deg, #cba6ff, var(--fk-gold));
}

.fk-objectives {
    display: grid;
    gap: 9px;
}

.fk-objectives ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fk-objectives li {
    padding: 9px 10px;
    color: var(--fk-muted);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    line-height: 1.35;
}

.fk-item-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.fk-item-row.is-empty {
    grid-template-columns: minmax(0, 1fr);
    opacity: 0.72;
}

.fk-item-swatch {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 5px;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
}

.fk-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-item-power {
    color: var(--fk-text);
    font-size: 0.82rem;
}

.fk-equip-button {
    min-height: 30px;
    padding: 0 10px;
    color: #15100d;
    background: var(--fk-gold);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 900;
}

.fk-equip-button:hover {
    transform: translateY(-1px);
}

.fk-nearby-panel ul {
    max-height: 230px;
    overflow: auto;
}

.fk-nearby-panel .fk-objectives li {
    padding: 5px 6px;
}

.fk-nearby-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 5px;
    row-gap: 4px;
}

.fk-nearby-portrait {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #17110c;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 7px;
    box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.18);
    font-size: 0.7rem;
    font-weight: 900;
}

.fk-nearby-portrait::before {
    content: "";
    width: 11px;
    height: 11px;
    background: rgba(23, 17, 12, 0.72);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.fk-nearby-row.is-hostile .fk-nearby-portrait::before {
    clip-path: polygon(50% 0, 90% 30%, 78% 100%, 50% 78%, 22% 100%, 10% 30%);
}

.fk-nearby-info {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.fk-nearby-info strong,
.fk-nearby-info small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-nearby-info strong {
    color: var(--fk-text);
    font-size: 0.78rem;
    line-height: 1.08;
}

.fk-nearby-info small {
    font-size: 0.68rem;
    line-height: 1.08;
}

.fk-nearby-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    gap: 4px;
}

.fk-nearby-actions button {
    min-height: 20px;
    padding: 0 6px;
    color: var(--fk-text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 800;
}

.fk-nearby-row.is-hostile .fk-nearby-actions button:first-child {
    color: #2b110c;
    background: #ff9b8a;
}

.fk-leaderboard,
.fk-community {
    display: grid;
    gap: 18px;
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 34px 18px 22px;
    border-top: 1px solid var(--fk-line);
}

.fk-section-head {
    display: grid;
    gap: 6px;
}

.fk-section-head h2 {
    font-size: 2rem;
}

.fk-community-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fk-kingdom-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fk-class-grid {
    padding-top: 6px;
}

.fk-kingdom-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border-color: color-mix(in srgb, var(--kingdom-tone, var(--fk-gold)) 42%, rgba(255, 255, 255, 0.12));
}

.fk-community-card {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 16px;
}

.fk-crest {
    width: 48px;
    height: 48px;
}

.fk-kingdom-card h3,
.fk-community-card h3 {
    margin: 0;
    overflow-wrap: anywhere;
}

.fk-kingdom-card p,
.fk-community-card p {
    margin: 0;
    color: var(--fk-muted);
    line-height: 1.45;
}

.fk-leader-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 8px;
    list-style: none;
}

.fk-leader-list > li {
    min-height: 58px;
    padding: 12px;
    color: var(--fk-muted);
}

.fk-leader-entry {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fk-leader-entry:last-child {
    border-bottom: 0;
}

.fk-rank {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #15100d;
    background: var(--fk-gold);
    border-radius: 8px;
    font-weight: 900;
}

.fk-leader-player {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.fk-leader-player strong,
.fk-leader-player small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fk-leader-player strong {
    color: var(--fk-text);
}

.fk-leader-score {
    color: var(--fk-text);
    font-weight: 900;
}

.fk-riftguard [hidden] {
    display: none !important;
}

.fk-riftguard :focus-visible {
    outline: 3px solid rgba(169, 245, 255, 0.6);
    outline-offset: 2px;
}

@media (max-width: 1240px) {
    .fk-play-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .fk-kingdom-grid,
    .fk-community-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fk-canvas-shell {
        width: 100%;
    }

    .fk-game-hud {
        width: min(270px, calc(50% - 22px));
    }

    .fk-game-hud-right {
        top: 154px;
        right: 14px;
        width: min(270px, calc(50% - 22px));
    }

    .fk-hotbar {
        width: min(760px, calc(100% - 32px));
        min-width: 0;
    }

    .fk-canvas-chat {
        width: min(320px, calc(100% - 28px));
    }

    .fk-feature-band,
    .fk-world-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .fk-riftguard {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .fk-topbar {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 10px;
    }

    .fk-nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }

    .fk-nav a {
        flex: 1;
        justify-content: center;
    }

    .fk-auth {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .fk-home-hero {
        min-height: calc(100svh - 122px);
        padding: 32px 18px 72px;
    }

    .fk-home-hero-copy h1 {
        max-width: 11ch;
    }

    .fk-hero-status {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(100%, 320px);
        margin-top: 24px;
    }

    .fk-home-section {
        padding: 38px 12px;
    }

    .fk-feature-band,
    .fk-world-grid {
        grid-template-columns: 1fr;
    }

    .fk-roadmap li {
        grid-template-columns: 1fr;
    }

    .fk-auth-copy {
        padding: 28px;
    }

    .fk-auth-copy h1 {
        max-width: 12ch;
        font-size: 2.6rem;
    }

    .fk-auth-box {
        margin: 0 12px 12px;
    }

    .fk-character-select {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 28px 14px;
    }

    .fk-character-slot {
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 12px;
    }

    .fk-character-portrait {
        width: 104px;
        height: 140px;
    }

    .fk-portrait-cape {
        left: 28px;
        top: 52px;
        width: 50px;
        height: 72px;
    }

    .fk-portrait-body {
        left: 32px;
        top: 64px;
        width: 42px;
        height: 56px;
        box-shadow:
            -17px 8px 0 -9px var(--select-armor, #5b4b86),
            17px 8px 0 -9px var(--select-armor, #5b4b86),
            -10px 54px 0 -7px #1c1713,
            10px 54px 0 -7px #1c1713;
    }

    .fk-portrait-head {
        left: 37px;
        top: 31px;
        width: 31px;
        height: 32px;
    }

    .fk-portrait-helm {
        left: 33px;
        top: 22px;
        width: 39px;
        height: 23px;
    }

    .fk-portrait-weapon {
        right: 17px;
        top: 43px;
        height: 78px;
    }

    .fk-character-portrait[data-class-key="ranger"] .fk-portrait-weapon {
        right: 12px;
        top: 45px;
        width: 34px;
        height: 60px;
    }

    .fk-select-vitals {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fk-launcher-briefing {
        grid-template-columns: 1fr;
    }

    .fk-character-select-actions {
        grid-template-columns: 1fr;
    }

    .fk-roster {
        padding: 12px;
    }

    .fk-roster-list {
        max-height: 220px;
    }

    .fk-roster-slot {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .fk-roster-meta {
        grid-column: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
        text-align: left;
    }

    .fk-create-fields,
    .fk-create-choice-groups,
    .fk-create-choice-grid {
        grid-template-columns: 1fr;
    }

    .fk-hotbar {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 5px;
        bottom: 8px;
        width: calc(100% - 16px);
    }

    .fk-hotbar button {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 50px;
        padding: 5px;
    }

    .fk-hotbar span {
        width: 16px;
        height: 16px;
    }

    .fk-skill-icon {
        width: 30px;
        height: 30px;
    }

    .fk-hotbar strong {
        max-width: 100%;
        font-size: 0.62rem;
        text-align: center;
    }

    .fk-canvas-chat {
        left: 8px;
        right: auto;
        bottom: 70px;
        width: min(320px, calc(100% - 16px));
    }

    .fk-canvas-chat .fk-chat-log {
        min-height: 64px;
        max-height: 92px;
    }

    .fk-canvas-chat .fk-chat-form {
        grid-template-columns: minmax(0, 1fr) 58px;
    }

    .fk-game-hud {
        top: 8px;
        width: min(230px, calc(50% - 12px));
        max-height: calc(100% - 116px);
    }

    .fk-game-hud-left {
        left: 8px;
        max-height: calc(100% - 288px);
    }

    .fk-game-hud-right {
        top: 148px;
        right: 8px;
        width: min(230px, calc(50% - 12px));
    }

    .fk-target-frame {
        top: 8px;
        min-width: 240px;
        width: min(300px, calc(100% - 16px));
    }

    .fk-hud-panel summary {
        min-height: 34px;
        padding: 8px 10px;
    }

    .fk-dialogue-options {
        grid-template-columns: 1fr;
    }

    .fk-game-window {
        left: 8px;
        right: 8px;
        top: 70px;
        width: auto;
        max-height: calc(100% - 150px);
    }

    .fk-emote-window {
        top: auto;
        bottom: 70px;
        transform: none;
    }

    .fk-emote-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fk-player-actions {
        left: 8px;
        right: 8px;
        top: 92px;
        width: auto;
    }

    .fk-inventory-layout {
        grid-template-columns: 1fr;
    }

    .fk-shop-layout,
    .fk-crafting-layout {
        grid-template-columns: 1fr;
    }

    .fk-shop-item,
    .fk-craft-item {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .fk-shop-buy,
    .fk-craft-button {
        grid-column: 2 / 4;
    }

    .fk-craft-materials {
        grid-column: 2 / 4;
    }

    .fk-inventory-window [data-fk-inventory].fk-inventory-grid {
        grid-template-columns: repeat(4, minmax(54px, 1fr));
    }

    .fk-play-grid,
    .fk-leaderboard,
    .fk-community {
        padding-left: 12px;
        padding-right: 12px;
    }

    .fk-left-panel,
    .fk-right-panel {
        grid-template-columns: 1fr;
    }

    .fk-canvas-shell {
        width: 100%;
        min-height: auto;
        max-height: none;
    }

    .fk-touch-pad {
        display: grid;
    }

    .fk-kingdom-grid,
    .fk-community-grid {
        grid-template-columns: 1fr;
    }

    .fk-leader-entry {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .fk-leader-score {
        grid-column: 2;
    }
}

@media (max-width: 782px) {
    body.admin-bar .fk-topbar {
        top: 46px;
    }
}

body.fkrg-site-body {
    margin: 0;
    background: #14110f;
}

body.fkrg-view-play {
    overflow: hidden;
}

.fkrg-view-play .fk-riftguard {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #080706;
}

.fkrg-view-play .fk-main,
.fkrg-view-play .fk-play-grid,
.fkrg-view-play .fk-stage,
.fkrg-view-play .fk-game,
.fkrg-view-play .fk-canvas-shell {
    width: 100%;
    height: 100%;
}

.fkrg-view-play .fk-main {
    display: block;
}

.fkrg-view-play .fk-play-grid {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.fkrg-view-play .fk-stage {
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.fkrg-view-play .fk-auth {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
}

.fkrg-view-play .fk-game {
    padding: 0;
}

.fkrg-view-play .fk-canvas-shell {
    width: 100vw;
    min-height: 100vh;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
}

.fk-panel-logout {
    width: 100%;
    min-height: 24px;
    margin: 3px 0 6px;
    padding: 0 8px;
    font-size: 0.76rem;
}

.fk-riftguard-ranks-page .fk-main,
.fk-riftguard-community-page .fk-main {
    min-height: calc(100vh - 66px);
    padding: 18px;
}

.fk-riftguard-ranks-page .fk-leaderboard,
.fk-riftguard-community-page .fk-community {
    align-content: start;
    border-top: 0;
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1180px), (max-height: 560px) and (max-width: 1180px) and (orientation: landscape) {
    body.fkrg-view-play {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        overscroll-behavior: none;
        touch-action: manipulation;
    }

    .fkrg-view-play .fk-riftguard,
    .fkrg-view-play .fk-main,
    .fkrg-view-play .fk-play-grid,
    .fkrg-view-play .fk-stage,
    .fkrg-view-play .fk-game,
    .fkrg-view-play .fk-canvas-shell {
        width: 100vw;
        height: 100svh;
        min-height: 100svh;
    }

    .fkrg-view-play .fk-auth,
    .fkrg-view-play .fk-character-select {
        height: 100svh;
        min-height: 100svh;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fkrg-view-play .fk-game {
        position: fixed;
        inset: 0;
        overflow: hidden;
    }

    .fkrg-view-play .fk-canvas-shell {
        position: fixed;
        inset: 0;
        overflow: hidden;
        background: #060504;
    }

    .fkrg-view-play .fk-canvas-shell canvas {
        position: absolute;
        left: 50%;
        top: 50%;
        width: max(100vw, calc(100svh * 16 / 9));
        height: max(100svh, calc(100vw * 9 / 16));
        transform: translate(-50%, -50%);
    }

    .fk-mobile-vitals {
        left: max(8px, env(safe-area-inset-left));
        top: max(8px, env(safe-area-inset-top));
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        width: min(210px, calc(100% - 170px));
        padding: 8px 9px;
        background: rgba(20, 17, 15, 0.82);
        border: 1px solid rgba(242, 184, 75, 0.24);
        border-radius: 8px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(10px);
    }

    .fk-mobile-vitals-main strong {
        font-size: 0.86rem;
        line-height: 1.05;
    }

    .fk-mobile-vitals-main span {
        font-size: 0.68rem;
        line-height: 1.05;
    }

    .fk-mobile-toolbar {
        right: max(8px, env(safe-area-inset-right));
        top: max(8px, env(safe-area-inset-top));
        display: flex;
    }

    .fk-target-frame {
        top: calc(max(8px, env(safe-area-inset-top)) + 54px);
        left: 8px;
        right: 8px;
        width: auto;
        min-width: 0;
        transform: none;
    }

    .fk-game-hud {
        top: calc(max(8px, env(safe-area-inset-top)) + 54px);
        width: min(232px, calc(62% - 10px));
        max-height: calc(100svh - 228px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    }

    .fk-riftguard.is-mobile-hud-open .fk-game-hud {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .fk-game-hud-left {
        left: max(8px, env(safe-area-inset-left));
    }

    .fk-game-hud-right {
        right: max(8px, env(safe-area-inset-right));
        top: calc(max(8px, env(safe-area-inset-top)) + 54px);
        width: min(164px, calc(38% - 10px));
        max-height: calc(100svh - 228px);
    }

    .fk-target-frame:not([hidden]) ~ .fk-game-hud {
        top: calc(max(8px, env(safe-area-inset-top)) + 116px);
        max-height: calc(100svh - 292px);
    }

    .fk-hud-panel summary {
        min-height: 38px;
        padding: 9px 10px;
        font-size: 0.74rem;
    }

    .fk-hud-panel .fk-objectives ul {
        max-height: 146px;
    }

    .fk-hud-panel .fk-stat-grid,
    .fk-character-panel .fk-vitals {
        display: none;
    }

    .fk-character-panel .fk-player-card h2 {
        font-size: 0.82rem;
    }

    .fk-canvas-chat {
        left: calc(max(8px, env(safe-area-inset-left)) + 202px);
        right: calc(max(8px, env(safe-area-inset-right)) + 224px);
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 5;
        width: auto;
        min-height: 98px;
        max-height: 98px;
        min-width: 150px;
        overflow: hidden;
        padding: 7px;
        opacity: 0.9;
        transform: none;
        transition: max-height 180ms ease, opacity 160ms ease, transform 180ms ease;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat,
    .fk-canvas-chat:focus-within {
        left: calc(max(8px, env(safe-area-inset-left)) + 202px);
        right: calc(max(8px, env(safe-area-inset-right)) + 224px);
        bottom: max(8px, env(safe-area-inset-bottom));
        max-height: min(184px, 44svh);
        opacity: 1;
        transform: translateY(0);
    }

    .fk-riftguard.is-mobile-chat-open .fk-hotbar,
    .fk-riftguard.is-mobile-chat-open .fk-touch-pad {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .fk-canvas-chat .fk-chat-log {
        min-height: 58px;
        max-height: 62px;
    }

    .fk-canvas-chat .fk-chat-form {
        grid-template-columns: minmax(0, 1fr) 58px;
    }

    .fk-hotbar {
        left: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        grid-template-columns: repeat(3, 62px);
        grid-template-rows: 46px 62px 62px;
        gap: 7px;
        width: auto;
        min-width: 0;
        transform: none;
    }

    .fk-hotbar button {
        grid-template-columns: 1fr;
        justify-items: center;
        min-width: 62px;
        min-height: 62px;
        padding: 5px;
        touch-action: manipulation;
    }

    .fk-hotbar [data-fk-ability="basic-strike"],
    .fk-hotbar [data-fk-ability="class-skill"] {
        grid-row: 2 / span 2;
        min-height: 131px;
    }

    .fk-hotbar [data-fk-ability="basic-strike"] {
        grid-column: 1;
    }

    .fk-hotbar [data-fk-ability="class-skill"] {
        grid-column: 2;
    }

    .fk-hotbar [data-fk-ability="potion"] {
        grid-column: 3;
        grid-row: 2;
    }

    .fk-hotbar [data-fk-ability="portal"] {
        grid-column: 3;
        grid-row: 3;
    }

    .fk-hotbar-tool {
        min-height: 46px;
    }

    .fk-hotbar-backpack {
        grid-column: 1;
        grid-row: 1;
    }

    .fk-hotbar-crafting {
        grid-column: 2;
        grid-row: 1;
    }

    .fk-hotbar-emotes {
        grid-column: 3;
        grid-row: 1;
    }

    .fk-hotbar span {
        position: absolute;
        left: 4px;
        top: 4px;
        width: 16px;
        height: 16px;
        font-size: 0.62rem;
    }

    .fk-hotbar .fk-skill-icon {
        width: 34px;
        height: 34px;
    }

    .fk-hotbar [data-fk-ability="basic-strike"] .fk-skill-icon,
    .fk-hotbar [data-fk-ability="class-skill"] .fk-skill-icon {
        width: 42px;
        height: 42px;
    }

    .fk-hotbar strong {
        max-width: 100%;
        font-size: 0.58rem;
        line-height: 1.05;
        text-align: center;
        white-space: normal;
    }

    .fk-hotbar-tool strong {
        display: none;
    }

    .fk-touch-pad {
        position: absolute;
        left: calc(max(8px, env(safe-area-inset-left)) + 4px);
        bottom: max(8px, env(safe-area-inset-bottom));
        z-index: 4;
        display: grid;
        grid-template-columns: repeat(3, 58px);
        grid-template-rows: repeat(3, 58px);
        gap: 6px;
        pointer-events: auto;
    }

    .fk-touch-pad button,
    .fk-touch-pad-center {
        width: 58px;
        height: 58px;
    }

    .fk-touch-pad button {
        font-size: 1.08rem;
        color: #fff7d4;
        background:
            radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.18), transparent 28%),
            rgba(20, 17, 15, 0.86);
        border: 1px solid rgba(242, 184, 75, 0.34);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
        backdrop-filter: blur(10px);
        touch-action: manipulation;
    }

    .fk-game-window {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        top: auto;
        bottom: calc(74px + env(safe-area-inset-bottom));
        width: auto;
        max-height: min(72svh, calc(100svh - 110px));
        padding: 12px;
        transform: none;
    }

    .fk-emote-window {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(74px + env(safe-area-inset-bottom));
        width: auto;
    }

    .fk-window-head h2 {
        font-size: 1.05rem;
    }

    .fk-inventory-layout,
    .fk-shop-layout,
    .fk-crafting-layout {
        grid-template-columns: 1fr;
    }

    .fk-bag-help,
    .fk-shop-wallet,
    .fk-crafting-help {
        padding: 9px;
    }

    .fk-inventory-window [data-fk-inventory].fk-inventory-grid {
        grid-template-columns: repeat(4, minmax(54px, 1fr));
        gap: 7px;
    }

    .fk-inventory-window .fk-inventory-slot {
        min-height: 66px;
    }

    .fk-inventory-window .fk-item-icon {
        width: 34px;
        height: 34px;
    }

    .fk-dialogue,
    .fk-player-actions {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        width: auto;
        max-height: calc(100svh - 96px);
        transform: none;
    }

    .fk-dialogue {
        top: calc(max(8px, env(safe-area-inset-top)) + 54px);
    }

    .fk-player-actions {
        top: calc(max(8px, env(safe-area-inset-top)) + 64px);
    }
}

@media (max-width: 760px) and (orientation: portrait), (pointer: coarse) and (max-width: 1180px) and (orientation: portrait) {
    .fk-riftguard.is-mobile-client .fk-mobile-orientation {
        display: grid;
    }

    .fk-riftguard.is-mobile-portrait .fk-mobile-vitals,
    .fk-riftguard.is-mobile-portrait .fk-mobile-toolbar,
    .fk-riftguard.is-mobile-portrait .fk-target-frame,
    .fk-riftguard.is-mobile-portrait .fk-game-hud,
    .fk-riftguard.is-mobile-portrait .fk-canvas-chat,
    .fk-riftguard.is-mobile-portrait .fk-hotbar,
    .fk-riftguard.is-mobile-portrait .fk-touch-pad,
    .fk-riftguard.is-mobile-portrait .fk-game-window,
    .fk-riftguard.is-mobile-portrait .fk-dialogue,
    .fk-riftguard.is-mobile-portrait .fk-player-actions {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .fk-riftguard.is-mobile-portrait .fk-canvas-shell canvas {
        filter: saturate(0.78) brightness(0.7);
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1180px), (pointer: coarse) and (orientation: landscape) and (max-width: 1180px) {
    body.fkrg-view-play {
        background: #060504;
        touch-action: none;
    }

    .fkrg-view-play .fk-riftguard,
    .fkrg-view-play .fk-main,
    .fkrg-view-play .fk-play-grid,
    .fkrg-view-play .fk-stage,
    .fkrg-view-play .fk-game,
    .fkrg-view-play .fk-canvas-shell {
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
    }

    .fk-mobile-orientation {
        display: none !important;
    }

    .fk-mobile-vitals,
    .fk-mobile-toolbar,
    .fk-target-frame,
    .fk-game-hud,
    .fk-canvas-chat,
    .fk-hotbar,
    .fk-touch-pad,
    .fk-game-window,
    .fk-dialogue,
    .fk-player-actions {
        position: fixed;
    }

    .fk-mobile-vitals {
        width: min(224px, calc(100% - 166px));
        padding: 7px 9px;
    }

    .fk-mobile-vitals-main strong {
        font-size: 0.82rem;
    }

    .fk-mobile-vitals-main span {
        font-size: 0.64rem;
    }

    .fk-mobile-toolbar {
        gap: 6px;
    }

    .fk-mobile-control {
        width: 42px;
        height: 42px;
    }

    .fk-target-frame {
        left: 50%;
        right: auto;
        top: max(8px, env(safe-area-inset-top));
        width: min(330px, calc(100vw - 360px));
        min-width: 240px;
        transform: translateX(-50%);
    }

    .fk-game-hud {
        top: calc(max(8px, env(safe-area-inset-top)) + 50px);
        width: min(250px, 34vw);
        max-height: calc(100dvh - 126px);
    }

    .fk-game-hud-right {
        top: calc(max(8px, env(safe-area-inset-top)) + 50px);
        width: min(220px, 30vw);
        max-height: calc(100dvh - 126px);
    }

    .fk-target-frame:not([hidden]) ~ .fk-game-hud {
        top: calc(max(8px, env(safe-area-inset-top)) + 72px);
        max-height: calc(100dvh - 144px);
    }

    .fk-canvas-chat {
        left: calc(max(8px, env(safe-area-inset-left)) + 202px);
        right: calc(max(8px, env(safe-area-inset-right)) + 224px);
        bottom: max(8px, env(safe-area-inset-bottom));
        width: auto;
        min-height: 98px;
        max-height: 98px;
        min-width: 150px;
        padding: 7px;
        opacity: 0.9;
        transform: none;
        pointer-events: auto;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat,
    .fk-canvas-chat:focus-within {
        left: calc(max(8px, env(safe-area-inset-left)) + 202px);
        right: calc(max(8px, env(safe-area-inset-right)) + 224px);
        top: auto;
        bottom: max(8px, env(safe-area-inset-bottom));
        min-height: 156px;
        max-height: min(184px, calc(100dvh - 76px));
        opacity: 1;
        transform: translateY(0);
    }

    .fk-canvas-chat .fk-chat-head {
        min-height: 22px;
    }

    .fk-canvas-chat .fk-chat-log {
        min-height: 58px;
        max-height: 62px;
        overflow: hidden;
    }

    .fk-canvas-chat .fk-chat-line,
    .fk-canvas-chat .fk-chat-empty {
        font-size: 0.66rem;
        line-height: 1.22;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fk-canvas-chat .fk-chat-form {
        display: none;
        grid-template-columns: minmax(0, 1fr) 58px;
        gap: 6px;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat .fk-chat-form,
    .fk-canvas-chat:focus-within .fk-chat-form {
        display: grid;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat .fk-chat-log,
    .fk-canvas-chat:focus-within .fk-chat-log {
        min-height: 78px;
        max-height: 88px;
    }

    .fk-canvas-chat .fk-chat-form input,
    .fk-canvas-chat .fk-chat-form button {
        min-height: 38px;
    }

    .fk-canvas-chat .fk-chat-form input {
        touch-action: auto;
        -webkit-user-select: text;
        user-select: text;
    }

    .fk-hotbar {
        left: auto;
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        width: auto;
        min-width: 0;
        grid-template-columns: repeat(3, 62px);
        grid-template-rows: 46px 62px 62px;
        gap: 7px;
        transform: none;
    }

    .fk-hotbar button {
        grid-template-columns: 1fr;
        justify-items: center;
        min-width: 62px;
        min-height: 62px;
        padding: 5px;
        touch-action: manipulation;
    }

    .fk-hotbar [data-fk-ability="basic-strike"],
    .fk-hotbar [data-fk-ability="class-skill"] {
        grid-row: 2 / span 2;
        min-height: 131px;
    }

    .fk-hotbar [data-fk-ability="basic-strike"] {
        grid-column: 1;
    }

    .fk-hotbar [data-fk-ability="class-skill"] {
        grid-column: 2;
    }

    .fk-hotbar [data-fk-ability="potion"] {
        grid-column: 3;
        grid-row: 2;
    }

    .fk-hotbar [data-fk-ability="portal"] {
        grid-column: 3;
        grid-row: 3;
    }

    .fk-hotbar-tool {
        min-height: 46px;
    }

    .fk-hotbar-backpack {
        grid-column: 1;
        grid-row: 1;
    }

    .fk-hotbar-crafting {
        grid-column: 2;
        grid-row: 1;
    }

    .fk-hotbar-emotes {
        grid-column: 3;
        grid-row: 1;
    }

    .fk-hotbar span {
        position: absolute;
        left: 4px;
        top: 4px;
        width: 16px;
        height: 16px;
        font-size: 0.62rem;
    }

    .fk-hotbar .fk-skill-icon {
        width: 34px;
        height: 34px;
    }

    .fk-hotbar [data-fk-ability="basic-strike"] .fk-skill-icon,
    .fk-hotbar [data-fk-ability="class-skill"] .fk-skill-icon {
        width: 42px;
        height: 42px;
    }

    .fk-hotbar strong {
        max-width: 100%;
        font-size: 0.58rem;
        line-height: 1.05;
        text-align: center;
        white-space: normal;
    }

    .fk-hotbar-tool strong {
        display: none;
    }

    .fk-touch-pad {
        left: calc(max(8px, env(safe-area-inset-left)) + 4px);
        bottom: max(8px, env(safe-area-inset-bottom));
        grid-template-columns: repeat(3, 58px);
        grid-template-rows: repeat(3, 58px);
        gap: 6px;
    }

    .fk-touch-pad button,
    .fk-touch-pad-center {
        width: 58px;
        height: 58px;
    }

    .fk-touch-pad button {
        font-size: 1.08rem;
        touch-action: manipulation;
    }

    .fk-game-window,
    .fk-emote-window {
        left: calc(max(8px, env(safe-area-inset-left)) + 162px);
        right: max(8px, env(safe-area-inset-right));
        bottom: calc(70px + env(safe-area-inset-bottom));
        max-height: calc(100dvh - 88px);
    }

    .fk-dialogue,
    .fk-player-actions {
        left: calc(max(8px, env(safe-area-inset-left)) + 162px);
        right: max(8px, env(safe-area-inset-right));
        max-height: calc(100dvh - 84px);
    }
}

@media (max-width: 420px) {
    .fk-character-slot {
        grid-template-columns: 1fr;
    }

    .fk-character-portrait {
        justify-self: center;
    }

    .fk-character-select-info h2 {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        font-size: 1.5rem;
    }

    .fk-select-bars span {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .fk-hotbar {
        right: max(6px, env(safe-area-inset-right));
        grid-template-columns: repeat(3, 56px);
        grid-template-rows: 42px 56px 56px;
        gap: 6px;
        width: auto;
    }

    .fk-hotbar button {
        min-width: 56px;
        min-height: 56px;
    }

    .fk-hotbar [data-fk-ability="basic-strike"],
    .fk-hotbar [data-fk-ability="class-skill"] {
        min-height: 118px;
    }

    .fk-touch-pad {
        left: max(6px, env(safe-area-inset-left));
        grid-template-columns: repeat(3, 52px);
        grid-template-rows: repeat(3, 52px);
        gap: 5px;
    }

    .fk-touch-pad button,
    .fk-touch-pad-center {
        width: 52px;
        height: 52px;
    }

    .fk-canvas-chat {
        left: max(6px, env(safe-area-inset-left));
        right: max(6px, env(safe-area-inset-right));
        bottom: calc(154px + env(safe-area-inset-bottom));
        min-height: 42px;
        max-height: 42px;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat,
    .fk-canvas-chat:focus-within {
        left: max(6px, env(safe-area-inset-left));
        right: max(6px, env(safe-area-inset-right));
        bottom: max(6px, env(safe-area-inset-bottom));
        min-height: 152px;
        max-height: min(178px, calc(100dvh - 60px));
    }

    .fk-canvas-chat .fk-chat-log {
        min-height: 0;
        max-height: 0;
    }

    .fk-riftguard.is-mobile-chat-open .fk-canvas-chat .fk-chat-log,
    .fk-canvas-chat:focus-within .fk-chat-log {
        min-height: 76px;
        max-height: 86px;
    }

    .fk-mobile-vitals {
        width: min(190px, calc(100% - 110px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fk-riftguard *,
    .fk-riftguard *::before,
    .fk-riftguard *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
