:root {
    color-scheme: light;
    --brand: #e67e22;
    --brand-strong: #b85c0e;
    --brand-soft: #fdf1e3;
    --brand-blue: #47add9;
    --brand-blue-strong: #2a8fad;
    --brand-ink: #523c25;
    --header: #3B2B1A;
    --header-fg: #f0e4d5;
    --header-fg-strong: #ffffff;
    --header-hover: rgb(255 255 255 / .14);
    --header-sunken: rgb(0 0 0 / .22);
    --accent-green: #398439;
    --accent-blue: #2a8fad;
    --accent-red: #e74c3c;
    --accent-amber: #b85c0e;
    --bg: #fbfbfb;
    --surface: #ffffff;
    --surface-2: #f5f6f7;
    --surface-sunken: #eeeeee;
    --border: #e0e2e5;
    --border-strong: #c9ccd0;
    --text: #273238;
    --text-muted: #5d686f;
    --text-faint: #68737a;
    --code-bg: #f7f7f6;
    --code-fg: #273238;
    --tok-comment: #7c8791;
    --tok-keyword: #0f7d8c;
    --tok-builtin: #7a4fb5;
    --tok-string: #2f7d4a;
    --tok-number: #b85c0e;
    --tok-func: #2a6fb8;
    --tok-class: #a3721a;
    --tok-op: #5d686f;
    --tok-self: #b85c0e;
    --con-fg: #273238;
    --con-err: #c0392b;
    --con-info: #5d686f;
    --con-ok: #398439;
    --shadow-sm: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .08);
    --shadow-md: 0 4px 12px rgb(16 24 40 / .08), 0 2px 4px rgb(16 24 40 / .06);
    --shadow-lg: 0 16px 40px rgb(16 24 40 / .16), 0 4px 12px rgb(16 24 40 / .08);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 999px;
    --topbar-h: 56px;
    --actionbar-h: 64px;
    --tap: 44px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
    --ease: cubic-bezier(.2, .8, .2, 1)
}

[data-theme=escuro] {
    color-scheme: dark;
    --brand: #ef9440;
    --brand-strong: #e67e22;
    --brand-soft: #2b2016;
    --brand-blue-strong: #6cc3e8;
    --bg: #10161b;
    --surface: #1a2128;
    --surface-2: #222b33;
    --surface-sunken: #141a20;
    --border: #2c363f;
    --border-strong: #3d4952;
    --text: #eceff1;
    --text-muted: #aab4bc;
    --text-faint: #939da4;
    --code-bg: #141a20;
    --code-fg: #e0e5e9;
    --tok-comment: #6d7982;
    --tok-keyword: #5ac8d4;
    --tok-builtin: #c79ae8;
    --tok-string: #9dcc6b;
    --tok-number: #ef9440;
    --tok-func: #6cb3ef;
    --tok-class: #e6c07b;
    --tok-op: #aab4bc;
    --tok-self: #ef9440;
    --con-fg: #e0e5e9;
    --con-err: #f0714f;
    --con-info: #939da4;
    --con-ok: #9dcc6b;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-md: 0 4px 12px rgb(0 0 0 / .45);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / .6)
}

*,
*:before,
*:after {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overscroll-behavior: none
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm)
}

.app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom)
}

.topbar,
.activitybar,
.actionbar {
    flex: 0 0 auto
}

.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--topbar-h);
    padding: 0;
    padding-top: 0;
    background: var(--header);
    color: var(--header-fg);
    box-shadow: var(--shadow-sm);
    z-index: 20
}

.topbar .btn-ghost,
.topbar .btn-icon {
    color: var(--header-fg)
}

.topbar .btn-ghost:hover:not(:disabled),
.topbar .btn-icon:hover:not(:disabled) {
    background: var(--header-hover);
    color: var(--header-fg-strong)
}

.brand {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    flex: 0 0 auto;
    height: 100%;
}

.brand-logo {
    height: 56px;
    width: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none
}

@media(max-width:979px) {
    .topbar-actions .btn-label {
        display: none
    }

    .topbar-actions .btn-ghost {
        min-width: 38px;
        padding: 0
    }
}

@media(max-width:899px) {
    .brand-logo {
        width: 36px;
        height: 36px;
        object-fit: cover;
        object-position: left center
    }
}

@media(max-width:819px) {
    #module-tag-name {
        display: none
    }
}

.module-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    margin-left: 4px;
    border-radius: var(--radius-pill);
    background: var(--header-sunken);
    color: var(--header-fg);
    font-size: 12.5px;
    font-weight: 650;
    cursor: pointer;
    border: 1px solid rgb(255 255 255 / .1);
    transition: background .15s var(--ease);
    white-space: nowrap
}

