/* TravianZ mobile-only authentication UI
 * Login + registration are deliberately independent from the legacy desktop menu.
 */

body.mz-auth-page {
    --auth-green: #5d7d2a;
    --auth-green-dark: #405d18;
    --auth-ink: #312c24;
    --auth-muted: #746b5e;
    --auth-line: #d8cfbf;
    --auth-paper: #fffdf8;
    --auth-bg: #e9e1d2;
    min-height: 100dvh;
    padding: 0 !important;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% -5%, rgba(255,255,255,.9) 0, rgba(255,255,255,0) 36%),
        linear-gradient(180deg, #d9d0bd 0, #eee7da 42%, #e6decf 100%) !important;
    color: var(--auth-ink);
    font-family: Arial, Helvetica, sans-serif;
}

body.mz-auth-page .wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 480px !important;
    min-height: 100dvh;
    margin: 0 auto !important;
    padding: 0 0 calc(24px + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
}

body.mz-auth-page #dynamic_header,
body.mz-auth-page #header,
body.mz-auth-page #side_navi,
body.mz-auth-page #side_info,
body.mz-auth-page .footer-stopper,
body.mz-auth-page #footer,
body.mz-auth-page #ce {
    display: none !important;
}

body.mz-auth-page #mid {
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 12px 18px !important;
}

.mz-auth-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: calc(62px + env(safe-area-inset-top));
    margin: 0 -12px 14px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 9px;
    background: linear-gradient(180deg, rgba(91,121,42,.98), rgba(66,92,24,.98));
    border-bottom: 1px solid rgba(42,58,16,.72);
    box-shadow: 0 3px 14px rgba(45,39,29,.18);
    color: #fff;
}

.mz-auth-home,
.mz-auth-switch {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.26);
    border-radius: 12px;
    background: rgba(117,94,26);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    touch-action: manipulation;
}

.mz-auth-home {
    width: 46px;
    font-size: 27px;
    line-height: 1;
}

.mz-auth-switch {
    padding: 0 11px;
    font-size: 12px;
    white-space: nowrap;
}

.mz-auth-brand {
    min-width: 0;
    text-align: left;
}

.mz-auth-brand strong,
.mz-auth-brand span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mz-auth-brand strong {
    font: 700 17px/19px Georgia, "Times New Roman", serif;
    letter-spacing: .3px;
    text-shadow: 0 1px 1px rgba(0,0,0,.26);
}

.mz-auth-brand span {
    margin-top: 2px;
    color: rgba(255,255,255,.78);
    font-size: 11px;
    line-height: 13px;
}

body.mz-auth-page #content,
body.mz-auth-page #content.login,
body.mz-auth-page #content.signup {
    float: none !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
}

/* Login */
.mz-login-card {
    overflow: hidden;
    border: 1px solid rgba(126,111,86,.36);
    border-radius: 20px;
    background: var(--auth-paper);
    box-shadow: 0 12px 35px rgba(61,51,37,.16);
}

.mz-login-hero {
    position: relative;
    min-height: 156px;
    padding: 24px 46% 20px 20px;
    overflow: hidden;
    background:
        linear-gradient(90deg, #eee5d5 0%, #f7f2e8 54%, rgba(247,242,232,.3) 100%);
    border-bottom: 1px solid var(--auth-line);
}

.mz-login-hero:after {
    content: "";
    position: absolute;
    right: -12px;
    bottom: -23px;
    width: 53%;
    height: 185px;
    background: url('../img/reg/portrait_v3.png') no-repeat center bottom / contain;
    pointer-events: none;
}

.mz-login-hero h1 {
    position: relative !important;
    z-index: 2;
    width: auto !important;
    height: auto !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #553b2b !important;
    font: 700 28px/31px Georgia, "Times New Roman", serif !important;
}

.mz-login-hero p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 18px;
}

.mz-login-body {
    padding: 18px;
}

.mz-auth-notice {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #ddd2bd;
    border-radius: 11px;
    background: #f7f1e6;
    color: #685e50;
    font-size: 12px;
    line-height: 17px;
}

.mz-field {
    margin: 0 0 14px;
}

.mz-field label {
    display: block;
    margin: 0 0 6px;
    color: #4f473b;
    font-size: 13px;
    font-weight: 700;
}

.mz-field input[type="text"],
.mz-field input[type="password"],
.mz-field input[type="email"] {
    display: block;
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    border: 1px solid #c9beac !important;
    border-radius: 12px !important;
    outline: none;
    background: #fff !important;
    box-shadow: inset 0 1px 2px rgba(63,52,37,.06);
    color: #2f2a23 !important;
    font-size: 16px !important;
    line-height: 50px !important;
    -webkit-appearance: none;
    appearance: none;
}

