/* Style edytora IDE (zakładki plików .java, kolorowanie składni, konsola i pływający czat Fuksio AI) */

:root {
    --ide-surface: rgba(255, 255, 255, 0.55);
    --ide-pane-bg: rgba(255, 255, 255, 0.72);
    --ide-code-bg: rgba(252, 249, 244, 0.85);
    --ide-terminal-bg: rgba(34, 26, 22, 0.94);
    --ide-terminal-text: #f5ede6;
    --ide-gutter-bg: rgba(44, 34, 30, 0.04);
    --ide-gutter-text: rgba(92, 71, 56, 0.45);
    --ide-tab-active: #ffffff;
}

body.dark-mode {
    --ide-surface: rgba(15, 20, 32, 0.75);
    --ide-pane-bg: rgba(11, 15, 25, 0.78);
    --ide-code-bg: rgba(9, 13, 22, 0.92);
    --ide-terminal-bg: rgba(7, 10, 18, 0.96);
    --ide-terminal-text: #e6edf3;
    --ide-gutter-bg: rgba(255, 255, 255, 0.025);
    --ide-gutter-text: rgba(139, 148, 158, 0.45);
    --ide-tab-active: rgba(22, 30, 46, 0.95);
}

.ide-wrapper {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 115px 24px 60px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

/* Subtelna poświata w tle za edytorem */
.ide-wrapper::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 480px;
    height: 320px;
    background: var(--accent-orange);
    opacity: 0.12;
    filter: blur(110px);
    -webkit-filter: blur(110px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Główne okno IDE */
.task-panel {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: var(--ide-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 20px;
    box-shadow: 
        0 18px 45px -15px rgba(0, 0, 0, 0.09),
        inset 0 1px 1px rgba(255, 255, 255, 0.65);
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

body.dark-mode .task-panel {
    box-shadow: 
        0 22px 55px -15px rgba(0, 0, 0, 0.55),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--hairline-border);
}

.task-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.task-number {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    border: 1px solid var(--hairline-border);
}

.task-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.task-difficulty {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.task-difficulty.easy {
    background: rgba(39, 201, 63, 0.15);
    color: #27c93f;
    border: 1px solid rgba(39, 201, 63, 0.3);
}

.task-difficulty.medium {
    background: color-mix(in srgb, var(--accent-orange) 15%, transparent);
    color: var(--accent-orange);
    border: 1px solid color-mix(in srgb, var(--accent-orange) 32%, transparent);
}

.task-difficulty.hard {
    background: rgba(255, 95, 86, 0.15);
    color: #ff5f56;
    border: 1px solid rgba(255, 95, 86, 0.3);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-solved-pill[hidden] {
    display: none !important;
}

.task-solved-pill {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(39, 201, 63, 0.16);
    color: #27c93f;
    border: 1px solid rgba(39, 201, 63, 0.34);
}

.task-next-pill {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    text-decoration: none;
    background: var(--subtle-pill-bg);
    color: var(--text-primary);
    border: 1px solid var(--hairline-border);
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.task-next-pill:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateX(2px);
}

.task-xp {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-orange) 15%, transparent);
    color: var(--accent-orange);
    border: 1px solid color-mix(in srgb, var(--accent-orange) 30%, transparent);
}

.task-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.task-body {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 20px;
    align-items: center;
}

@media (max-width: 860px) {
    .task-body {
        grid-template-columns: 1fr;
    }
}

.task-description p {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.task-description code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.86rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--subtle-pill-bg);
    color: var(--accent-orange);
    border: 1px solid var(--hairline-border);
}

.task-expected {
    background: var(--ide-gutter-bg);
    border: 1px solid var(--hairline-border);
    border-radius: 12px;
    padding: 10px 14px;
}

.expected-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.task-expected pre {
    margin: 0;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.ide-window {
    position: relative;
    z-index: 1;
    background: var(--ide-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 22px;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.12),
        inset 0 1px 1px rgba(255, 255, 255, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

body.dark-mode .ide-window {
    box-shadow: 
        0 30px 70px -15px rgba(0, 0, 0, 0.65),
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

/* PASEK NARZĘDZIOWY (TOOLBAR) */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--hairline-border);
    gap: 16px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.window-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ide-project-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* PASEK ZAKŁADEK PLIKÓW (MULTI-FILE TABS) */
.file-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 0;
    background: var(--ide-gutter-bg);
    border-bottom: 1px solid var(--hairline-border);
}

.file-tabs-list {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

.file-tabs-list::-webkit-scrollbar {
    display: none;
}

.file-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.file-tab:hover {
    color: var(--text-primary);
    background: color-mix(in srgb, var(--ide-tab-active) 50%, transparent);
}

.file-tab.active {
    background: var(--ide-code-bg);
    border-color: var(--hairline-border);
    color: var(--text-primary);
    box-shadow: inset 0 2px 0 var(--accent-orange);
}

.tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 2px;
    border-radius: 50%;
    font-size: 0.72rem;
    line-height: 1;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.tab-close:hover {
    opacity: 1;
    background: rgba(255, 95, 86, 0.2);
    color: #ff5f56;
}

.add-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px dashed color-mix(in srgb, var(--accent-orange) 40%, transparent);
    background: color-mix(in srgb, var(--accent-orange) 10%, transparent);
    color: var(--accent-orange);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.add-tab-btn:hover {
    background: var(--accent-orange);
    color: #fff;
    border-style: solid;
    transform: translateY(-1px);
}

body.dark-mode .add-tab-btn:hover {
    color: #0b0f19;
}

.add-plus {
    font-size: 0.95rem;
    line-height: 1;
}

.env-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-orange) 12%, transparent);
    color: var(--accent-orange);
    border: 1px solid color-mix(in srgb, var(--accent-orange) 25%, transparent);
    letter-spacing: 0.02em;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-reset {
    padding: 8px 14px;
    font-size: 0.86rem;
    border-radius: 10px;
}

.btn-run {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 0.9rem;
    border-radius: 10px;
    background: var(--accent-orange);
    color: #fff;
    box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--accent-orange) 55%, transparent);
}

body.dark-mode .btn-run {
    color: #0b0f19;
}

.btn-run:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.btn-run:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* OBSZAR ROBOCZY (2 PANELE) */
.editor-container {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    min-height: 540px;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 960px) {
    .editor-container {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* LEWY PANEL: EDYTOR */
.editor-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    border-right: 1px solid var(--hairline-border);
    background: var(--ide-code-bg);
    transition: background-color 0.35s ease;
}

.pane-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--hairline-border);
    background: var(--ide-gutter-bg);
}

