:root {
    --text: #253048;
    --muted: #5f6f8b;
    --line: #d8e7ff;
    --panel: #ffffff;
    --primary: #2e5bff;
    --danger: #e03d3d;
    --cause: #ffe29a;
    --problem: #ffb180;
    --effect: #bde9a9;
    --mean: #ffd6f8;
    --solution: #ffd8a8;
    --result: #b7f2ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #a9d5ff 0%, #dff1ff 32%, #f5fcff 62%, #f8f9ff 100%);
}

.app {
    max-width: 1450px;
    margin: 0 auto;
    padding: 20px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.app-header h1 {
    margin: 0 0 6px;
    font-size: clamp(1.55rem, 2.5vw, 2.3rem);
}

.app-header p {
    margin: 0;
    color: var(--muted);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 9px 18px rgba(46, 91, 255, 0.28);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.btn-small {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 12px;
}

.scene-panel,
.builder-card,
.summary-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 12px 22px rgba(40, 84, 152, 0.08);
}

.scene-panel {
    padding: 14px;
    margin-top: 8px;
}

.scene-panel h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.scene-wrapper {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #9fd0ff 0%, #e6f4ff 45%, #d8f4c6 45%, #9fd176 100%);
    box-shadow: inset 0 -18px 28px rgba(66, 123, 40, 0.15);
    position: relative;
}

.scene-wrapper-guide {
    --guide-branches-offset: 0px;
    --guide-trunk-offset: 0px;
    --guide-roots-offset: 0px;
    background-color: #d9efff;
    background-image: url("../img/arbol-problema-fondo.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.scene-wrapper-guide .cloud {
    display: none;
}

.tree-art {
    display: none !important;
}

.scene-wrapper-solution:not(.scene-wrapper-guide) {
    background: linear-gradient(180deg, #b39cff 0%, #ece6ff 45%, #dff5ff 45%, #9ad2f9 100%);
}

.tree-scene {
    position: relative;
    min-height: 560px;
    padding: 18px;
}

/* Refuerzo para evitar que estilos externos desarmen la escena */
.scene-wrapper .tree-scene {
    position: relative !important;
    min-height: 560px !important;
    display: block !important;
}

.scene-wrapper .drop-zone {
    position: absolute !important;
    display: block !important;
    z-index: 2;
}

.tree-art {
    position: absolute;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    z-index: 0;
}

.tree-crown {
    width: 220px;
    height: 320px;
    border-radius: 120px 120px 100px 100px;
    background: radial-gradient(circle at 50% 25%, #98d965 0%, #62b236 60%, #4f9931 100%);
    box-shadow: 0 18px 34px rgba(64, 128, 45, 0.24);
}

.tree-trunk-art {
    position: absolute;
    left: 50%;
    bottom: -66px;
    width: 110px;
    height: 215px;
    transform: translateX(-50%);
    border-radius: 44px;
    background: linear-gradient(180deg, #9a663a 0%, #6e4324 100%);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.tree-roots-art {
    position: absolute;
    left: 50%;
    bottom: -90px;
    width: 200px;
    height: 38px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(92, 62, 31, 0.45) 0%, rgba(92, 62, 31, 0.2) 60%, rgba(92, 62, 31, 0) 100%);
}

.tree-art-solution .tree-crown {
    background: radial-gradient(circle at 50% 25%, #9cb2ff 0%, #7689f1 60%, #5d6ed8 100%);
    box-shadow: 0 18px 34px rgba(86, 97, 186, 0.24);
}

.tree-art-solution .tree-trunk-art {
    background: linear-gradient(180deg, #845ab0 0%, #66418f 100%);
}

.cloud {
    position: absolute;
    height: 24px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.8);
    z-index: 0;
}

.cloud::before,
.cloud::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

.cloud::before {
    width: 26px;
    height: 26px;
    left: 10px;
    top: -12px;
}

.cloud::after {
    width: 34px;
    height: 34px;
    left: 30px;
    top: -16px;
}

.cloud-left {
    width: 80px;
    top: 32px;
    left: 12%;
}

.cloud-right {
    width: 92px;
    top: 42px;
    right: 12%;
}

.drop-zone {
    position: absolute;
    border: 2px dashed rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 10px;
    z-index: 2;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.drop-zone.drag-over {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.01);
}

.zone-branches .zone-title {
    background: rgba(197, 247, 190, 0.92);
}

.zone-trunk .zone-title {
    background: rgba(255, 219, 183, 0.95);
}

.zone-roots .zone-title {
    background: rgba(219, 201, 255, 0.94);
}

.zone-branches {
    top: 75px;
    left: 7%;
    right: 7%;
    min-height: 190px;
}

.zone-trunk {
    top: 285px;
    left: 36%;
    right: 36%;
    min-height: 145px;
}

.zone-roots {
    bottom: 14px;
    left: 12%;
    right: 12%;
    min-height: 145px;
}

/* Ajuste fino para la imagen guia del arbol de problema */
.scene-wrapper-guide .zone-branches {
    top: calc(56px + var(--guide-branches-offset));
    left: 5%;
    right: 5%;
    min-height: 170px;
}

.scene-wrapper-guide .zone-trunk {
    top: calc(255px + var(--guide-trunk-offset));
    left: 39%;
    right: 39%;
    min-height: 118px;
}

.scene-wrapper-guide .zone-roots {
    bottom: calc(12px + var(--guide-roots-offset));
    left: 8%;
    right: 8%;
    min-height: 150px;
}

.scene-wrapper-guide .drop-zone {
    border-color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.zone-title {
    display: inline-block;
    margin-bottom: 7px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.8);
}

.card-stack,
.card-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    min-height: 48px;
}

.builder-grid {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.builder-card {
    padding: 12px;
}

.builder-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.builder-input textarea,
.summary-card textarea {
    width: 100%;
    resize: vertical;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    font: inherit;
}

.builder-input {
    display: grid;
    gap: 8px;
}

.pool-dropzone {
    margin-top: 10px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fbfdff;
}

.pool-dropzone.drag-over {
    background: #ecf4ff;
    border-color: #94b5ff;
}

.pool-help {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.tree-card {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 8px 10px;
    min-width: 130px;
    max-width: 280px;
    cursor: grab;
    box-shadow: 0 8px 14px rgba(30, 54, 106, 0.13);
}

.tree-card[data-type="cause"] {
    background: var(--cause);
    border-color: #efc569;
}

.tree-card[data-type="problem"] {
    background: var(--problem);
    border-color: #f08f55;
}

.tree-card[data-type="effect"] {
    background: var(--effect);
    border-color: #91c878;
}

.tree-card[data-type="mean"] {
    background: var(--mean);
    border-color: #d897cf;
}

.tree-card[data-type="solution"] {
    background: var(--solution);
    border-color: #efab62;
}

.tree-card[data-type="result"] {
    background: var(--result);
    border-color: #7cc4d8;
}

.tree-card.dragging {
    opacity: 0.6;
}

.card-label {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: pre-wrap;
    word-break: break-word;
}

.card-actions {
    margin-top: 6px;
    display: flex;
    justify-content: flex-end;
}

.icon-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.76);
    border-radius: 8px;
    padding: 2px 8px;
    cursor: pointer;
    color: #2a3b59;
}

.icon-btn.delete {
    color: var(--danger);
}

.summary-grid {
    margin-top: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
}

.summary-card {
    padding: 12px;
}

.summary-card h3 {
    margin: 0 0 8px;
}

.summary-card textarea {
    background: #f8fbff;
}

.report-logo-preview {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 10px;
    margin: 0 0 10px;
    background: #fbfdff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.report-logo-preview img {
    max-width: 240px;
    max-height: 110px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 6px;
}

.report-logo-preview p {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
}

.full-width {
    grid-column: 1 / -1;
}

.report-meta-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.report-label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 600;
}

.report-label input,
.report-label textarea {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.report-label select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

.collab-panel {
    margin-top: 10px;
}

.collab-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(210px, 260px) 1fr;
    align-items: start;
}

#collabQrImg {
    width: 200px;
    height: 200px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 8px;
}

#collabEntries .tree-card {
    max-width: 360px;
}

.collab-entry-meta {
    margin: 0 0 6px;
    font-size: 0.78rem;
    color: var(--muted);
}

.collab-student-group {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: #fbfdff;
}

.collab-student-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.collab-student-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.collab-filter-btn {
    border: 1px solid #cfd7ff;
    background: #f5f7ff;
    color: #3653c8;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    cursor: pointer;
}

.collab-filter-btn:hover {
    background: #edf1ff;
}

.collab-filter-btn.active {
    border-color: #3653c8;
    background: #3653c8;
    color: #fff;
}

.collab-student-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f3ca8;
}