.module-tag:hover {
    background: #ffffff24
}

.module-tag .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand)
}

.module-tag[data-module=poo] .dot {
    background: var(--brand-blue)
}

.module-tag .caret {
    opacity: .7;
    font-size: 9px
}

.viewswitch {
    display: flex;
    gap: 2px;
    padding: 3px;
    margin: 0 auto;
    background: var(--header-sunken);
    border-radius: var(--radius-pill)
}

.viewswitch-btn {
    border: 0;
    background: transparent;
    color: var(--header-fg);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-weight: 650;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease)
}

.viewswitch-btn.is-active {
    background: var(--brand);
    color: #3a2a19
}

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

.topbar-sep {
    width: 1px;
    height: 24px;
    background: #ffffff2e;
    margin: 0 4px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    font-weight: 650;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s var(--ease), border-color .15s var(--ease), transform .08s var(--ease), opacity .15s var(--ease)
}

.btn .i {
    font-size: 13px;
    line-height: 1
}

.btn:active:not(:disabled) {
    transform: translateY(1px)
}

.btn:disabled {
    opacity: .42;
    cursor: not-allowed
}

.btn[hidden] {
    display: none
}

.btn-ghost {
    color: var(--text-muted)
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text)
}

.btn-icon {
    min-width: 38px;
    padding: 0;
    color: var(--text-muted)
}

.btn-icon:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text)
}

.btn-primary {
    background: var(--accent-green);
    color: #fff;
    min-width: 124px;
    box-shadow: var(--shadow-sm)
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.06)
}

.btn-primary.is-running {
    background: var(--brand)
}

.btn-verify {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: var(--shadow-sm)
}

.btn-verify:hover:not(:disabled) {
    filter: brightness(1.06)
}

.btn-secondary {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text)
}

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-sunken);
    border-color: var(--border-strong)
}

.caret {
    font-size: 9px;
    opacity: .7
}

.dropdown {
    position: relative
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 260px;
    max-width: calc(100vw - 20px);
    max-height: min(70dvh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 60
}

.dropdown.is-open .dropdown-menu {
    display: block
}

.dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text)
}

.dropdown-menu button:hover {
    background: var(--surface-2)
}

.dropdown-menu strong {
    display: block;
    font-size: 13.5px;
    font-weight: 650
}

.dropdown-menu small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 1px
}

.dropdown-sep {
    display: block;
    height: 1px;
    background: var(--border);
    margin: 5px 8px
}

.dropdown-more {
    display: none
}

.dropdown-more .dropdown-menu {
    min-width: 232px
}

.dropdown-more .dropdown-menu button {
    min-height: var(--tap)
}

.activitybar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--border);
    z-index: 15
}

.activitybar.is-active {
    display: flex
}

.activity-icon {
    font-size: 20px;
    flex: 0 0 auto
}

.activity-text {
    min-width: 0;
    flex: 1 1 auto
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    min-width: 0
}

#activity-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.activity-badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border)
}

.activity-badge[data-level=facil] {
    color: var(--accent-green);
    border-color: color-mix(in srgb, var(--accent-green) 40%, transparent)
}

.activity-badge[data-level=medio] {
    color: var(--accent-amber);
    border-color: color-mix(in srgb, var(--accent-amber) 40%, transparent)
}

.activity-badge[data-level=dificil] {
    color: var(--accent-red);
    border-color: color-mix(in srgb, var(--accent-red) 40%, transparent)
}

.activity-status {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap
}

.activity-status[data-state=pendente] {
    color: var(--text-muted);
    background: var(--surface-2)
}

.activity-status[data-state=ok] {
    color: #fff;
    background: var(--accent-green)
}

.activity-status[data-state=erro] {
    color: #fff;
    background: var(--accent-red)
}

.activity-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.activity-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto
}

.workbench {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    background: var(--bg)
}

.panel {
    min-width: 0;
    min-height: 0;
    position: relative
}

.panel-blocks {
    flex: 1 1 auto;
    background: var(--surface)
}

#blocklyDiv {
    position: absolute;
    inset: 0
}

.panel-side {
    flex: 0 0 var(--side-width, 42%);
    display: flex;
    flex-direction: column;
    min-width: 260px;
    padding: 8px 8px 8px 0;
    gap: 0
}

.side-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm)
}

.pane-code {
    flex: 0 0 var(--code-height, 58%);
    min-height: 0
}

