
@layer reset {
*,
    *::before,
    *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        color-scheme: light dark;
        -webkit-font-smoothing: antialiased;
        -webkit-text-size-adjust: none;
        text-size-adjust: none;
        hanging-punctuation: first allow-end last;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-wrap: balance;
    }

    p {
        text-wrap: pretty;
    }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

html {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
}

.is-inactive {
    display: none !important;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: 16px;
}

.spell {
    padding: 2rem 1rem;
    max-width: 680px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.title {
    font-size: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.game-info {
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-bottom: 5px solid #fff;
}

.letter-button {
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    border: none;
}

.letter-button--class {
    cursor: pointer;
    display: grid;
    position: relative;
}

.letter-button--class .letter-button__value {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.letter-button--class-sorcerer {
    background-color: #ff6666;
}

.letter-button--class-wizard {
    background-color: #6b98d4;
}

.letter-button--class-warlock {
    background-color: #de70e8;
}

.button {
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.instructions {
    max-width: 70ch;
    text-wrap: pretty;
    line-height: 1.5;
}

.subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.instructions-container {
    margin-bottom: 1rem;
}

.letters {
    padding: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.letters button {
    font-family: inherit;
    position: relative;
    cursor: pointer;
    transition: background 0.3s linear;
}

.letters button:hover {
    background-color: #adadad;
}

.letter-button__letter {
    font-size: 1.5rem;
    pointer-events: none;
    padding: 4px;
}

.instructions__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}


.letter-button__value {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 10px;
    color: #666;
    pointer-events: none;
    padding: 4px;
}

.word {
    letter-spacing: 8px;
    padding: 1rem 0;
}

.end-game p {
    margin-bottom: 1rem;
}

.button.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

dialog {
    margin: auto;
    padding: 0;
    position: fixed;
    inset: 0;
    max-block-size: min(80vh, 100%);
    max-block-size: min(80dvb, 100%);
    padding: 2rem;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
}

.dialog-title {
    padding: 0rem 0 3rem 0;
}

.class-options {
    display: flex;
    gap: 24px;
    text-align: center;
    justify-content: center;
}

.class-options li {
    list-style: none;
    display: grid;
    justify-content: center;
}

.letter-button__title {
    display: block;
    margin-bottom: 1rem;
}

.start-container {
    padding-top: 2rem;
}

.letter-button--class-chosen {
    background-color: rgb(212, 107, 165);
}

.letter-button--class-chosen .letter-button__value {
    color: #fff;
}

.letter-button--saved {
    background-color: rgb(243, 255, 178);
}