.collab-student-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.collab-student-items .tree-card.is-hidden {
    display: none;
}

.zone-tuner {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    margin: 8px 0 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fbff;
}

.zone-tuner label {
    display: grid;
    gap: 4px;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 700;
}

.zone-tuner input[type="range"] {
    width: 100%;
}

#metaRecordNumber {
    background: #eef3ff;
    color: #1f3ca8;
    font-weight: 700;
}

.status-msg {
    margin: 10px 0 0;
    min-height: 20px;
    font-weight: 700;
    color: #2b56f5;
}

.workflow-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workspace-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-evidence {
    display: none;
}

.problem-workspace {
    margin-top: 10px;
}

.problem-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}

.problem-workspace-head h2 {
    margin: 0;
}

.problem-workspace-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(520px, 1fr) minmax(240px, 320px);
    gap: 12px;
    align-items: start;
}

.problem-side {
    max-height: min(78vh, 860px);
    overflow: auto;
}

.problem-center-panel {
    margin: 0;
    padding: 10px;
}

.problem-center-input {
    margin-top: 10px;
}

.solution-workspace {
    margin-top: 10px;
}

.solution-workspace-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}

.solution-workspace-head h2 {
    margin: 0;
}

.solution-workspace-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(520px, 1fr) minmax(240px, 320px);
    gap: 12px;
    align-items: start;
}

