.icon-btn {
    background: transparent;
    border: none;
    color: var(--c-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--s-quarter);
    position: relative;
    z-index: 10;
}

.icon-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--c-text);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon-btn.active svg {
    fill: var(--c-like);
    stroke: var(--c-like);
}

.box {
    margin-bottom: var(--s-base);
    border: 1px solid var(--c-border);
    padding: var(--s-base);
    position: relative;
    overflow-wrap: break-word;
    word-break: break-word;
}

.grid-3 .box {
    font-size: var(--f-size-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
}

.box.single {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--s-base);
    padding: var(--s-double);
}

.box p {
    font-size: var(--f-size-sm);
}

.box.single p {
    font-size: var(--f-size-md);
    text-align: center;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--s-base);
}

.num {
    font-size: var(--f-size-sm);
    font-weight: normal;
    margin-right: var(--s-half);
}

.num::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
}

.actions-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 10;
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.center-actions {
    display: flex;
    align-items: center;
    gap: var(--s-half);
}

.bottom-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    border: 1px solid var(--c-border);
    padding: var(--s-base);
    margin-bottom: var(--s-base);
}

.bottom-nav>*:nth-child(1) {
    justify-self: start;
    text-align: left;
}

.bottom-nav>*:nth-child(2) {
    justify-self: center;
    text-align: center;
}

.bottom-nav>*:nth-child(3) {
    justify-self: end;
    text-align: right;
}

.nav-dir-btn {
    width: auto;
    font-size: var(--f-size-sm);
    gap: var(--s-half);
}

.nav-center-btn {
    background: transparent;
    color: var(--c-text);
    border: none;
    cursor: pointer;
    font-size: var(--f-size-sm);
    text-transform: none;
    gap: var(--s-half);
}

.nav-row.centered {
    justify-content: center;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: var(--c-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    opacity: 0;
    animation: modalFadeIn 0.2s ease forwards;
}

@keyframes modalFadeIn {
    to {
        opacity: 1;
    }
}

.modal.centered {
    justify-content: center;
    align-items: center;
}

.modal.centered .container {
    flex: none;
}

.modal .container {
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: var(--s-double) var(--s-base);
}

.modal-close {
    position: fixed;
    top: var(--s-base);
    right: var(--s-base);
    z-index: 2100;
}

.modal input.box {
    width: 100%;
    text-align: center;
    font-size: var(--f-size-xl);
    padding: var(--s-base);
    background: transparent;
    color: var(--c-text);
    font-family: inherit;
    outline: none;
}

.color-picker {
    display: flex;
    justify-content: center;
    gap: var(--s-base);
    margin-bottom: var(--s-base);
}

.color-swatch {
    width: var(--s-double);
    height: var(--s-double);
    border: 1px solid var(--c-border);
    cursor: pointer;
}

.color-swatch.active {
    outline: 2px solid var(--c-text);
    outline-offset: 2px;
}

.size-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-half);
    width: 100%;
}

.size-btn {
    width: 100%;
    padding: var(--s-base);
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--c-border);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--f-size-sm);
    text-align: center;
}

@media (max-width: 600px) {
    .bottom-nav {
        grid-template-columns: 1fr;
        gap: var(--s-base);
    }

    .bottom-nav>*:nth-child(1),
    .bottom-nav>*:nth-child(2),
    .bottom-nav>*:nth-child(3) {
        justify-self: center;
        text-align: center;
    }
}

.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
    gap: var(--s-half);
    margin-bottom: var(--s-base);
}

.alphabet-grid .box {
    margin-bottom: 0;
    padding: var(--s-half);
    cursor: pointer;
    text-align: center;
}

.box.active {
    background: var(--c-text);
    color: var(--c-bg);
}