.mz-field input:focus {
    border-color: #6d8c39 !important;
    box-shadow: 0 0 0 3px rgba(91,124,40,.13) !important;
}

.mz-field .error,
.mz-login-body .error {
    display: block;
    margin-top: 5px;
    color: #a8392e !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
}

.mz-primary-btn {
    display: flex !important;
    width: 100% !important;
    min-height: 52px !important;
    margin: 4px 0 0 !important;
    padding: 0 16px !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #3f5f17 !important;
    border-radius: 13px !important;
    background: linear-gradient(#71963a, #557a24) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.23), 0 3px 8px rgba(61,83,25,.20) !important;
    color: #fff !important;
    font: 700 17px/20px Arial, Helvetica, sans-serif !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.mz-auth-alt {
    margin: 15px 0 0;
    padding-top: 14px;
    border-top: 1px solid #e3dbce;
    text-align: center;
}

.mz-auth-alt a {
    display: inline-flex;
    min-height: 44px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9ad98;
    border-radius: 11px;
    background: #f8f4eb;
    color: #4e6722 !important;
    text-decoration: none !important;
    font-weight: 700;
}

body.mz-login-page .error_box {
    margin: 12px 18px 0 !important;
    padding: 12px !important;
    border: 1px solid #e0b2a9 !important;
    border-radius: 11px !important;
    background: #fff0ed !important;
    color: #6f352f !important;
    font-size: 12px;
    line-height: 17px;
}

body.mz-login-page .error_box a {
    color: #4f6e20 !important;
    font-weight: 700;
}

.activation_time {
    margin: 12px auto;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    color: #48671c !important;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

/* Registration */
body.mz-register-page #regwiz {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(126,111,86,.36);
    border-radius: 20px;
    background: var(--auth-paper);
    box-shadow: 0 12px 35px rgba(61,51,37,.16);
}

body.mz-register-page .rw-hdr {
    height: auto !important;
    min-height: 68px;
    padding: 16px 16px 12px !important;
    background: linear-gradient(135deg, #66503c 0%, #836949 58%, #5f4b39 100%) !important;
}

body.mz-register-page .rw-hdr:before,
body.mz-register-page .rw-hdr:after,
body.mz-register-page .rw-bot {
    display: none !important;
}

body.mz-register-page .rw-hdr span {
    color: #fff6e9 !important;
    font: 700 21px/25px Georgia, "Times New Roman", serif !important;
    letter-spacing: .2px !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.30) !important;
}

body.mz-register-page .rw-body {
    padding: 14px 14px 12px !important;
    background: var(--auth-paper) !important;
}

.rw-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin: 0 0 15px;
}

.rw-progress span {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #e1d8c9;
    text-indent: -9999px;
}

.rw-progress span.on,
.rw-progress span.done {
    background: #6f8e39;
}

body.mz-register-page .rw-intro {
    margin: 0 0 14px !important;
    color: #655b4d !important;
    font: 600 13px/18px Arial, Helvetica, sans-serif !important;
}

/* Swipeable tribe selector */
body.mz-register-page .rw-thumbs {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: 72px;
    column-gap: 20px;
    width: calc(100% + 14px);
    margin: 0 -7px 15px !important;
    padding: 2px 7px 8px !important;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

body.mz-register-page .rw-thumbs::-webkit-scrollbar { display: none; }

body.mz-register-page .rw-thumb {
    width: 68px !important;
    max-width: 68px !important;
    min-width: 68px !important;
    height: 68px;
    margin: 0 !important;
    padding: 3px !important;
    overflow: hidden;
    border: 2px solid #c5b69d !important;
    border-radius: 14px !important;
    background: #f6f0e5 !important;
    box-shadow: none !important;
    scroll-snap-align: start;
}

body.mz-register-page .rw-thumb.sel {
    border-color: #64872c !important;
    box-shadow: 0 0 0 3px rgba(100,135,44,.13) !important;
}
body.mz-register-page .rw-thumb.sel:before,
body.mz-register-page .rw-thumb.sel:after { display: none !important; }
body.mz-register-page .rw-thumb img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 9px;
}

body.mz-register-page .rw-panel {
    height: 288px !important;
    padding: 15px 12px !important;
    overflow: hidden !important;
    border: 1px solid #d2c6b3 !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #f4ecde 0%, #eee3d0 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65) !important;
}

body.mz-register-page .rw-name {
    position: relative;
    z-index: 3;
    max-width: 58%;
    margin: 0 0 10px !important;
    color: #794233 !important;
    font: 700 23px/25px Georgia, "Times New Roman", serif !important;
    letter-spacing: .3px !important;
    text-transform: none !important;
}

body.mz-register-page .rw-lines {
    z-index: 3 !important;
    width: 58%;
}

body.mz-register-page .rw-lines li {
    min-height: 0 !important;
    margin: 0 0 8px;
    padding: 0 0 0 23px !important;
    color: #594f42 !important;
    background-size: 16px auto !important;
    font: 600 11px/15px Arial, Helvetica, sans-serif !important;
}

body.mz-register-page .rw-portrait {
    right: -18px !important;
    bottom: -5px !important;
    width: 51% !important;
    height: auto !important;
    max-height: 94% !important;
    object-fit: contain;
    object-position: right bottom;
    opacity: .96;
}

body.mz-register-page .rw-badge {
    top: 8px !important;
    right: 6px !important;
    width: 118px !important;
    max-width: 37% !important;
}

body.mz-register-page .rw-map {
    width: 100% !important;
    max-width: 390px !important;
    margin: 0 auto 12px !important;
    border: 1px solid #cdbfAA;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 13px rgba(69,56,37,.10);
}

body.mz-register-page .rw-map img.rw-mapbg { width: 100% !important; }
body.mz-register-page .rw-map.picked .rw-q.sel {
    box-shadow: inset 0 0 0 4px rgba(91,132,37,.85) !important;
}

body.mz-register-page .rw-rand {
    width: 100% !important;
    min-height: 46px;
    margin: 0 auto 4px !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid #c9bda9 !important;
    border-radius: 11px !important;
    background: #f6f0e6 !important;
    color: #5a5145 !important;
    font-size: 13px !important;
}
body.mz-register-page .rw-rand.sel {
    border-color: #6d8e34 !important;
    background: #eff4e5 !important;
    color: #45651d !important;
}

body.mz-register-page .rw-cards {
    gap: 9px;
    margin: 0 0 14px !important;
}
body.mz-register-page .rw-card {
    width: 50% !important;
    margin: 0 !important;
    padding: 8px 7px 27px !important;
    overflow: hidden;
    border: 1px solid #d2c6b3 !important;
    border-radius: 13px !important;
    background: #f4ecdf !important;
    box-shadow: none !important;
}
body.mz-register-page .rw-card h3 {
    min-height: 34px;
    margin: 0 0 4px !important;
    color: #714235 !important;
    font: 700 14px/17px Georgia, "Times New Roman", serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
body.mz-register-page .rw-pic { height: 122px !important; }
body.mz-register-page .rw-change {
    bottom: 6px !important;
    color: #557826 !important;
    font-size: 11px !important;
}

body.mz-register-page .rw-field {
    margin: 0 0 13px !important;
}
body.mz-register-page .rw-field label {
    margin: 0 0 6px !important;
    color: #4e473c !important;
    font-size: 13px !important;
}
body.mz-register-page .rw-field input.rw-text {
    width: 100% !important;
    height: 50px !important;
    min-height: 50px !important;
    padding: 0 13px !important;
    border: 1px solid #c9beac !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #2f2a23 !important;
    font-size: 16px !important;
    line-height: 50px !important;
    -webkit-appearance: none;
    appearance: none;
}
body.mz-register-page .rw-field input.rw-text:focus {
    outline: none;
    border-color: #6d8c39 !important;
    box-shadow: 0 0 0 3px rgba(91,124,40,.13) !important;
}
body.mz-register-page .rw-field .error {
    margin-top: 5px !important;
    color: #a8392e !important;
    font-size: 12px !important;
}
body.mz-register-page .rw-note {
    margin: -3px 0 13px !important;
    padding: 9px 10px 9px 34px !important;
    border: 1px solid #c9d4e5 !important;
    border-radius: 10px !important;
    background: #eef3f9 !important;
    font-size: 11px !important;
    line-height: 15px !important;
}
body.mz-register-page .rw-agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 10px !important;
    color: #5a5144 !important;
    font-size: 12px !important;
    line-height: 17px !important;
}
body.mz-register-page .rw-agree input {
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
}
body.mz-register-page ul.rw-err {
    margin: 0 0 8px !important;
    color: #a8392e !important;
    font-size: 12px !important;
}

body.mz-register-page .rw-btn {
    width: 100% !important;
    max-width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    margin: 15px auto 7px !important;
    padding: 0 15px !important;
    border: 1px solid #3f5f17 !important;
    border-radius: 13px !important;
    background: linear-gradient(#71963a, #557a24) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.23), 0 3px 8px rgba(61,83,25,.18) !important;
    color: #fff !important;
    font: 700 16px/50px Arial, Helvetica, sans-serif !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.24) !important;
}
body.mz-register-page .rw-back {
    min-height: 42px;
    margin: 2px 0 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #557526 !important;
    font-size: 13px !important;
}
body.mz-register-page .rw-foot {
    margin: 9px 0 0 !important;
    color: #85796a !important;
    font-size: 10px !important;
    line-height: 14px !important;
}

@media (max-width: 370px) {
    .mz-auth-header { grid-template-columns: 44px 1fr auto; }
    .mz-auth-switch { padding: 0 8px; font-size: 11px; }
    .mz-login-hero { padding-left: 16px; }
    .mz-login-body { padding: 15px; }
    body.mz-register-page .rw-body { padding-left: 11px !important; padding-right: 11px !important; }
    body.mz-register-page .rw-name,
    body.mz-register-page .rw-lines { width: 61%; max-width: 61%; }
    body.mz-register-page .rw-portrait { width: 49% !important; right: -22px !important; }
}

/* ========================================================================== */
/* Block351 v0.83.2 — logout page                                             */
/* Uses the same mobile authentication shell as login/register.               */
/* ========================================================================== */
body.mz-logout-page #content,
body.mz-logout-page #content.logout {
    float: none !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
}