.pane-console {
    flex: 1 1 auto;
    min-height: 0
}

.pane-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    flex: 0 0 auto
}

.pane-head h2 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted)
}

.pane-head .lang-chip {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-blue-strong);
    background: color-mix(in srgb, var(--brand-blue) 14%, transparent);
    padding: 2px 8px;
    border-radius: var(--radius-pill)
}

.pane-head-actions {
    margin-left: auto;
    display: flex;
    gap: 2px
}

.pane-head-actions .btn-icon {
    min-width: 30px;
    min-height: 30px;
    font-size: 13px
}

.code-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--code-bg)
}

.code-view {
    margin: 0;
    padding: 12px 14px;
    min-height: 100%;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    color: var(--code-fg);
    white-space: pre;
    tab-size: 4
}

.code-empty {
    color: var(--text-faint);
    font-style: italic
}

.tok-comment {
    color: var(--tok-comment);
    font-style: italic
}

.tok-keyword {
    color: var(--tok-keyword);
    font-weight: 600
}

.tok-builtin {
    color: var(--tok-builtin)
}

.tok-string {
    color: var(--tok-string)
}

.tok-number {
    color: var(--tok-number)
}

.tok-func {
    color: var(--tok-func)
}

.tok-class {
    color: var(--tok-class)
}

.tok-op {
    color: var(--tok-op)
}

.tok-self {
    color: var(--tok-self);
    font-style: italic
}

.console {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--con-fg);
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--surface)
}

.con-out {
    color: var(--con-fg)
}

.con-err {
    color: var(--con-err)
}

.con-info {
    color: var(--con-info);
    font-style: italic
}

.con-ok {
    color: var(--con-ok);
    font-weight: 600
}

.con-in {
    color: var(--brand-blue-strong)
}

.con-in:before {
    content: "» ";
    opacity: .7
}

.console-empty {
    color: var(--text-faint);
    font-style: italic
}

.splitter {
    flex: 0 0 6px;
    cursor: col-resize;
    position: relative;
    background: transparent;
    touch-action: none
}

.splitter:after {
    content: "";
    position: absolute;
    inset: 8px 2px;
    border-radius: var(--radius-pill);
    background: var(--border);
    transition: background .15s var(--ease)
}

.splitter:hover:after,
.splitter.is-dragging:after {
    background: var(--brand)
}

.hsplitter {
    flex: 0 0 8px;
    cursor: row-resize;
    position: relative;
    background: transparent;
    touch-action: none
}

.hsplitter:after {
    content: "";
    position: absolute;
    inset: 3px 12px;
    border-radius: var(--radius-pill);
    background: var(--border);
    transition: background .15s var(--ease)
}

.hsplitter:hover:after,
.hsplitter.is-dragging:after {
    background: var(--brand)
}

.actionbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--actionbar-h);
    padding: 8px 12px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 20
}

.run-controls {
    display: flex;
    align-items: center;
    gap: 6px
}

.actionbar-spacer {
    flex: 1 1 auto
}

.statusline {
    color: var(--text-faint);
    font-size: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-strong)
}

.status-dot.is-ready {
    background: var(--accent-green)
}

.status-dot.is-busy {
    background: var(--accent-amber);
    animation: pulse 1s infinite
}

.status-dot.is-loading {
    background: var(--brand-blue);
    animation: pulse 1s infinite
}

@keyframes pulse {
    50% {
        opacity: .35
    }
}

.modal {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(720px, 94vw);
    width: 100%;
    max-height: 88dvh;
    color: var(--text)
}

.modal::backdrop {
    background: #080e1494;
    backdrop-filter: blur(3px)
}

.modal-inner {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 88dvh;
    overflow: hidden
}

.modal-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border)
}

.modal-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 750
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px 18px 20px
}

.modal-sub {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 13px
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px
}

.pick-card {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease)
}

.pick-card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px)
}

.pick-emoji {
    font-size: 24px;
    line-height: 1.1;
    flex: 0 0 auto
}

.pick-card strong {
    display: block;
    font-size: 14px;
    font-weight: 700
}

.pick-card small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
    line-height: 1.4
}

.pick-card.is-current {
    border-color: var(--brand);
    background: var(--brand-soft)
}

.activity-groups>section+section {
    margin-top: 18px
}

.activity-group-title {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand-strong)
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color .15s var(--ease), transform .1s var(--ease)
}

.activity-item:hover {
    border-color: var(--brand);
    transform: translate(2px)
}

.activity-item .num {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-sunken);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted)
}

