.royal-member-portal {
    --portal-gold: #D4AF37;
    --portal-ivory: #FAF6E9;
    --portal-brown: #2C1E0F;
    --portal-muted: #725b3d;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 100vh;
    min-height: 100vh;

    padding: clamp(18px, 4vw, 64px);
    margin-top:80px;

    box-sizing: border-box;

    color: var(--portal-brown);
    background: var(--portal-ivory);
    font-family: Georgia, "Times New Roman", serif;

}

.royal-member-portal *, .royal-member-portal *::before, .royal-member-portal *::after { box-sizing: border-box; }
.royal-member-portal__card, .royal-member-portal__panel { position: relative; width: 100%; max-width: 780px; margin: 0 auto; padding: clamp(26px, 6vw, 68px); border: 1px solid var(--portal-gold); background: #fffdf6; box-shadow: 0 16px 45px rgba(44, 30, 15, .09); text-align: center; }
.royal-member-portal__card::before, .royal-member-portal__panel::before { position: absolute; inset: 8px; border: 1px solid rgba(212, 175, 55, .45); content: ""; pointer-events: none; }
.royal-member-portal__ornament { color: var(--portal-gold); font-size: 13px; }
.royal-member-portal__eyebrow { margin: 14px 0 24px; color: var(--portal-muted); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; }
.royal-member-portal__portrait { display: block; width: min(240px, 70vw); aspect-ratio: 4 / 5; margin: 0 auto 28px; border: 1px solid var(--portal-gold); padding: 5px; object-fit: cover; background: var(--portal-ivory); }
.royal-member-portal__name, .royal-member-portal__title { overflow-wrap: anywhere; margin: 0; color: var(--portal-brown); font-size: clamp(28px, 5.5vw, 55px); font-weight: 400; letter-spacing: .05em; line-height: 1.12; }
.royal-member-portal__title { font-size: clamp(28px, 5vw, 42px); }
.royal-member-portal__position { margin: 13px 0 0; color: var(--portal-muted); font-size: clamp(12px, 3vw, 20px); }
.royal-member-portal__divider { width: min(420px, 80%); height: 1px; margin: 32px auto; background: var(--portal-gold); }
.royal-member-portal__section-title { margin: 0 0 16px; color: var(--portal-muted); font-size: 13px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; }
.royal-member-portal__details { margin: 0; text-align: left; }
.royal-member-portal__detail { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(0, 1.3fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid rgba(212, 175, 55, .35); }
.royal-member-portal__detail dt { color: var(--portal-muted); font-size: 14px; }
.royal-member-portal__detail dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: clamp(12px, 1.5vw, 20px);}
.royal-member-portal__past-list { margin: 0; padding-left: 1.2em; }
.royal-member-portal__past-list li + li { margin-top: 6px; }
.royal-member-portal__past-list li{ font-size: clamp(12px, 1.5vw, 20px); }
.royal-member-portal__extras { display: grid; grid-column: 1 / -1; gap: 34px; margin-top: 36px; }
.royal-member-portal__extra { padding-top: 28px; border-top: 1px solid var(--portal-gold); }
.royal-member-portal__extra-layout { display: grid; grid-template-columns: minmax(300px, 528px) minmax(220px, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.royal-member-portal__extra-media { display: grid; width: 100%; max-width: 528px; aspect-ratio: 528 / 388; place-items: center; overflow: hidden; border: 1px solid var(--portal-gold); color: var(--portal-muted); background: var(--portal-ivory); }
.royal-member-portal__extra-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.royal-member-portal__extra-details .royal-member-portal__detail { grid-template-columns: minmax(115px, .85fr) minmax(0, 1.15fr); }
.royal-member-portal__qr { text-align: center; }
.royal-member-portal__qr-image { width: min(320px, 100%); margin: 20px auto 16px; padding: clamp(12px, 3vw, 20px); border: 1px solid var(--portal-gold); background: #fff; }
.royal-member-portal__qr-image .royal-member-qr-image { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; }
.royal-member-portal__qr-url { max-width: 100%; margin: 14px auto 0; overflow-wrap: anywhere; color: var(--portal-muted); font-size: 13px; }
.royal-member-portal__qr-url a { color: inherit; }
.royal-member-portal__qr-action { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 0; }
.royal-member-portal__qr-unavailable { margin: 18px 0 0; color: var(--portal-muted); }
.royal-member-portal__actions, .royal-member-portal__secondary { margin: 30px 0 0; text-align: center; }
.royal-member-portal__button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 11px 24px; border: 1px solid var(--portal-gold); color: var(--portal-brown); background: transparent; font: inherit; text-decoration: none; cursor: pointer; }
.royal-member-portal .royal-member-portal__button:hover,
.royal-member-portal .royal-member-portal__button:focus,
.royal-member-portal .royal-member-portal__button:focus-visible,
.royal-member-portal .royal-member-portal__button:active {
    border-color: #C39B59 !important;
    color: var(--portal-brown) !important;
    background: #C39B59 !important;
    text-decoration: none !important;
}
.royal-member-portal__form {position: relative;display: grid;grid-template-columns: minmax(0, 1fr);width: 100%;min-width: 0;gap: 18px;margin-top: 30px;text-align: left;}
.royal-member-portal__form > * {min-width: 0;}
.royal-member-portal__input {max-width: 100%;}
.royal-member-portal__form .royal-member-portal__button {width: 100%;min-width: 0;white-space: normal;text-align: center;}
.royal-member-portal__label { display: grid; gap: 7px; color: var(--portal-muted); }
.royal-member-portal__input { width: 100%; min-height: 46px; border: 1px solid rgba(114, 91, 61, .45); padding: 10px 12px; color: var(--portal-brown); background: #fff; font: inherit; }
.royal-member-portal__check { display: flex; gap: 9px; align-items: center; }
.royal-member-portal__message { position: relative; margin: 20px 0 0; line-height: 1.6; }
.royal-member-portal__secondary a { color: var(--portal-brown); }
.royal-member-portal__password-group { display: grid; gap: 7px; }
.royal-member-portal__password-field { position: relative; width: 100%; }
.royal-member-portal__password-field .royal-member-portal__input { padding-right: 52px; }
.royal-member-portal__password-toggle { position: absolute; z-index: 1; top: 50%; right: 5px; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 4px; color: var(--portal-brown); background: transparent; cursor: pointer; transform: translateY(-50%); }
.royal-member-portal__password-toggle:hover { background: rgba(212, 175, 55, .12); }
.royal-member-portal__password-toggle:focus-visible { outline: 2px solid var(--portal-gold); outline-offset: 1px; }
.royal-member-portal__password-toggle svg { display: block; width: 20px; height: 20px; fill: currentColor; pointer-events: none; }

.royal-member-portal--profile .royal-member-portal__card { width: 100%; max-width: 1120px; margin-top: clamp(35px, 3vw, 50px); margin-bottom: clamp(35px, 3vw, 50px); }
.royal-member-portal__profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.royal-member-portal__profile-grid .royal-member-portal__qr { position: relative; margin-top: 32px; padding-top: 33px; }
.royal-member-portal__profile-grid .royal-member-portal__qr::before { position: absolute; top: 0; left: 50%; width: min(420px, 80%); height: 1px; background: var(--portal-gold); content: ""; transform: translateX(-50%); }

@media (min-width: 1025px) {
	.royal-member-portal__profile-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(36px, 5vw, 64px); align-items: start; }
	.royal-member-portal__profile-grid .royal-member-portal__qr { min-width: 0; margin-top: 0; border-left: 1px solid rgba(212, 175, 55, .45); padding-top: 0; padding-left: clamp(36px, 5vw, 64px); }
	.royal-member-portal__profile-grid .royal-member-portal__qr::before { content: none; }
	.royal-member-portal__profile-grid .royal-member-portal__qr-image { width: min(300px, 100%); margin-top: 20px; }
}

@media (max-width: 1024px) {
	.royal-member-portal {
    margin-top:50px;

}
}

@media (max-width: 760px) {
	.royal-member-portal__extra-layout { grid-template-columns: 1fr; }
	.royal-member-portal__extra-media { width: min(528px, 100%); margin: 0 auto; }
	.royal-member-portal__name {font-size:5vw;}
	.royal-member-portal__position{ font-size:2.5vw; }
	.royal-member-portal__detail dd {font-size: 3vw; }
	.royal-member-portal__past-list li{ font-size: 3vw; }
}


@media (max-width: 520px) {
    .royal-member-portal { padding: 30px; }
    .royal-member-portal__card, .royal-member-portal__panel { padding: 34px 22px; }
    .royal-member-portal__detail { grid-template-columns: 1fr; gap: 5px; }
	.royal-member-portal__extra-layout { gap: 18px; }
	.royal-member-portal__extra-details .royal-member-portal__detail { grid-template-columns: 1fr; }
	.royal-member-portal__qr-image { width: 100%; }
	.royal-member-portal__name {font-size:5vw;}
	.royal-member-portal__position{ font-size:2.5vw; }
	.royal-member-portal__detail dd {font-size: 3vw; }
	.royal-member-portal__past-list li{ font-size: 3vw; }
}

@media (max-width: 375px) {
	.royal-member-portal__name {font-size:4.5vw;}
	.royal-member-portal__position { font-size:2.3vw; }
}