.mz-logout-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(126,111,86,.36);
    border-radius: 20px;
    background: var(--auth-paper);
    box-shadow: 0 12px 35px rgba(61,51,37,.16);
}

.mz-logout-status {
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f6f0e4 0%, #ebe3d4 100%);
    border-bottom: 1px solid var(--auth-line);
}

.mz-logout-mark {
    position: relative;
    width: 76px;
    height: 76px;
    display: block;
    border: 3px solid #688d31;
    border-radius: 50%;
    background: #fffdf8;
    box-shadow: 0 5px 18px rgba(72,95,35,.13);
}

.mz-logout-mark::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 18px;
    width: 27px;
    height: 16px;
    border-left: 5px solid #5f8429;
    border-bottom: 5px solid #5f8429;
    transform: rotate(-45deg);
    transform-origin: center;
}

.mz-logout-body {
    padding: 20px 18px 18px;
    text-align: center;
}

body.mz-logout-page .mz-logout-body h1 {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #493e31 !important;
    font: 700 25px/30px Georgia, "Times New Roman", serif !important;
}

.mz-logout-thanks {
    max-width: 340px;
    margin: 0 auto 20px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 20px;
}

.mz-logout-actions {
    display: grid;
    gap: 9px;
}

.mz-logout-actions .mz-primary-btn {
    margin: 0 !important;
    text-decoration: none !important;
}

