* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Josefin Sans', sans-serif;
    background: #d9b98a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #3b2415;
}

.scene {
    width: 100%;
    max-width: 500px;
}

.screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sheriff-badge {
    font-size: 60px;
    color: #b8860b;
    text-shadow: 2px 2px 0 #5a3c1e;
    margin-bottom: 10px;
}

.title {
    font-family: 'Sancreek', cursive;
    font-size: 2.2em;
    color: #7a2e1d;
    text-shadow: 2px 2px 0 #e8c99b;
    margin-bottom: 15px;
    line-height: 1.2;
}

.title.small {
    font-size: 1.6em;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #4b3826;
}

.btn-wood {
    font-family: 'Sancreek', cursive;
    font-size: 1.2em;
    letter-spacing: 1px;
    background: linear-gradient(#8b5a2b, #6b3f1d);
    color: #f5e3c3;
    border: 3px solid #4a2c14;
    border-radius: 8px;
    padding: 14px 30px;
    cursor: pointer;
    box-shadow: 0 4px 0 #3b2010;
    transition: transform 0.1s;
}

.btn-wood:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #3b2010;
}

.btn-wood:hover {
    background: linear-gradient(#9a6633, #7a4a24);
}

.btn-wood:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.poster {
    background: #f0e0bc;
    border: 6px double #7a2e1d;
    border-radius: 6px;
    padding: 25px 20px;
    box-shadow: 0 0 0 3px #f0e0bc, 0 6px 20px rgba(0, 0, 0, 0.3);
}

.question-block {
    text-align: left;
    margin-bottom: 25px;
}

.question-block > label:first-child {
    display: block;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #5a3c1e;
}

.hint {
    font-size: 0.85em;
    color: #7a6248;
    margin-bottom: 10px;
    font-style: italic;
}

#q1 {
    width: 100%;
    padding: 10px;
    border: 2px solid #8b5a2b;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    background: #fff8ec;
}

.autocomplete-wrapper {
    position: relative;
}

.suggestions-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    list-style: none;
    background: #fff8ec;
    border: 2px solid #8b5a2b;
    border-radius: 5px;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.suggestions-list.show {
    display: block;
}

.suggestions-list li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #e0c9a0;
    font-size: 0.95em;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover,
.suggestions-list li.active {
    background: #e8c99b;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    background: #fff8ec;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #c9a876;
    cursor: pointer;
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    accent-color: #7a2e1d;
}

.hidden-input {
    display: none;
    margin-top: 8px;
    width: 100%;
    padding: 8px;
    border: 2px solid #8b5a2b;
    border-radius: 5px;
    font-family: inherit;
}

.hidden-input.show {
    display: block;
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8em;
    }
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(59, 36, 21, 0.65);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #f0e0bc;
    border: 6px double #7a2e1d;
    border-radius: 6px;
    padding: 25px 20px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 0 3px #f0e0bc, 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.25s ease;
}

.modal-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.modal-message {
    font-size: 1.05em;
    color: #4b3826;
    margin-bottom: 20px;
    line-height: 1.4;
}