/* Fullscreen Game Viewport & HUD Overlay */
.game-view {
    position: fixed;
    inset: 0;
    background: #090c14;
    z-index: 60;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
}

.arena-canvas-wrap {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #141b2c 0%, #070a11 100%);
}

#gameCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    touch-action: none;
}

.hud-top {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
    z-index: 15;
}

.hud-top-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-icon-btn {
    padding: 6px 10px;
    line-height: 1.1;
}

.hud-icon-btn.active {
    background: rgba(0, 229, 255, 0.25);
    border: 1px solid var(--color-cyan);
}

.hud-ping-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00e5ff;
    white-space: nowrap;
}

.hud-panel {
    background: rgba(11, 15, 26, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 8px 13px;
    pointer-events: auto;
}

.hud-alert-banner,
.hud-mode-banner {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 18;
    pointer-events: none;
    text-align: center;
    max-width: calc(100vw - 24px);
    white-space: normal;
}

.hud-alert-banner {
    top: 86px;
    border-color: #ff4757;
    color: #ff8b94;
    font-weight: 800;
}

.hud-cutscene-caption {
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 260px;
    max-width: min(92vw, 560px);
    padding: 10px 18px;
    text-align: center;
    background: linear-gradient(135deg, rgba(24, 10, 14, 0.94), rgba(44, 14, 22, 0.92));
    border: 1.5px solid rgba(255, 71, 87, 0.72);
    border-radius: 12px;
    color: #ffe3e8;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    z-index: 26;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.hud-mode-banner {
    top: 128px;
    border-color: #c77dff;
    color: #e0aaff;
    font-weight: 700;
}

.hud-bonus-box-toast {
    position: absolute;
    top: 84px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
    z-index: 22;
    pointer-events: none;
    padding: 5px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0b0e16;
    background: linear-gradient(135deg, #ffe066 0%, #ffd166 55%, #ff9f43 100%);
    border: 1.5px solid #fff3cc;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 209, 102, 0.78);
    white-space: nowrap;
    animation: bonusBoxToastPop 0.36s cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}

@keyframes bonusBoxToastPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -14px) rotate(-10deg) scale(0.68);
    }
    65% {
        opacity: 1;
        transform: translate(-50%, 2px) rotate(-3deg) scale(1.06);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) rotate(-4deg) scale(1);
    }
}

.hud-controls-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    max-width: 440px;
}

.game-view.is-training #hudCombatExitBtn {
    display: none;
}

.game-view.is-training .hud-top {
    top: 64px;
}

.game-view.is-training .hud-alert-banner {
    top: 138px;
}

.game-view.is-training .hud-mode-banner {
    top: 180px;
}

.boss-hud {
    min-width: 260px;
    max-width: 400px;
    text-align: center;
    padding: 8px 14px;
    border-color: rgba(255, 209, 102, 0.28);
}

.boss-hud-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hp-pips {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 5px 0 6px;
}

.hp-pip {
    width: 32px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    transition: all 0.2s;
}

.hp-pip.filled {
    background: linear-gradient(90deg, #ff4757, #ff6b81);
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.65);
}

.hp-pip.half {
    background: linear-gradient(90deg, var(--color-crimson) 50%, rgba(255, 255, 255, 0.15) 50%);
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.45);
}

.boss-hud-box-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.boss-box-charge-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #cbd5e1;
    white-space: nowrap;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.boss-box-charge-tag.imminent {
    color: #0b0e16;
    background: linear-gradient(90deg, #ffd166, #ffbe3d);
    border-color: #fff3cc;
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.65);
    animation: boxImminentPulse 0.65s ease-in-out infinite alternate;
}

@keyframes boxImminentPulse {
    from { transform: scale(1); opacity: 0.88; }
    to { transform: scale(1.05); opacity: 1; }
}

.fear-bar-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.fear-bar-fill {
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-gold));
    transition: transform 0.12s linear;
}

.fear-bar-fill.imminent {
    background: linear-gradient(90deg, #ffd166, #ff9f43, #fff3cc);
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.85);
}

.boss-state-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    max-width: 100%;
}