.solution-side {
    max-height: min(78vh, 860px);
    overflow: auto;
}

.solution-center-panel {
    margin: 0;
    padding: 10px;
}

.solution-center-input {
    margin-top: 10px;
}

/* Capa visual moderna 3D + movimiento suave */
body {
    background:
        radial-gradient(circle at 10% 8%, rgba(106, 226, 255, 0.58) 0%, rgba(106, 226, 255, 0) 35%),
        radial-gradient(circle at 88% 12%, rgba(198, 132, 255, 0.42) 0%, rgba(198, 132, 255, 0) 36%),
        linear-gradient(160deg, #dff0ff 0%, #f7fbff 44%, #f3f6ff 100%);
    background-attachment: fixed;
}

.app-header,
.toolbar,
.scene-panel,
.builder-card,
.summary-card {
    backdrop-filter: blur(8px);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 252, 255, 0.9) 100%);
    border-color: rgba(165, 196, 255, 0.6);
    box-shadow:
        0 16px 34px rgba(57, 96, 185, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.app-header {
    padding: 16px 18px;
    border-radius: 20px;
}

.toolbar {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(165, 196, 255, 0.6);
}

.btn {
    border-radius: 14px;
    transform-style: preserve-3d;
}

.btn-primary {
    background: linear-gradient(135deg, #2f7bff 0%, #4f59ff 45%, #8254ff 100%);
    box-shadow:
        0 12px 24px rgba(66, 98, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-secondary,
.btn-small {
    background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
    border-color: rgba(163, 191, 255, 0.65);
    box-shadow: 0 6px 14px rgba(46, 78, 145, 0.1);
}

.scene-wrapper {
    border-color: rgba(150, 189, 255, 0.72);
    box-shadow:
        0 16px 28px rgba(39, 78, 155, 0.16),
        inset 0 -32px 34px rgba(83, 140, 63, 0.18);
}

.scene-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 35%);
    pointer-events: none;
    z-index: 0;
}

.scene-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.18;
    mix-blend-mode: soft-light;
    background:
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(255, 255, 255, 0.5) 0deg,
            rgba(255, 255, 255, 0.08) 18deg,
            rgba(96, 145, 255, 0.34) 30deg,
            rgba(255, 255, 255, 0.04) 45deg
        ),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 58%);
}

.scene-wrapper-guide {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
        url("../img/arbol-problema-fondo.png") !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.scene-wrapper .tree-scene {
    position: relative;
    z-index: 1;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.34),
        0 8px 16px rgba(37, 71, 139, 0.16);
}

.drop-zone.drag-over {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px) scale(1.01);
}

.tree-card {
    border-radius: 14px;
    box-shadow:
        0 10px 18px rgba(28, 50, 99, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tree-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 24px rgba(28, 50, 99, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.zone-title {
    box-shadow: 0 5px 10px rgba(35, 64, 122, 0.14);
}

#collabQrImg {
    box-shadow: 0 10px 18px rgba(41, 72, 139, 0.2);
}

@keyframes floatingPanel {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

.scene-panel {
    animation: floatingPanel 5.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .scene-panel {
        animation: none;
    }
}

/* Flujo por etapas: acta -> problema -> soluciones -> informe */
body[data-workflow-stage="problem"] .app,
body[data-workflow-stage="solution"] .app {
    max-width: min(98vw, 1750px);
    padding: 10px 14px 18px;
}

body[data-workflow-stage="problem"] .scene-panel,
body[data-workflow-stage="solution"] .scene-panel {
    padding: 10px;
}

body[data-workflow-stage="problem"] .scene-wrapper,
body[data-workflow-stage="solution"] .scene-wrapper {
    min-height: calc(100vh - 210px);
}

body[data-workflow-stage="problem"] .tree-scene,
body[data-workflow-stage="solution"] .tree-scene {
    min-height: calc(100vh - 230px) !important;
}

body[data-problem-focus="on"] {
    overflow: hidden;
}

body[data-problem-focus="on"] .app-header,
body[data-problem-focus="on"] .toolbar,
body[data-problem-focus="on"] #collabPanel,
body[data-problem-focus="on"] #stageProblemActions,
body[data-problem-focus="on"] .problem-center-input,
body[data-problem-focus="on"] .zone-tuner {
    display: none !important;
}

body[data-problem-focus="on"] #stageProblemWorkspace .btn-evidence {
    display: inline-flex;
}

body[data-problem-focus="on"] #stageProblemWorkspace {
    position: fixed;
    inset: 0;
    z-index: 999;
    margin: 0;
    padding: 10px 10px 12px;
    background:
        radial-gradient(circle at 15% 10%, rgba(138, 215, 255, 0.45) 0%, rgba(138, 215, 255, 0) 35%),
        linear-gradient(165deg, #dff0ff 0%, #f8fbff 52%, #edf6ff 100%);
    overflow: auto;
}

body[data-problem-focus="on"] #stageProblemWorkspace .problem-workspace-layout {
    grid-template-columns: minmax(280px, 360px) minmax(640px, 1fr) minmax(280px, 360px);
}

body[data-problem-focus="on"] #stageProblemWorkspace .problem-side {
    max-height: calc(100vh - 92px);
}

