:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: #16324a;
    background: #eef6f7;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 12%, rgba(72, 181, 187, 0.16), transparent 34%),
        radial-gradient(circle at 88% 82%, rgba(25, 95, 139, 0.12), transparent 38%),
        #eef6f7;
}

a {
    color: inherit;
}

.login-portal {
    display: grid;
    min-height: 100vh;
    padding: 48px 24px;
    place-items: center;
}

.login-portal__panel {
    width: min(100%, 980px);
    padding: clamp(32px, 5vw, 64px);
    border: 1px solid rgba(24, 83, 111, 0.1);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 80px rgba(25, 67, 88, 0.13);
}

.login-portal__header {
    max-width: 650px;
    margin: 0 auto 38px;
    text-align: center;
}

.login-portal__brand {
    margin: 0 0 22px;
    color: #167b82;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.login-portal__eyebrow {
    margin: 0 0 10px;
    color: #6b8491;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.login-portal h1 {
    margin: 0;
    color: #14354c;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.login-portal__lead {
    margin: 14px 0 0;
    color: #607986;
    font-size: 15px;
    line-height: 1.8;
}

.login-portal__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.login-portal__clinic-stack {
    display: grid;
    gap: 14px;
}

.login-choice {
    border: 1px solid #d5e4e7;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(30, 74, 92, 0.08);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.login-choice,
.login-choice summary {
    display: flex;
    min-height: 150px;
    align-items: center;
    gap: 18px;
    padding: 26px;
    text-decoration: none;
}

.login-choice summary {
    cursor: pointer;
    list-style: none;
}

.login-choice summary::-webkit-details-marker {
    display: none;
}

a.login-choice:hover,
.login-choice--agency:not([open]):hover,
.login-choice--agency[open] {
    border-color: #5ca8ad;
    box-shadow: 0 18px 38px rgba(30, 103, 111, 0.14);
    transform: translateY(-2px);
}

a.login-choice:focus-visible,
.login-choice summary:focus-visible,
.agency-type:focus-visible {
    outline: 3px solid rgba(24, 132, 141, 0.3);
    outline-offset: 4px;
}

.login-choice__icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(145deg, #208b92, #176b82);
    place-items: center;
}

.login-choice--agency .login-choice__icon {
    background: linear-gradient(145deg, #315c86, #263f6b);
}

.login-choice--staff .login-choice__icon {
    background: linear-gradient(145deg, #e18b3c, #bd5e32);
}

.login-choice--staff .login-choice__type {
    color: #b8622f;
}

a.login-choice--staff {
    min-height: 118px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.login-choice__icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-choice__content {
    display: grid;
    flex: 1;
    gap: 5px;
}

.login-choice__content strong {
    color: #173a50;
    font-size: 21px;
}

.login-choice__content > span:last-child {
    color: #6c818b;
    font-size: 13px;
    line-height: 1.6;
}

.login-choice__type {
    color: #1d878d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.login-choice--agency .login-choice__type {
    color: #526e99;
}

.login-choice__arrow {
    color: #278a91;
    font-size: 24px;
}

.login-choice__chevron {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-right: 2px solid #557184;
    border-bottom: 2px solid #557184;
    transform: rotate(45deg) translateY(-3px);
    transition: transform 160ms ease;
}

.login-choice--agency[open] .login-choice__chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.agency-types {
    display: grid;
    gap: 10px;
    padding: 0 18px 18px;
}

.agency-type {
    display: flex;
    min-height: 82px;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid #e0e8ec;
    border-radius: 14px;
    background: #f8fbfc;
    text-decoration: none;
    transition: border-color 150ms ease, background 150ms ease;
}

.agency-type:hover {
    border-color: #9dc5ca;
    background: #f0f8f8;
}

.agency-type__badge {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    color: #fff;
    background: #1b858b;
    font-size: 15px;
    font-weight: 800;
    place-items: center;
}

.agency-type__badge--b {
    background: #536c9d;
}

.agency-type__content {
    display: grid;
    flex: 1;
    gap: 4px;
}

.agency-type__content strong {
    color: #183a50;
    font-size: 14px;
}

.agency-type__content span {
    color: #738691;
    font-size: 11px;
    line-height: 1.5;
}

.agency-type__arrow {
    color: #66808e;
    font-size: 18px;
}

.login-portal__note {
    margin: 30px 0 0;
    color: #758992;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

@media (max-width: 760px) {
    .login-portal {
        padding: 22px 14px;
        place-items: start center;
    }

    .login-portal__panel {
        padding: 30px 18px;
        border-radius: 22px;
    }

    .login-portal__header {
        margin-bottom: 26px;
    }

    .login-portal__choices {
        grid-template-columns: 1fr;
    }

    a.login-choice,
    .login-choice summary {
        min-height: 126px;
        padding: 21px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