.boss-state-chip.state-ability {
    background: rgba(255, 159, 67, 0.18);
    border-color: rgba(255, 159, 67, 0.65);
}

.boss-state-chip.state-ult {
    background: rgba(199, 125, 255, 0.22);
    border-color: rgba(199, 125, 255, 0.82);
    box-shadow: 0 0 12px rgba(199, 125, 255, 0.4);
}

.boss-state-chip.state-box {
    background: rgba(255, 209, 102, 0.2);
    border-color: rgba(255, 209, 102, 0.8);
}

.boss-state-chip.state-vuln {
    background: rgba(255, 71, 87, 0.22);
    border-color: rgba(255, 71, 87, 0.82);
}

.boss-state-chip.state-stunned {
    background: rgba(0, 229, 255, 0.2);
    border-color: rgba(0, 229, 255, 0.72);
}

.hud-phase-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.2;
}

/* 0.5x Slow-Mo Climax Banner */
.hud-climax-banner {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 26;
    width: min(92vw, 410px);
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(8, 12, 22, 0.92);
    border: 1.5px solid rgba(0, 229, 255, 0.65);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 229, 255, 0.25);
    pointer-events: none;
    animation: climaxPop 0.28s ease-out;
}

.hud-climax-banner.climax-defeat {
    border-color: rgba(255, 71, 87, 0.78);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.68), 0 0 24px rgba(255, 71, 87, 0.28);
}

.hud-climax-banner.climax-victory {
    border-color: rgba(46, 213, 115, 0.78);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.68), 0 0 24px rgba(46, 213, 115, 0.28);
}

@keyframes climaxPop {
    from { opacity: 0; transform: translate(-50%, -10px) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.climax-slow-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 229, 255, 0.16);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.4);
    margin-bottom: 6px;
}

.hud-climax-banner.climax-defeat .climax-slow-badge {
    background: rgba(255, 71, 87, 0.18);
    color: #ff8b94;
    border-color: rgba(255, 71, 87, 0.45);
}

.climax-main-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.climax-cause-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.climax-cause-icon .necro-icon {
    width: 38px;
    height: 38px;
}

.climax-text-col {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.climax-title {
    font-size: 0.94rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
}

.climax-cause-text {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.3;
}

.results-cause-box {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    margin: 10px 0 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 71, 87, 0.35);
}

.results-cause-box.victory {
    border-color: rgba(46, 213, 115, 0.38);
}

.results-cause-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    font-weight: 800;
}

.results-cause-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #f8fafc;
}

.results-cause-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-top: 2px;
}

/* Training Arena Bar */
.training-hud-bar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(10, 14, 24, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.45);
    box-shadow: var(--shadow-card);
    max-width: calc(100vw - 24px);
}

.training-hud-bar select, .training-hud-bar label {
    font-size: 0.8rem;
}

.training-hud-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.training-hud-toggle {
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
    border: 1px solid rgba(0, 229, 255, 0.45);
    background: rgba(15, 23, 42, 0.9);
    color: var(--color-cyan);
    cursor: pointer;
}

.training-hud-bar.collapsed {
    top: 8px;
    right: 10px;
    left: auto;
    transform: none;
    padding: 4px;
    border-radius: 999px;
    gap: 0;
}

.training-hud-bar.collapsed .training-hud-content {
    display: none;
}

.game-view.is-training.training-hud-collapsed .hud-top {
    top: 10px;
    padding-right: 46px;
}

.game-view.is-training.training-hud-collapsed .hud-alert-banner {
    top: 84px;
}

.game-view.is-training.training-hud-collapsed .hud-mode-banner {
    top: 128px;
}

.touch-joystick-zone.sprint-active {
    border-color: var(--color-gold);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.55);
}

.touch-joystick-zone.sprint-active .touch-joystick-knob {
    background: rgba(255, 209, 102, 0.85);
    box-shadow: 0 0 16px rgba(255, 209, 102, 0.75);
}

.touch-editor-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    color: #e2e8f0;
    cursor: pointer;
    user-select: none;
}

.touch-editor-toggle input {
    accent-color: var(--color-cyan);
}

