/* Shared layout: retain the original white page and light gray rounded panel. */
* {
    box-sizing: border-box;
}

body {
    margin: 8px;
    color: #000;
    background: #fff;
    font-family: Arial, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    line-height: 1.6;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.head img {
    display: block;
    width: 140px;
    max-width: 100%;
    height: auto;
}

.head a {
    display: inline-block;
}

.main {
    padding: 20px 20px 32px;
    border-radius: 20px;
    background: #f2f2f2;
    text-align: center;
}

h1 {
    margin: 30px 0 22px;
    font-size: clamp(38px, 6vw, 60px);
    line-height: 1.25;
}

.intro {
    margin: 10px 0 20px;
    color: #4b4b4b;
    font-size: 16px;
}

/* Highlight the address digits consistently. */
.domain-number {
    color: #e21b2e;
    font-size: 1.15em;
    font-weight: 800;
}

.domain-address {
    margin: 12px 0 2px;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 700;
}

/* Two stacked pill buttons keep the source template's border colors. */
.actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.button {
    display: inline-block;
    width: 360px;
    max-width: 100%;
    padding: 9px 24px;
    border: 2px solid;
    border-radius: 50px;
    background: #fff;
    color: #000;
    font-size: 16px;
    font-weight: 700;
    line-height: 25px;
    text-decoration: none;
}

.button-primary {
    border-color: #501dd2;
}

.button-secondary {
    border-color: #ff761c;
}

.button:hover {
    background: #faf8ff;
}

.button:focus-visible,
.head a:focus-visible {
    outline: 3px solid #501dd2;
    outline-offset: 4px;
}

.button-note {
    color: #595959;
    font-size: 14px;
    font-weight: 400;
}

.button-domain {
    font-size: 20px;
}

/* A compact side note explains the address beneath the entry buttons. */
.address-tip {
    width: 360px;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 12px 16px;
    border-left: 3px solid #501dd2;
    background: #fff;
    color: #4b4b4b;
    font-size: 14px;
    text-align: left;
}

/* The standalone 404 reuses the logo, panel, address and button styles. */
.error-code {
    margin: 10px 0;
    color: #501dd2;
    font-size: clamp(72px, 14vw, 120px);
    font-weight: 700;
    line-height: 1.2;
}

.error-page h1 {
    margin: 16px 0;
    font-size: clamp(24px, 5vw, 36px);
}

@media (max-width: 480px) {
    .main {
        padding: 24px 16px;
    }

    h1 {
        margin-top: 16px;
    }

    .intro {
        font-size: 15px;
    }
}