.mz-logout-home-btn {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid #c8bdab;
    border-radius: 12px;
    background: #f8f4eb;
    color: #4d5f2d !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.mz-logout-cookie-box {
    margin-top: 18px;
    padding: 13px 12px;
    border: 1px solid #e1d8c9;
    border-radius: 12px;
    background: #fbf8f1;
    text-align: left;
}

.mz-logout-cookie-box p {
    margin: 0 0 7px;
    color: #746b5e;
    font-size: 12px;
    line-height: 17px;
}

.mz-logout-cookie-box a {
    color: #557821 !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

@media (max-width: 360px) {
    .mz-logout-status { min-height: 126px; }
    .mz-logout-mark { width: 68px; height: 68px; }
    .mz-logout-mark::after { left: 18px; top: 16px; width: 25px; height: 14px; }
    .mz-logout-body { padding: 17px 14px 15px; }
    body.mz-logout-page .mz-logout-body h1 { font-size: 22px !important; line-height: 27px !important; }
}

/* ========================================================================== */
/* Block351 v0.88.2 — desktop registration scroll inside fixed 600x770 frame  */
/* Keep the real-phone/mobile auth layout untouched. On desktop, mobile-only  */
/* fixes the app viewport to 770px high; mobile-auth.css used to override that */
/* later with min-height:100dvh + overflow:visible, clipping the final form.   */
/* ========================================================================== */
@media (min-width: 601px) and (any-hover: hover) and (any-pointer: fine) {
    body.mz-register-page > .wrapper,
    body.mz-register-page .wrapper {
        height: var(--b351-desktop-h, 770px) !important;
        min-height: var(--b351-desktop-h, 770px) !important;
        max-height: var(--b351-desktop-h, 770px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        -webkit-overflow-scrolling: touch;
    }

    /* The registration header remains visible while the long final step
       scrolls, matching the mobile interaction inside the desktop frame. */
    body.mz-register-page .mz-auth-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 50 !important;
    }
}
