.hero.is-dark {
    background:
            radial-gradient(circle at top right, rgba(253, 227, 171, 0.18), transparent 28%),
            linear-gradient(135deg, #363636, #4b4b4b 55%, #5a564e);
}

#pw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

#pw-form-card,
#pw-result-card {
    border: 2px solid #2f2f2f;
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: 8px 8px 0 rgba(47, 47, 47, 0.08);
    padding: 1.4rem;
}

#pw-form-header,
#pw-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

#pw-form-title,
#pw-result-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
    color: #2f2f2f;
}

#pw-helper-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid #e4d6b8;
    border-radius: 18px;
    background: #f8efdc;
}

#pw-helper-text {
    margin: 0;
    color: #5d5547;
    line-height: 1.5;
}

#pw-example-button {
    border-radius: 999px;
    border: 1px solid #d9caa8;
    background: #fff;
    font-weight: 700;
    color: #5e5137;
}

#parameter-section {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.parameter-field {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.parameter-input-wrap {
    flex: 1;
}

.parameter-input {
    min-height: 3.15rem;
    border: 2px solid #d9caa8;
    border-radius: 16px;
    background: #fffdf8;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.parameter-input:hover {
    border-color: #c7b489;
}

.parameter-input:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 0.2rem rgba(253, 227, 171, 0.8);
}

.remove-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.15rem;
    min-width: 3.15rem;
    border: 2px solid #2f2f2f;
    border-radius: 16px;
    background: #fff;
    color: #c54a4a;
    font-size: 1.35rem;
    font-weight: 800;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
    cursor: pointer;
}

.remove-button:hover {
    background: #fff0f0;
    color: #a83131;
    transform: translateY(-1px);
}

.remove-button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

#pw-controls-row {
    margin-top: 1rem;
}

#delimiter-select {
    min-width: 100%;
    border-width: 2px;
    border-color: #d9caa8;
    border-radius: 14px;
    background: #fffdf8;
}

#delimiter-select:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 0.2rem rgba(253, 227, 171, 0.8);
}

#pw-action-row {
    margin-top: 1.25rem;
    margin-bottom: 0;
    gap: 0.75rem;
}

#add-parameter,
#generate,
#pw-result-actions .button {
    min-height: 3rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    border-radius: 14px;
    font-weight: 800;
}

#add-parameter {
    border: 2px solid #2f2f2f;
    background: #fff;
}

#pw-result-card {
    background: #fff;
    animation: pwFadeUp 0.28s ease;
}

.pw-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 2.4rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 2px solid #2f2f2f;
    background: #fde3ab;
    font-weight: 800;
    color: #2f2f2f;
    line-height: 1;
    flex-shrink: 0;
}

#result {
    margin: 0;
    padding: 1rem;
    border: 1px solid #e8dfcf;
    border-radius: 18px;
    background: var(--card-bg);
    color: #2d2d2d;
    font-size: 0.96rem;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 120px;
}

#pw-result-actions {
    margin-top: 1rem;
    margin-bottom: 0;
}

#pw-learn-more {
    margin-top: 1rem;
    text-align: center;
}

#pw-learn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid #e4d6b8;
    color: #4f4636;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, background-color 0.18s ease;
}

#pw-learn-link:hover {
    background: #f3e5c5;
    transform: translateY(-1px);
}

@keyframes pwFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (min-width: 900px) {
    #pw-layout {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        align-items: start;
    }

    #pw-result-card {
        position: sticky;
        top: 1.5rem;
    }
}

@media screen and (max-width: 640px) {
    #pw-form-card,
    #pw-result-card {
        padding: 1rem;
        border-radius: 20px;
        box-shadow: 5px 5px 0 rgba(47, 47, 47, 0.08);
    }

    .parameter-field {
        gap: 0.55rem;
    }

    .remove-button {
        width: 2.9rem;
        min-width: 2.9rem;
    }

    #pw-form-header,
    #pw-result-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

#pw-result-card[hidden] {
    display: none !important;
}