.hud-bottom {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
    z-index: 15;
}

.runner-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-color: rgba(0, 229, 255, 0.25);
}

.runner-vitals-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 132px;
}

.runner-hearts-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
    color: #ff4757;
}

.hud-heart-pip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    border-radius: 7px;
    font-size: 0.88rem;
    line-height: 1;
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.62);
    color: #ff6b81;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.32);
}

.hud-heart-pip.lost {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.24);
    color: rgba(148, 163, 184, 0.42);
    box-shadow: none;
}

.runner-hearts-row.critical .hud-heart-pip:not(.lost) {
    animation: heartCriticalPulse 0.55s ease-in-out infinite alternate;
}

@keyframes heartCriticalPulse {
    from { transform: scale(1); opacity: 0.85; }
    to { transform: scale(1.1); opacity: 1; }
}

.runner-stamina-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hud-stamina-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 700;
    white-space: nowrap;
}

.stamina-track {
    flex: 1;
    min-width: 112px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.stamina-fill {
    height: 100%;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left center;
    background: linear-gradient(90deg, #00e5ff, #38bdf8);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.45);
    transition: transform 0.08s linear;
}

.stamina-fill.low {
    background: linear-gradient(90deg, #ff4757, #ffd166);
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.55);
}

.runner-weapon-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hud-pc-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 8px;
}

.hud-pc-btn {
    width: 54px;
    height: 54px;
}

.skill-slot {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.74rem;
    min-width: 68px;
    cursor: pointer;
}

.skill-slot.ready {
    border-color: var(--color-gold);
}

.skill-slot.depleted {
    opacity: 0.42;
}

/* Mobile Touch Controls */
.touch-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    display: none;
}

.touch-joystick-zone {
    position: absolute;
    left: 18px;
    bottom: 22px;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.18);
    pointer-events: auto;
    touch-action: none;
}

.touch-joystick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.65);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
    pointer-events: none;
}

.touch-buttons {
    position: absolute;
    right: 18px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.touch-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.26);
    background: rgba(11, 15, 26, 0.86);
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    gap: 1px;
    line-height: 1.05;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.touch-btn-label {
    font-size: 0.68rem;
    font-weight: 800;
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.touch-btn-sub {
    font-size: 0.58rem;
    font-weight: 700;
    opacity: 0.9;
    max-width: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.touch-btn.active {
    transform: scale(0.94);
    background: rgba(0, 229, 255, 0.35);
    border-color: var(--color-cyan);
}

/* Concentric Rings & Skill Colors for Cycling Skill Button */
.touch-btn--skill.ring-count-0.skill-color-0 {
    border-color: rgba(255, 255, 255, 0.28);
}

.touch-btn--skill.ring-count-1.skill-color-1 {
    border-color: #00e5ff;
    color: #c2f8ff;
    box-shadow: 0 0 0 3px #00e5ff, 0 0 12px rgba(0, 229, 255, 0.5);
}

.touch-btn--skill.ring-count-2.skill-color-2 {
    border-color: #ffd166;
    color: #fff3cc;
    box-shadow: 0 0 0 3px #ffd166, 0 0 0 6px rgba(11, 15, 26, 0.9), 0 0 0 8px #ffd166, 0 0 14px rgba(255, 209, 102, 0.55);
}

.touch-btn--skill.ring-count-3.skill-color-3 {
    border-color: #c77dff;
    color: #f3e8ff;
    box-shadow: 0 0 0 2px #c77dff, 0 0 0 5px rgba(11, 15, 26, 0.9), 0 0 0 7px #c77dff, 0 0 0 10px rgba(11, 15, 26, 0.9), 0 0 0 12px #c77dff, 0 0 16px rgba(199, 125, 255, 0.6);
}

.touch-btn--skill.depleted {
    opacity: 0.62;
}

/* Shared Use / Knife / Pistol Action Button States */
.touch-btn--action.action-mode-knife.knife-ready {
    border-color: #2ed573;
    background: rgba(46, 213, 115, 0.24);
    box-shadow: 0 0 12px rgba(46, 213, 115, 0.42);
}

.touch-btn--action.action-mode-pistol.pistol-ready {
    border-color: #ffd166;
    background: rgba(255, 209, 102, 0.24);
    box-shadow: 0 0 14px rgba(255, 209, 102, 0.48);
}

.touch-btn--action.action-mode-buff.buff-ready {
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.26);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.55);
}