.activity-item.is-done .num {
    background: var(--accent-green);
    color: #fff
}

.activity-item .body {
    min-width: 0;
    flex: 1 1 auto
}

.activity-item .body strong {
    display: block;
    font-size: 14px;
    font-weight: 700
}

.activity-item .body small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.statement h1,
.statement h2,
.statement h3 {
    font-size: 15px;
    margin: 14px 0 6px
}

.statement p {
    margin: 0 0 10px;
    color: var(--text)
}

.statement ul,
.statement ol {
    margin: 0 0 10px;
    padding-left: 22px;
    color: var(--text)
}

.statement li {
    margin-bottom: 4px
}

.statement code {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: var(--surface-sunken);
    padding: 1px 5px;
    border-radius: 5px
}

.statement pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    overflow-x: auto;
    margin: 0 0 10px
}

.statement pre code {
    background: none;
    padding: 0
}

.result-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-weight: 650
}

.result-summary.is-ok {
    background: color-mix(in srgb, var(--accent-green) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent-green) 40%, transparent)
}

.result-summary.is-fail {
    background: color-mix(in srgb, var(--accent-red) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent-red) 40%, transparent)
}

.result-summary .big {
    font-size: 26px;
    line-height: 1
}

.test-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.test-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2)
}

.test-row .mark {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1.4
}

.test-row.pass .mark {
    color: var(--accent-green)
}

.test-row.fail .mark {
    color: var(--accent-red)
}

.test-row .body {
    min-width: 0;
    flex: 1 1 auto
}

.test-row .body strong {
    font-size: 13px;
    font-weight: 650
}

.test-row .detail {
    display: block;
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-word
}

.creditos-link {
    border: 0;
    background: transparent;
    color: var(--text-faint);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s var(--ease), background .15s var(--ease)
}

.creditos-link:hover {
    color: var(--brand-strong);
    background: var(--surface-2)
}

.link-inline {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    color: var(--brand-strong);
    text-decoration: underline;
    cursor: pointer
}

.creditos section+section {
    margin-top: 22px
}

.creditos h3 {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand-strong)
}

.creditos p {
    margin: 0;
    color: var(--text-muted)
}

.creditos a {
    color: var(--brand-strong)
}

.creditos-marca {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border)
}

.creditos-marca img {
    border-radius: 50%;
    flex: 0 0 auto
}

.creditos-marca strong {
    display: block;
    font-size: 17px;
    font-weight: 750
}

.creditos-marca span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 2px
}

.parceria {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 650
}

.parceria span {
    color: var(--border-strong)
}

.creditos-biro {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--brand-soft);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease)
}

.creditos-biro:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px)
}

.creditos-biro-texto {
    flex: 1 1 auto;
    min-width: 0
}

.creditos-biro small {
    display: block;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted)
}

.creditos-biro strong {
    display: block;
    font-size: 17px;
    font-weight: 750;
    color: var(--text);
    margin-top: 1px
}

.creditos-url {
    display: block;
    font-size: 12.5px;
    color: var(--brand-strong);
    margin-top: 2px
}

.creditos-seta {
    flex: 0 0 auto;
    font-size: 18px;
    color: var(--brand-strong)
}

.licencas {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px
}

.licencas li {
    margin-bottom: 8px
}

.lic {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 650;
    color: var(--text-faint);
    white-space: nowrap
}

.creditos-nota {
    margin-top: 12px !important;
    font-size: 12.5px
}

@media(max-width:479px) {
    .creditos-link {
        padding: 6px 4px
    }
}

.help-body section+section {
    margin-top: 20px
}

.help-body h3 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-strong)
}

.help-body ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted)
}

.help-body li {
    margin-bottom: 5px
}

.help-body p {
    margin: 0 0 8px;
    color: var(--text-muted)
}

.help-body a {
    color: var(--brand-strong)
}

.shortcuts {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 6px
}

.shortcuts li {
    display: flex;
    align-items: center;
    gap: 8px
}

.shortcuts span {
    color: var(--text-muted)
}

kbd {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    padding: 2px 6px;
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 650;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 6px
}

.toast-stack {
    position: fixed;
    left: 50%;
    bottom: calc(var(--actionbar-h) + 16px + env(safe-area-inset-bottom));
    transform: translate(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    z-index: 200;
    pointer-events: none;
    width: min(460px, calc(100vw - 24px))
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 15px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13.5px;
    animation: toast-in .22s var(--ease);
    max-width: 100%
}

.toast.is-error {
    border-color: var(--accent-red);
    background: color-mix(in srgb, var(--accent-red) 8%, var(--surface))
}

.toast.is-success {
    border-color: var(--accent-green);
    background: color-mix(in srgb, var(--accent-green) 8%, var(--surface))
}

.toast-icon {
    line-height: 1.35
}

@keyframes toast-in {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(.97)
    }
}