.shortcut-hint {
    font-weight: 500;
    opacity: 0.75;
    text-transform: none;
}

.code-area-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.line-numbers {
    padding: 18px 12px 18px 16px;
    background: var(--ide-gutter-bg);
    border-right: 1px solid var(--hairline-border);
    color: var(--ide-gutter-text);
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
    /*
     * Rozmiar minimum 16px (albo 1rem, gdy użytkownik powiększy tekst w panelu dostępności):
     * zapobiega automatycznemu zoomowi iOS Safari oraz gwarantuje idealne wyrównanie z kodem.
     */
    font-size: max(16px, 1rem);
    font-weight: 400;
    line-height: 1.5;
    text-align: right;
    user-select: none;
    display: flex;
    flex-direction: column;
    min-width: 48px;
    overflow: hidden;
}

.line-numbers span {
    display: block;
    flex-shrink: 0;
}

.code-stage {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    min-height: 480px;
    overflow: visible;
}

#code-highlight,
#code-editor {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 18px 20px;
    border: none;
    outline: none;
    resize: none;
    box-sizing: border-box;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
    /* Identyczna typografia jak w .line-numbers (max(16px, 1rem)), by uniknąć zoomu na iPhone i utrzymać idealny kursor */
    font-size: max(16px, 1rem);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    letter-spacing: 0;
    word-spacing: 0;
    font-variant-ligatures: none;
    font-kerning: none;
    font-feature-settings: "liga" 0, "calt" 0;
    text-rendering: optimizeSpeed;
    tab-size: 4;
    -moz-tab-size: 4;
    white-space: pre;
    overflow: auto;
}

