html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #6b8f71;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

html, body, #app {
    height: 100%;
    height: 100dvh;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

#app {
    position: fixed;
    inset: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #e8f0e3;
}

#canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    touch-action: none;
}

.garden-join-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(38, 75, 48, 0.46);
    touch-action: auto;
    user-select: text;
    -webkit-user-select: text;
}

.garden-join-overlay[hidden] {
    display: none !important;
}

.garden-join-card {
    width: min(100%, 340px);
    padding: 22px 20px 18px;
    border-radius: 18px;
    background: #f8efcf;
    box-shadow: 0 12px 40px rgba(38, 75, 48, 0.28);
    color: #402e22;
    font-family: "Atkinson Hyperlegible Next", "Segoe UI", sans-serif;
}

.garden-join-card h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 600;
}

.garden-join-warning,
.garden-join-label,
.garden-join-error {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.4;
}

.garden-join-label {
    display: block;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6c5644;
}

.garden-join-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 2px solid #684425;
    border-radius: 12px;
    background: #fff8e8;
    color: #402e22;
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.garden-join-error {
    min-height: 1.2em;
    color: #97182b;
}

.garden-join-primary,
.garden-join-secondary {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 0;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
}

.garden-join-primary {
    background: #507739;
    color: #f8efcf;
}

.garden-join-secondary {
    background: #e8d6a3;
    color: #402e22;
}

body.garden-join-open {
    touch-action: auto;
}

@media (display-mode: standalone) {
    html, body {
        background: #6b8f71;
    }

    #app {
        background: #e8f0e3;
    }
}
