/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;

    font-family: system-ui, -apple-system, sans-serif;
    
    background: #f6f7fb;
    color: #1a1a1a;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    overscroll-behavior-y: none;
    overscroll-behavior-x: none;
}

#app {
    width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
    overflow: hidden;

    padding: 0;
}


.screen-layer {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0 auto;
    padding: 28px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    justify-content: flex-start;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));

    transition: transform 0.3s ease;
}

h1 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-align: center;

    margin-top: 10px;
    margin-bottom: 10px;
}

p, label {
    font-size: 15.5px;
    line-height: 1.6;
    color: #444;
}

p {
    text-align: justify;
    hyphens: auto;
}

button {
    background: white;
    color: #111;

    border: 1px solid #ccc;
    border-radius: 6px;


    display: block;
    width: 100%;
    max-width: 420px;

    margin: 12px auto;

    text-align: center;
    hyphens: none;

    padding: 14px 16px;

    font-size: 16px;
    font-weight: 500;

    transition: transform 0.08s ease, opacity 0.2 ease;
}

button:active {
    transform: scale(0.98);
    opacity: 0.85;
}

form {
    width: 100%;
    max-width: 400px;

    display: flex;
    flex-direction: column;
    gap: 15px;

    text-align: left;
}

.vertical-input {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vertical-input label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    width: 100%;
    padding-left: 10px;
}

.likert {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    max-width: 420px;
    width: 100%;
}

.likert label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12;
    color: #555;
    text-align: center;
}

input {
    width: 100%;
    padding: 14px;

    font-size: 16px;

    border-radius: 12px;
    border: 1px solid #ddd;

    background: white;

    text-align: center;
    letter-spacing: 2px;
}

input:focus {
    outline: none;
    border-color: #333;
}

#consent .consent-title {
    text-align: center;
    hyphens: none;
}

#consent ol {
    padding-left: 1.4em;
    margin-left: 0;
}

#consent li {
    list-style-position: outside;
    line-height: 1.5;
    margin-bottom: 4px;
}

#ds-ui {
    width: 100%;
    max-width: 300px;

    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#response {
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
}

#indicator {
    width: 100%;
    max-width: 300px;

    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;

    font-size: 40px;

    opacity: 0.8;
}

hr {
    border: none;
    height: 1px;
    background: #eee;
    margin: 12px 0;
}

[hidden] {
    display: none !important;
}

* {
    -webkit-tap-highlight-color: transparent;
}

#confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}