body[data-problem-focus="on"] #stageProblemWorkspace .scene-wrapper {
    min-height: calc(100vh - 104px);
}

body[data-problem-focus="on"] #stageProblemWorkspace .tree-scene {
    min-height: calc(100vh - 124px) !important;
}

body[data-solution-focus="on"] {
    overflow: hidden;
}

body[data-solution-focus="on"] .app-header,
body[data-solution-focus="on"] .toolbar,
body[data-solution-focus="on"] #collabPanel,
body[data-solution-focus="on"] #stageSolutionActions,
body[data-solution-focus="on"] .solution-center-input,
body[data-solution-focus="on"] .zone-tuner {
    display: none !important;
}

body[data-solution-focus="on"] #stageSolutionWorkspace .btn-evidence {
    display: inline-flex;
}

body[data-solution-focus="on"] #stageSolutionWorkspace {
    position: fixed;
    inset: 0;
    z-index: 999;
    margin: 0;
    padding: 10px 10px 12px;
    background:
        radial-gradient(circle at 85% 12%, rgba(178, 176, 255, 0.5) 0%, rgba(178, 176, 255, 0) 35%),
        linear-gradient(165deg, #eef0ff 0%, #f9f9ff 52%, #eef8ff 100%);
    overflow: auto;
}

body[data-solution-focus="on"] #stageSolutionWorkspace .solution-workspace-layout {
    grid-template-columns: minmax(280px, 360px) minmax(640px, 1fr) minmax(280px, 360px);
}

body[data-solution-focus="on"] #stageSolutionWorkspace .solution-side {
    max-height: calc(100vh - 92px);
}

body[data-solution-focus="on"] #stageSolutionWorkspace .scene-wrapper {
    min-height: calc(100vh - 104px);
}

body[data-solution-focus="on"] #stageSolutionWorkspace .tree-scene {
    min-height: calc(100vh - 124px) !important;
}

@media (max-width: 980px) {
    .builder-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .report-meta-grid {
        grid-template-columns: 1fr;
    }

    .zone-trunk {
        left: 28%;
        right: 28%;
    }

    .scene-wrapper-guide .zone-trunk {
        left: 35%;
        right: 35%;
        top: calc(264px + var(--guide-trunk-offset));
    }

    .scene-wrapper-guide .zone-roots {
        left: 6%;
        right: 6%;
    }

    .problem-workspace-layout {
        grid-template-columns: 1fr;
    }

    .problem-side {
        max-height: none;
    }

    .solution-workspace-layout {
        grid-template-columns: 1fr;
    }

    .solution-side {
        max-height: none;
    }

    body[data-problem-focus="on"] #stageProblemWorkspace .problem-workspace-layout {
        grid-template-columns: 1fr;
    }

    body[data-solution-focus="on"] #stageSolutionWorkspace .solution-workspace-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app {
        padding: 12px;
    }

    .app-header {
        flex-direction: column;
    }

    .tree-scene {
        min-height: 640px;
    }

    .zone-branches {
        left: 3%;
        right: 3%;
    }

    .zone-trunk {
        left: 20%;
        right: 20%;
    }

    .zone-roots {
        left: 5%;
        right: 5%;
    }

    .scene-wrapper-guide .zone-branches {
        top: calc(68px + var(--guide-branches-offset));
        left: 2%;
        right: 2%;
        min-height: 178px;
    }

    .scene-wrapper-guide .zone-trunk {
        left: 30%;
        right: 30%;
        top: calc(288px + var(--guide-trunk-offset));
        min-height: 126px;
    }

    .scene-wrapper-guide .zone-roots {
        left: 3%;
        right: 3%;
        bottom: calc(12px + var(--guide-roots-offset));
        min-height: 165px;
    }

    .zone-tuner {
        grid-template-columns: 1fr;
    }

    .collab-grid {
        grid-template-columns: 1fr;
    }
}