@media(max-width:899px) {
    .workbench {
        display: block;
        position: relative
    }

    .panel-blocks {
        position: absolute;
        inset: 0;
        display: none
    }

    .panel-blocks.is-active {
        display: block
    }

    .panel-side {
        display: contents
    }

    .side-pane {
        position: absolute;
        inset: 0;
        display: none;
        margin: 0;
        border-radius: 0;
        border: 0
    }

    .side-pane.is-active {
        display: flex
    }

    .splitter,
    .hsplitter,
    .btn-label {
        display: none
    }

    .btn-primary .btn-label,
    .btn-verify .btn-label {
        display: inline
    }

    .btn {
        min-height: var(--tap);
        min-width: var(--tap);
        padding: 0 10px
    }

    .topbar-actions .btn-ghost {
        min-width: var(--tap);
        padding: 0
    }

    .topbar-sep {
        display: none
    }

    .actionbar {
        gap: 8px;
        padding: 8px 10px
    }

    .activity-desc {
        display: none
    }
}

@media(max-width:619px) {

    .activity-status,
    .activity-badge {
        display: none
    }
}

@media(min-width:900px) {
    .viewswitch {
        display: none
    }
}

@media(max-width:679px) {
    .topbar-actions {
        display: none
    }

    .dropdown-more {
        display: block;
        margin-left: auto
    }
}

@media(max-width:479px) {
    .topbar {
        gap: 6px;
        padding-left: 8px;
        padding-right: 8px
    }

    .viewswitch-btn {
        padding: 7px 9px
    }

    .module-tag {
        padding: 0 8px
    }

    .module-tag .caret {
        display: none
    }
}

@media(max-width:359px) {
    .viewswitch-btn {
        padding: 7px 6px
    }
}

@media(max-width:619px) {
    .modal-head {
        padding: 12px 14px
    }

    .modal-body {
        padding: 14px
    }

    .card-grid {
        grid-template-columns: 1fr
    }

    .statusline {
        display: none
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *:before,
    *:after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important
    }
}

.injectionDiv {
    border-radius: 0
}

.blocklyToolbox {
    padding: 8px 6px !important;
    overflow-x: hidden
}

.blocklyToolboxCategoryGroup {
    display: flex;
    flex-direction: column;
    gap: 2px
}

.blocklyToolboxCategory {
    display: flex !important;
    align-items: center;
    min-height: 38px;
    border-radius: var(--radius) !important;
    padding: 0 10px 0 0 !important;
    transition: background .12s var(--ease)
}

.blocklyToolboxCategoryContainer:hover .blocklyToolboxCategory {
    background: #ffffff17
}

.blocklyToolboxCategoryContainer[aria-selected=true] .blocklyToolboxCategory {
    background: #ffffff29
}

.blocklyTreeRowContentContainer {
    display: flex;
    align-items: center;
    flex: 1;
    padding-left: 10px;
    line-height: 1.2
}

.blocklyToolboxCategoryLabel {
    font-family: var(--font) !important;
    font-size: 13.5px !important;
    font-weight: 650 !important;
    letter-spacing: .1px;
    line-height: 1.2
}

.blocklyToolboxCategoryIcon {
    display: none !important
}

.blocklyTreeSeparator {
    border-bottom: 1px solid rgb(255 255 255 / .14) !important;
    margin: 8px !important;
    height: 0 !important;
    padding: 0 !important
}

.blocklyFlyout {
    filter: drop-shadow(0 6px 18px rgb(16 24 40 / .16))
}

.blocklyTooltipDiv {
    background: var(--surface) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md);
    font-family: var(--font) !important;
    font-size: 12.5px !important;
    opacity: 1 !important;
    padding: 7px 10px !important;
    max-width: 300px
}

.blocklyWidgetDiv .blocklyMenu,
.blocklyDropDownDiv {
    border-radius: var(--radius) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: var(--font) !important
}

.blocklyMenuItemContent {
    font-family: var(--font) !important
}

.blocklyHtmlInput {
    font-family: var(--font-mono) !important
}

@media(max-width:899px) {
    .blocklyToolboxCategory {
        min-height: var(--tap)
    }

    .blocklyToolboxCategoryLabel {
        font-size: 14.5px !important
    }

    .blocklyZoom {
        display: none
    }
}