#code-highlight {
    pointer-events: none;
    z-index: 1;
    color: var(--text-primary);
    background: transparent;
    scrollbar-color: transparent transparent;
}

#code-highlight::-webkit-scrollbar {
    background: transparent;
}

#code-highlight::-webkit-scrollbar-thumb,
#code-highlight::-webkit-scrollbar-track,
#code-highlight::-webkit-scrollbar-corner {
    background: transparent;
}

#code-highlight code,
#code-highlight span {
    font-family: inherit;
    font-size: inherit;
    font-weight: 400;
    font-style: normal;
    line-height: inherit;
    letter-spacing: 0;
    word-spacing: 0;
    font-variant-ligatures: none;
    font-kerning: none;
    font-feature-settings: "liga" 0, "calt" 0;
}

#code-editor {
    z-index: 2;
    color: transparent;
    -webkit-text-fill-color: transparent;
    caret-color: var(--accent-orange);
    background: transparent;
}

#code-editor::selection {
    background: color-mix(in srgb, var(--accent-orange) 28%, transparent);
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Kolorowanie składni Javy (stała szerokość znaków bez bold/italic zapobiega rozjazdowi kursora) */
.hl-keyword   { color: #c678dd; }
.hl-type      { color: #e5c07b; }
.hl-string    { color: #50a14f; }
.hl-number    { color: #d19a66; }
.hl-comment   { color: #7f848e; }
.hl-method    { color: #4078f2; }

body.dark-mode .hl-string  { color: #98c379; }
body.dark-mode .hl-method  { color: #61afef; }

/* PRAWY PANEL: TERMINAL */
.output-pane {
    display: flex;
    flex-direction: column;
    background: var(--ide-pane-bg);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid var(--hairline-border);
    background: var(--ide-gutter-bg);
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-icon {
    font-family: monospace;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--accent-orange);
    background: color-mix(in srgb, var(--accent-orange) 14%, transparent);
    padding: 2px 7px;
    border-radius: 6px;
}

.output-header h3 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

/* Status pigułka */
#execution-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 999px;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

#execution-status .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

#execution-status.status-running {
    background: color-mix(in srgb, var(--accent-orange) 18%, transparent);
    color: var(--accent-orange);
}

#execution-status.status-running .status-dot {
    animation: pulseDot 1s infinite ease-in-out;
}

#execution-status.status-success {
    background: rgba(39, 201, 63, 0.16);
    color: #27c93f;
}

#execution-status.status-error {
    background: rgba(255, 95, 86, 0.16);
    color: #ff5f56;
}

#execution-status.status-partial {
    background: rgba(255, 189, 46, 0.16);
    color: #f5b400;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
}

.terminal-body {
    flex: 1;
    margin: 14px;
    padding: 18px;
    border-radius: 14px;
    background: var(--ide-terminal-bg);
    color: var(--ide-terminal-text);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.terminal-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
}

.terminal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-top: 1px solid var(--hairline-border);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

/* Okienko Fuksio AI w rogu ekranu */
.fuksio-widget {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 950;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

/* Przycisk wyzwalacza (Launcher) */
.fuksio-Launcher {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px 8px 8px;
    border-radius: 999px;
    background: var(--glass-bg-compact-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 
        0 14px 34px -8px rgba(0, 0, 0, 0.18),
        0 0 0 1px color-mix(in srgb, var(--accent-orange) 25%, transparent);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.fuksio-Launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 18px 40px -8px rgba(0, 0, 0, 0.25),
        0 0 0 2px var(--accent-orange);
}

.launcher-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-orange) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--accent-orange);
}

.launcher-avatar img {
    width: 115%;
    height: 115%;
    object-fit: cover;
    transform: translateY(3px);
}

.launcher-label {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.launcher-greeting {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.launcher-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Okno czatu (Dymek) */
.fuksio-chat-window {
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 490px;
    margin-bottom: 14px;
    border-radius: 22px;
    background: var(--glass-bg-compact-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.88) translateY(16px);
    pointer-events: none;
    transition: 
        opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.28s;
}

.fuksio-widget.is-open .fuksio-chat-window {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Nagłówek czatu */
.fuksio-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: color-mix(in srgb, var(--accent-orange) 10%, transparent);
    border-bottom: 1px solid var(--hairline-border);
}

.fuksio-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fuksio-avatar-small {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent-orange) 20%, transparent);
    border: 1.5px solid var(--accent-orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fuksio-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #27c93f;
    border: 2px solid var(--bg-color);
}

.fuksio-chat-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.fuksio-subtitle {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.fuksio-close-btn {
    background: var(--subtle-pill-bg);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.fuksio-close-btn:hover {
    background: rgba(255, 95, 86, 0.15);
    color: #ff5f56;
}

/* Lista wiadomości */
.fuksio-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
}

.chat-msg.fuksio {
    align-self: flex-start;
}

.chat-msg.user {
    align-self: flex-end;
}

.msg-bubble {
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 0.86rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-msg.fuksio .msg-bubble {
    background: var(--subtle-pill-bg);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--hairline-border);
}

.chat-msg.user .msg-bubble {
    background: var(--accent-orange);
    color: #fff;
    border-bottom-right-radius: 4px;
}

body.dark-mode .chat-msg.user .msg-bubble {
    color: #0b0f19;
    font-weight: 600;
}

/* Szybkie podpowiedzi (Chips) */
.fuksio-quick-chips {
    display: flex;
    gap: 6px;
    padding: 0 14px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.fuksio-quick-chips::-webkit-scrollbar {
    display: none;
}

.chip-btn {
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    border: 1px solid var(--hairline-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

/* Pole wpisywania wiadomości */
.fuksio-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--hairline-border);
    background: var(--ide-gutter-bg);
}

.fuksio-chat-input input {
    flex: 1;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--hairline-border);
    background: var(--ide-code-bg);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.fuksio-chat-input input:focus {
    border-color: var(--accent-orange);
}

.fuksio-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent-orange);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

body.dark-mode .fuksio-send-btn {
    color: #0b0f19;
}

.fuksio-send-btn:hover {
    transform: scale(1.08);
}

/* Podpowiedzi składni (Autocomplete) */
.autocomplete-popup[hidden] {
    display: none !important;
}

.autocomplete-popup {
    position: absolute;
    z-index: 30;
    min-width: 280px;
    max-width: 380px;
    max-height: 230px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 14px;
    background: var(--glass-bg-compact-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 
        0 18px 42px -10px rgba(0, 0, 0, 0.25),
        0 0 0 1px color-mix(in srgb, var(--accent-orange) 18%, transparent);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.dark-mode .autocomplete-popup {
    background: rgba(16, 22, 36, 0.95);
    box-shadow: 
        0 20px 45px -10px rgba(0, 0, 0, 0.65),
        0 0 0 1px color-mix(in srgb, var(--accent-orange) 22%, transparent);
}

.ac-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    color: var(--text-primary);
    transition: background-color 0.12s ease;
}

.ac-item:hover,
.ac-item.active {
    background: color-mix(in srgb, var(--accent-orange) 16%, transparent);
}

.ac-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ac-kind {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 5px;
    flex-shrink: 0;
}

.ac-kind-snippet {
    background: color-mix(in srgb, var(--accent-orange) 20%, transparent);
    color: var(--accent-orange);
}

.ac-kind-class {
    background: rgba(229, 192, 123, 0.22);
    color: #c58f2b;
}

body.dark-mode .ac-kind-class {
    color: #e5c07b;
}

.ac-kind-keyword {
    background: rgba(198, 120, 221, 0.2);
    color: #a64ac9;
}

body.dark-mode .ac-kind-keyword {
    color: #c678dd;
}

.ac-kind-method {
    background: rgba(64, 120, 242, 0.18);
    color: #4078f2;
}

body.dark-mode .ac-kind-method {
    color: #61afef;
}

.ac-label {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.ac-match {
    color: var(--accent-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ac-detail {
    font-size: 0.74rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-hint {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    border: 1px solid var(--hairline-border);
    flex-shrink: 0;
}

/* Modal nowej klasy Java */
.ide-modal-backdrop[hidden] {
    display: none !important;
}

.ide-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(10, 14, 23, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ide-modal {
    width: 100%;
    max-width: 420px;
    padding: 24px;
    border-radius: 20px;
    background: var(--glass-bg-compact-hover);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
}

.ide-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ide-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.ide-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ide-modal-close:hover {
    background: rgba(255, 95, 86, 0.16);
    color: #ff5f56;
}

.ide-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ide-modal-form label {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.ide-modal-form code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    color: var(--accent-orange);
    font-weight: 700;
}

.new-file-input-row {
    display: flex;
    align-items: center;
    border-radius: 12px;
    border: 1px solid var(--hairline-border);
    background: var(--ide-code-bg);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.new-file-input-row:focus-within {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-orange) 15%, transparent);
}

.new-file-input-row input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 12px 14px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.file-ext-pill {
    padding: 6px 12px;
    margin-right: 6px;
    border-radius: 8px;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.new-file-error {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ff5f56;
}

.ide-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* Układ edytora pod telefon (desktop > 640px zostaje bez zmian) */
.task-collapse-btn {
    display: none;
}

@media (max-width: 820px) {
    .mobile-dock {
        transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    }

    body.editor-mobile-focus .mobile-dock {
        opacity: 0;
        transform: translate3d(-50%, calc(100% + 28px), 0);
        pointer-events: none;
    }

    body.editor-mobile-focus .fuksio-widget:not(.is-open) {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
        pointer-events: none;
    }

    .editor-pane #code-highlight,
    .editor-pane #code-editor,
    .editor-pane #code-highlight code {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
        overflow-x: hidden;
        tab-size: 2;
        -moz-tab-size: 2;
    }
}

@media (max-width: 640px) {
    .ide-wrapper.ide-wrapper {
        padding: 72px 14px 86px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .ide-wrapper .task-panel {
        padding: 10px 12px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .ide-wrapper .task-header {
        gap: 8px;
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .ide-wrapper .task-title {
        font-size: 1rem;
    }

    .ide-wrapper .task-collapse-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        border-radius: 999px;
        border: 1px solid var(--hairline-border);
        background: var(--subtle-pill-bg);
        color: var(--text-secondary);
        font-family: inherit;
        font-size: 0.74rem;
        font-weight: 700;
        cursor: pointer;
        touch-action: manipulation;
    }

    .ide-wrapper .task-panel.is-collapsed .task-header {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .ide-wrapper .task-panel.is-collapsed .task-body,
    .ide-wrapper .task-panel.is-collapsed .task-guest-limit-banner {
        display: none;
    }

    .ide-wrapper .ide-window {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 18px;
        overflow: hidden;
        /* Na iOS Safari backdrop-filter nad overflow:auto textarea wywołuje skoki fokusa */
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--ide-pane-bg);
    }

    .ide-wrapper .editor-container {
        min-height: 0;
        width: 100%;
        max-width: 100%;
    }

    .ide-wrapper .toolbar {
        padding: 6px 10px;
        gap: 8px;
    }

    .ide-wrapper .toolbar-left {
        display: none;
    }

    .ide-wrapper .toolbar-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .ide-wrapper .toolbar-right .btn-run,
    .ide-wrapper .toolbar-right .btn-reset {
        flex: 1;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
        font-size: 0.78rem;
        padding: 7px 10px;
        min-height: 34px;
        border-radius: 9px;
    }

    .editor-pane .file-tabs-bar {
        padding: 4px 8px 0;
        gap: 6px;
    }

    .editor-pane .file-tab {
        padding: 5px 9px;
        font-size: 0.76rem;
        min-height: 30px;
        touch-action: manipulation;
    }

    .editor-pane .add-tab-btn {
        margin-bottom: 3px;
        padding: 4px 8px;
        font-size: 0.72rem;
        min-height: 26px;
        touch-action: manipulation;
    }

    .editor-pane .pane-subheader {
        display: none;
    }

    .ide-wrapper .editor-pane {
        min-height: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .editor-pane .code-area-wrapper {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        height: var(--mobile-code-height, clamp(176px, 26dvh, 210px));
        min-height: 168px;
        max-height: 220px;
        overflow: hidden;
    }

    .editor-pane .code-stage {
        height: 100%;
        min-height: 0;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .editor-pane .line-numbers {
        box-sizing: border-box;
        height: 100%;
        padding: 12px 5px 12px 6px;
        min-width: 26px;
        /* Zachowujemy rozmiar max(16px, 1rem) z reguły głównej — proporcjonalna interlinia bez auto-zoomu iOS */
        line-height: 1.45;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .editor-pane #code-highlight,
    .editor-pane #code-editor {
        padding: 12px 10px;
        line-height: 1.45;
        tab-size: 2;
        -moz-tab-size: 2;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .editor-pane #code-highlight code {
        font: inherit;
        line-height: inherit;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .editor-pane #code-editor {
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        scroll-margin-top: 74px;
        scroll-margin-bottom: 12px;
    }

    .editor-pane .autocomplete-popup {
        min-width: 210px;
        width: min(310px, calc(100vw - 44px));
        max-width: calc(100vw - 44px);
        max-height: 135px;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .editor-pane .ac-item {
        min-height: 36px;
        padding: 7px 10px;
        touch-action: manipulation;
    }

    .editor-pane .ac-hint {
        display: none;
    }
}

@media (max-height: 500px) and (pointer: coarse) {
    .ide-wrapper .editor-container {
        min-height: 0;
    }

    .ide-wrapper .toolbar-left,
    .editor-pane .pane-subheader {
        display: none;
    }

    .ide-wrapper .toolbar {
        padding: 5px 10px;
    }

    .ide-wrapper .toolbar-right {
        width: 100%;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .ide-wrapper .editor-pane {
        min-height: 0;
    }

    .editor-pane .code-area-wrapper {
        flex: 0 0 auto;
        height: var(--mobile-code-height, 132px);
        min-height: 120px;
        max-height: 185px;
    }

    .editor-pane .code-stage {
        height: 100%;
        min-height: 0;
    }

    .editor-pane .line-numbers,
    .editor-pane #code-highlight,
    .editor-pane #code-editor {
        line-height: 1.45;
    }
}

/* Wyniki testów i baner zaliczenia w terminalu */
.terminal-reward-banner[hidden],
.verification-checks[hidden] {
    display: none !important;
}

.terminal-reward-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(39, 201, 63, 0.14);
    border: 1px solid rgba(39, 201, 63, 0.36);
    color: #e9fff0;
}

.reward-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.reward-text-wrap strong {
    font-size: 0.92rem;
    color: #5ef278;
}

.reward-text-wrap span {
    font-size: 0.8rem;
    color: rgba(235, 255, 240, 0.85);
}

.reward-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.reward-btn.primary {
    background: #27c93f;
    color: #0b1910;
}

.reward-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #f5ede6;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.reward-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.verification-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}

.check-card {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.82rem;
}

.check-card.is-pass {
    border-color: rgba(39, 201, 63, 0.3);
    background: rgba(39, 201, 63, 0.08);
}

.check-card.is-fail {
    border-color: rgba(255, 95, 86, 0.42);
    background: rgba(255, 95, 86, 0.1);
}

.check-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #f5ede6;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.check-card.is-pass .check-icon {
    background: rgba(39, 201, 63, 0.25);
    color: #5ef278;
}

.check-card.is-fail .check-icon {
    background: rgba(255, 95, 86, 0.28);
    color: #ff7b73;
}

.check-message {
    margin-top: 6px;
    color: rgba(245, 237, 230, 0.86);
    line-height: 1.45;
    white-space: pre-wrap;
}

.check-diff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 700px) {
    .check-diff-grid {
        grid-template-columns: 1fr;
    }
}

.check-diff-col {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 7px 9px;
}

.check-diff-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(245, 237, 230, 0.65);
    margin-bottom: 4px;
}

.check-diff-col pre {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #f5ede6;
}

.task-next-pill.is-locked {
    color: var(--text-secondary);
    border-style: dashed;
}

.task-guest-limit-banner {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent-orange) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-orange) 32%, transparent);
    font-size: 0.84rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.task-guest-limit-banner a {
    color: var(--accent-orange);
    font-weight: 700;
    text-decoration: none;
}

.ide-wrapper.task-locked-state {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.task-locked-wall {
    max-width: 640px;
    width: 100%;
    padding: 32px 30px;
    border-radius: 22px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-locked-badge {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: color-mix(in srgb, var(--accent-orange) 16%, transparent);
    color: var(--accent-orange);
    border: 1px solid color-mix(in srgb, var(--accent-orange) 34%, transparent);
}

.task-locked-wall h1,
.task-locked-wall h2 {
    margin: 0;
    font-size: 1.45rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.task-locked-lead {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
}

.task-locked-sub {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.task-locked-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.task-locked-actions {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.task-locked-actions a {
    text-decoration: none;
}

/* Limit pytań Fuksio AI i formatowanie jego wiadomości */
.fuksio-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fuksio-quota-pill {
    font-size: 0.71rem;
    font-weight: 800;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--subtle-pill-bg);
    color: var(--text-secondary);
    border: 1px solid var(--hairline-border);
    white-space: nowrap;
}

.fuksio-quota-pill.is-low {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.36);
    color: #b45309;
}

body.dark-mode .fuksio-quota-pill.is-low {
    color: #fcd34d;
}

.fuksio-quota-pill.is-exhausted {
    background: rgba(255, 95, 86, 0.16);
    border-color: rgba(255, 95, 86, 0.35);
    color: #dc2626;
}

body.dark-mode .fuksio-quota-pill.is-exhausted {
    color: #ff9c96;
}

.fuksio-inline-code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8em;
    padding: 1px 5px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent-orange) 14%, transparent);
    color: var(--text-primary);
}

.fuksio-code-block {
    margin: 8px 0 4px;
    padding: 9px 11px;
    border-radius: 10px;
    background: var(--ide-terminal-bg);
    color: var(--ide-terminal-text);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-x: auto;
    white-space: pre;
}

.fuksio-send-btn:disabled,
.chip-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 960px) {
    .ide-wrapper {
        padding: 104px 16px 72px;
    }

    .editor-pane {
        border-right: none;
        border-bottom: 1px solid var(--hairline-border);
        min-height: 360px;
    }
}

@media (max-width: 820px) {
    .ide-wrapper {
        padding: 88px 12px 116px;
    }

    .task-panel {
        padding: 16px;
        border-radius: 18px;
        margin-bottom: 14px;
    }

    .ide-window {
        border-radius: 18px;
    }

    .toolbar {
        padding: 10px 14px;
        gap: 10px;
    }

    .fuksio-widget {
        right: 12px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        z-index: 1080;
    }

    .fuksio-chat-window {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        width: auto;
        max-width: none;
        height: min(64dvh, 470px);
        margin-bottom: 0;
        border-radius: 22px;
        background: #fffcf7;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.36);
        z-index: 1090;
        transition: opacity 0.14s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.14s;
    }

    body.dark-mode .fuksio-chat-window {
        background: #0c1322;
        border-color: rgba(0, 240, 255, 0.3);
        box-shadow: 0 28px 65px -10px rgba(0, 0, 0, 0.85);
    }

    .fuksio-widget.is-open .fuksio-Launcher {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(0.92);
    }
}

@media (max-width: 540px) {
    .launcher-greeting {
        display: none;
    }

    .fuksio-Launcher {
        padding: 8px 14px 8px 8px;
    }

    .task-locked-wall {
        padding: 22px 18px;
    }

    .task-locked-actions a {
        flex: 1;
        text-align: center;
    }
}