* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Courier New", monospace;
    background: #fff;
}

.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
}

.dog-stage {
    position: relative;
    width: min(350px, 76vw);
}

.login-dog {
    display: block;
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
}

.speech-bubble {
    position: absolute;
    z-index: 1;
    top: 13%;
    right: calc(100% - 35px);
    width: max-content;
    max-width: 230px;
    margin: 0;
    padding: 15px 18px;
    border: 1px solid #555;
    border-radius: 18px;
    background: #fff;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    white-space: nowrap;
    animation: bubble-appear 500ms ease-out both;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    right: -9px;
    bottom: 20px;
    width: 15px;
    height: 15px;
    border-top: 1px solid #555;
    border-right: 1px solid #555;
    background: #fff;
    transform: rotate(45deg);
}

@keyframes bubble-appear {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.enter-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 142px;
    color: #444;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 150ms ease;
}

.paw {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: #fff;
    stroke: #555;
    stroke-width: 1.4;
}

.enter-button span {
    position: relative;
    margin-top: 57px;
}

.enter-button:hover {
    transform: scale(1.06);
}

.enter-button:focus-visible {
    outline: 2px solid #444;
    outline-offset: 3px;
    border-radius: 40%;
}

.white-transition {
    position: fixed;
    z-index: 10;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 650ms ease-in-out;
}

.is-entering .white-transition {
    opacity: 1;
}

@media (max-width: 650px) {
    .speech-bubble {
        top: -65px;
        left: 0;
        right: auto;
        padding: 10px 12px;
        font-size: 12px;
    }

    .speech-bubble::after {
        right: 22px;
        bottom: -9px;
        border-top: 0;
        border-right: 1px solid #555;
        border-bottom: 1px solid #555;
    }
}

@media (prefers-reduced-motion: reduce) {
    .speech-bubble { animation: none; }
    .enter-button { transition: none; }
    .white-transition { transition: none; }
}