.touch-btn--action.action-mode-ghost.ghost-ping-ready {
    border-color: #c77dff;
    background: rgba(199, 125, 255, 0.24);
    box-shadow: 0 0 12px rgba(199, 125, 255, 0.45);
}

.touch-btn--action.action-mode-skill-1 {
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.22);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.touch-btn--action.action-mode-skill-2 {
    border-color: #ffd166;
    background: rgba(255, 209, 102, 0.22);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.45);
}

.touch-btn--action.action-mode-skill-3 {
    border-color: #c77dff;
    background: rgba(199, 125, 255, 0.24);
    box-shadow: 0 0 12px rgba(199, 125, 255, 0.48);
}

/* Custom Touch Layout & Live Layout Editor */
.touch-controls.custom-layout .touch-buttons {
    position: static;
    width: 0;
    height: 0;
    display: block;
    pointer-events: none;
}

.touch-controls.custom-layout .touch-joystick-zone,
.touch-controls.custom-layout .touch-btn {
    position: absolute;
    right: auto;
    bottom: auto;
    margin: 0;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.touch-controls.custom-layout .touch-btn.active {
    transform: translate(-50%, -50%) scale(0.94);
}

.touch-controls.custom-layout .touch-btn-label {
    font-size: clamp(0.55rem, calc(var(--touch-btn-size, 56px) * 0.2), 1.15rem);
    max-width: calc(var(--touch-btn-size, 56px) - 8px);
}

.touch-controls.custom-layout .touch-btn-sub {
    font-size: clamp(0.48rem, calc(var(--touch-btn-size, 56px) * 0.16), 0.92rem);
    max-width: calc(var(--touch-btn-size, 56px) - 10px);
}

.touch-controls.layout-editing {
    display: block !important;
    z-index: 32;
}

.touch-controls.layout-editing .touch-joystick-zone,
.touch-controls.layout-editing .touch-btn {
    cursor: grab;
    outline: 1.5px dashed rgba(255, 255, 255, 0.48);
    outline-offset: 3px;
}

.touch-controls.layout-editing .layout-selected {
    outline: 2.5px solid var(--color-cyan);
    outline-offset: 4px;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}

.game-view.layout-editing .hud-top,
.game-view.layout-editing .hud-bottom,
.game-view.layout-editing .training-hud-bar {
    opacity: 0.35;
    pointer-events: none;
}

.touch-editor-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
}

.touch-editor-overlay.dock-bottom {
    align-items: flex-end;
}

.touch-editor-panel {
    pointer-events: auto;
    width: min(440px, 100%);
    background: rgba(10, 14, 24, 0.94);
    border: 1px solid rgba(0, 229, 255, 0.5);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
}

.touch-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.touch-editor-orient {
    display: flex;
    align-items: center;
    gap: 4px;
}

.touch-editor-hint {
    font-size: 0.74rem;
    color: var(--color-muted);
}

.touch-editor-size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.touch-editor-selected {
    font-weight: 700;
    color: var(--color-cyan);
    font-size: 0.78rem;
}

.touch-editor-slider-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.touch-editor-slider-group input[type="range"] {
    width: 110px;
    accent-color: var(--color-cyan);
}

.touch-editor-size-val {
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.touch-editor-export {
    width: 100%;
}

.touch-editor-textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(6, 9, 16, 0.95);
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    padding: 6px 8px;
    resize: vertical;
}

.touch-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.74rem;
    border-radius: 8px;
}

.touch-editor-orient .btn-xs.active {
    background: rgba(0, 229, 255, 0.25);
    border-color: var(--color-cyan);
    color: #fff;
}

.touch-btn.skill-expiring-blink {
    animation: skillExpiringBlink 0.22s ease-in-out infinite alternate;
}

@keyframes skillExpiringBlink {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0.28;
    }
}
