.cycle-workshop [hidden] {
    display: none;
}

.cycle-workshop .chain-container {
    max-width: 1000px;
}

.cycle-workshop .tool-actions .btn {
    min-height: 44px;
}

.workshop-selects {
    display: grid;
    grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr) minmax(7rem, 1fr);
    gap: .65rem;
}

.workshop-selects select {
    min-width: 0;
}

#dictation-audio {
    display: block;
    width: min(100%, 37rem);
    margin-top: 1rem;
}

#dictation-form {
    margin-top: 1.2rem;
}

#dictation-text {
    display: block;
    width: 100%;
    min-height: 6rem;
    margin-top: .35rem;
    padding: .65rem .8rem;
    border: 1px solid #a1b1cc;
    border-radius: 8px;
    color: #162c55;
    font: inherit;
    resize: vertical;
}

#dictation-text:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

#dictation-result h3 {
    margin: 0;
    font-size: 1.1rem;
}

.dictation-differences {
    margin: .55rem 0;
    padding-left: 1.25rem;
    overflow-wrap: anywhere;
}

#dictation-review {
    margin-top: .55rem;
}

.workshop-review {
    margin-top: 1rem;
    scroll-margin-top: 5rem;
}

.workshop-review select, .workshop-review input, .chain-habitat {
    max-width: 25rem;
}

.workshop-prompt {
    margin: .9rem 0 .35rem;
    color: #19376a;
    font-weight: 650;
}

.workshop-feedback {
    min-height: 1.5em;
    margin: .65rem 0 0;
    color: #22497e;
    font-weight: 650;
}

.chain-clues {
    margin-top: .7rem;
    padding: .65rem .75rem;
    border: 1px solid #d2dff1;
    border-radius: 8px;
    color: #304b71;
    background: #f4f8ff;
}

.chain-clues summary {
    font-weight: 700;
    cursor: pointer;
}

.chain-clues ul {
    margin: .5rem 0 0;
    padding-left: 1.25rem;
}

.chain-board {
    position: relative;
    margin-top: 1rem;
    border: 1px solid #d0e2e6;
    border-radius: 12px;
    background: #f3f9f7;
}

.chain-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem 1.8rem;
    padding: 1.1rem;
}

.chain-cards button {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    min-height: 67px;
    padding: .35rem .55rem;
    border: 1px solid #84a9a9;
    border-radius: 9px;
    background: #fff;
    color: #143a44;
    font: inherit;
    line-height: 1.28;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.chain-cards button span {
    margin-top: .23rem;
    color: #45666e;
    font-size: .78rem;
}

.chain-cards button[aria-pressed="true"] {
    outline: 2px solid #09756d;
    outline-offset: 2px;
    background: #e3f4ef;
}

.chain-arrows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.chain-arrows g path {
    fill: none;
    stroke: #285e85;
    stroke-width: 2.6;
}

.chain-arrows path[data-state="correct"] {
    stroke: #15714e;
}

.chain-arrows path[data-state="incorrect"] {
    stroke: #ac2c36;
    stroke-dasharray: 4 3;
}

.chain-relations {
    display: grid;
    gap: .4rem;
    padding: 0;
    margin: .55rem 0 0;
    list-style: none;
}

.chain-relations li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 38px;
    padding: .25rem .65rem;
    border: 1px solid #d7e0ee;
    border-radius: 8px;
    color: #243f67;
    overflow-wrap: anywhere;
}

.chain-relations li[data-state="correct"] {
    border-color: #a1caaf;
    background: #f0faf4;
}

.chain-relations li[data-state="incorrect"] {
    border-color: #e1aaa9;
    background: #fff1f2;
}

.chain-relations button {
    border: 0;
    min-height: 34px;
    background: none;
    color: #1649a3;
    font: inherit;
    font-size: .88rem;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 540px) {
    .workshop-selects {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .workshop-selects label:nth-child(2) {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .chain-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.7rem 1rem;
        padding: .6rem;
    }

    .chain-cards button {
        font-size: .86rem;
    }

    .chain-cards :is([data-organism="ecureuil"], [data-organism="campagnol"], [data-organism="tetard"]) {
        grid-area: 2 / 1;
    }

    .chain-cards :is([data-organism="huppe"], [data-organism="crecerelle"], [data-organism="poisson"]) {
        grid-area: 2 / 2;
    }
}
