/* Classic public skin retained on the shared, security-hardened auth shell. */
:root {
    --Hdr: url("/assets/default/img/vip/header-rtl.png?v=bc90ffb6bcf6");
}

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

body.auth-shell {
    background: #fff;
}

/* نفس شريط الرأس المبرنَز في `06-artwork-and-sprites.css` — يُكرَّر هنا لأن
   هذا مدخلٌ مستقل لا تصله حزمة اللعبة. */
body.auth-shell .wrapper {
    min-height: 100vh;
    background: linear-gradient(to bottom,
        #d5f2ff 0%, #f8fdff 80%, #cbb98a 85%, #cbb98a 100%) repeat-x top;
    background-size: 1px 100px;
}

body.auth-shell div#dynamic_header {
    height: 100px;
    background: transparent var(--Hdr) center top no-repeat;
    background-size: cover;
}

/* 71px + the 1px border makes the nav strip 72px, so #mid lands at 172 —
   the same y the reference puts it at, with no padding needed to make up
   the difference. */
body.auth-shell div#header {
    height: 71px;
    border-bottom: 1px solid #aaa;
    background: linear-gradient(to bottom, #fff 0, #f9f9f9 45%, #dedede 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Full width, so centring the row inside it centres it on the page.
 *
 * `Qs.css` centres this box with the old `right: 50%; margin-right: -241px`
 * trick, whose −241 is half of the 630 it assumed. Widening the box without
 * undoing the offsets moved it further off, not less: the pair has to go
 * together with the width they were calculated for. */
body.auth-shell #mtop {
    position: relative;
    right: auto;
    top: 10px;
    z-index: 2;
    width: 100%;
    margin-right: 0;
    font-size: 0;
    text-align: center;
}

/* One centred row that never breaks.
 *
 * It was `display: table` with 75px of margin either side, which on a phone
 * left too little room for four items and dropped «تعليمات» onto a second
 * line. A centred flex row with `nowrap` keeps the four together and lets the
 * gap — not the item widths — absorb a narrow screen. */
body.auth-shell #mtop .InBar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    /* `margin: 0 67px` survived from the old table layout and pushed the row
       off centre even after `justify-content` was doing the centring. */
    margin: 0;
    padding: 0 8px;
}

/* `min-width: 62px` padded every item out to a uniform 76px; the reference
   lets each one size to its own label (75/64/76/69). */
body.auth-shell #mtop .InBar a {
    display: inline-block;
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: 10px;
    /* Qs.css pins these to 10px; the reference raises them to 16px in a page
       style block, which is what makes each item 24px tall rather than 18px. */
    height: 16px;
    margin: 0;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #111;
    font-size: 14px;
    font-weight: 900;
    line-height: normal;
    text-decoration: none;
    text-shadow: 1px 1px 1px #fff;
}

body.auth-shell #mtop .InBar a:first-child {
    color: #a20327;
}

body.auth-shell #mtop .InBar a:hover,
body.auth-shell #mtop .InBar a:focus-visible {
    border-color: #cfcfcf;
    background: rgba(255, 255, 255, 0.72);
}

body.auth-shell #mid {
    padding-top: 0;
}

body.auth-shell #content.login,
body.auth-shell #content.signup {
    /* The reference carries a 1px top pad here; without it the heading and
       everything under it sit one pixel high. */
    padding-top: 1px;
    min-height: 550px;
}

body.auth-register-page #content.signup {
    padding-top: 23px;
}

/* The reference leaves the banner on the text baseline. Switching it to
   `middle` collapsed the heading from 72px to 60px and lifted the whole form
   19px, so the baseline is kept deliberately. */
/* Plain inline <b> sharing the banner's baseline, exactly as the reference
   has it. Floating it and adding a top margin shortened the heading to 69px
   and shifted everything below by 4px. */
body.auth-shell #content h1 b {
    color: #666;
}

body.auth-shell #content :where(input.text, input[type="email"], input[type="number"]) {
    border-color: var(--swd-bronze);
}

/* The public forms take their metrics from the classic gpack sheets, which
   already produce the reference geometry: `width:200px` content-box plus 3px
   padding and a 1px border render a 208×26 field.
   Do not re-declare width/height/box-sizing here. An earlier `box-sizing:
   border-box` made the inherited `Cs.css → input { max-width: 200px }` clamp
   the whole box instead of the content, shrinking each field to 200px and
   knocking every row below it 19–28px out of alignment. */

/* The password cell holds the eye-toggle button, so pad the input so text does
   not slide under it at the wider size. */
body.auth-shell #content .auth-password-cell {
    display: inline-block;
    width: 208px;
}

/* The shell's own controls follow its type scale. The classic gpack widgets
   are excluded: `.trav_buttons` is bold Arial in the reference (116px wide for
   "تسجيل الدخول"), and inheriting Tahoma instead stretched it to 142px. Text
   inputs are likewise left alone so they keep the gpack's 17px field type. */
body.auth-shell #content :where(button, select):not(.trav_buttons, .auth-forgot-toggle) {
    font: inherit;
}

body.auth-shell .auth-password-cell {
    position: relative;
}

/* The reference spaces this row with two empty elements — a <p> above and a
   <ul class="important"> below — whose collapsed margins come to 14px and
   16px. The margins are declared directly here instead, for the same geometry
   without the empty nodes. */
body.auth-shell #content .checks {
    margin: 14px 0 16px;
}

/* Superseded by the tile rule further down: the eye is a bordered box in a
   flex row now, not a glyph absolutely positioned inside the field. The old
   `margin-top: -10px` survived the change and was still pulling the tile out
   of line, which is what made the password row 31px tall next to two 20px
   rows. Neutralised here rather than left to be overridden piecemeal. */
body.auth-shell .auth-password-toggle {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
    color: silver;
    background: transparent;
    font-size: 13px;
    line-height: 16px;
    cursor: pointer;
}

body.auth-shell .auth-password-toggle:hover,
body.auth-shell .auth-password-toggle:focus-visible {
    color: var(--swd-bronze);
    outline: 1px dotted var(--swd-bronze);
}

/* Third row of #login_form, matching the reference: a centered header cell
   holding the link. It is a <th>, so spacing comes from padding, not margin. */
body.auth-shell .auth-forgot-row {
    text-align: center;
    font-weight: 400;
}

/* Styled to read as the reference's plain <a>: same green, size and weight,
   no underline and no decorative prefix. Scoped through `#content` so it
   outranks the `:where(button, select) { font: inherit }` rule above, which
   would otherwise reset the weight back to the body's 400.

   ولأنه يُقرأ رابطاً فلونه لون الرابط: أخضر. وهو `button` لا `<a>` (يفتح
   لوحة الاستعادة بلا تنقّل)، فلا يصله لون الرابط بالوراثة — يُصرَّح هنا. */
body.auth-shell #content .auth-forgot-toggle {
    padding: 0;
    border: 0;
    color: var(--swd-link);
    background: transparent;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
    cursor: pointer;
}

body.auth-shell .auth-forgot-panel {
    margin: 10px 20px;
    padding: 12px;
    border: 1px dashed #ccc;
    text-align: center;
}

body.auth-shell .auth-forgot-panel[hidden] {
    display: none;
}

body.auth-shell .auth-forgot-panel label {
    margin-left: 5px;
}

body.auth-shell .auth-classic-box {
    margin: 10px 0;
    padding: 10px;
    border: 1px dashed #ccc;
    text-align: center;
}

body.auth-shell .auth-classic-box legend,
body.auth-shell .auth-tribe-title {
    color: #f90;
    font-weight: 700;
}

body.auth-shell .auth-classic-box small {
    display: block;
    margin-top: 5px;
    color: #777;
}

body.auth-shell #content p.auth-reset-line {
    margin: 10px 0 0;
    color: #888;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

body.auth-shell .auth-success {
    color: #2f7d00;
}

body.auth-shell .auth-login-result {
    margin: 8px 0 4px;
    text-align: center;
}

body.auth-shell .auth-login-result .error,
body.auth-shell .auth-login-result a {
    display: block;
    margin-top: 5px;
}

body.auth-shell .auth-login-result a {
    color: var(--swd-link);
    font-weight: 700;
}

body.auth-shell #content .auth-server-stats {
    width: 100%;
    margin-top: 12px;
    border: 1px dashed #ccc;
}

body.auth-shell #content .auth-server-stats th,
body.auth-shell #content .auth-server-stats td {
    padding: 4px 18px;
    border: 0;
    background: transparent;
}

body.auth-shell #content .auth-server-stats th {
    width: 58%;
    font-weight: 400;
    text-align: right;
}

body.auth-shell #content .auth-server-stats td {
    text-align: center;
}

body.auth-shell #content .auth-server-stats__spacer {
    height: 12px;
}

body.auth-shell .auth-guide-link,
body.auth-shell .checks a {
    color: var(--swd-link);
    font-weight: 700;
}

body.auth-shell .auth-centered {
    text-align: center;
}

body.auth-shell .auth-registration-closed {
    padding: 8px;
    color: #111;
    font-size: 18px;
    font-weight: 400;
    text-align: center;
}

body.auth-shell .auth-registration-closed span {
    display: block;
    margin-top: 8px;
}

body.auth-shell .auth-registration-closed a {
    display: inline-block;
    margin-top: 5px;
    color: var(--swd-link);
    font-size: 15px;
    font-weight: 900;
}

body.auth-shell .auth-register-warrior {
    position: absolute;
    height: 120px;
    margin-top: -20px;
}

body.auth-shell .auth-register-title {
    width: 293px;
    height: 60px;
    object-fit: none;
    object-position: center;
}

body.auth-shell #content p.auth-register-intro {
    font-size: 1em;
    text-align: center;
}

body.auth-shell #sign_input th,
body.auth-shell #sign_select th {
    font-size: 16px;
    font-weight: 500;
}

body.auth-shell #sign_select tr:first-child th {
    color: #f90;
    font-weight: 900;
}

/* Full-width rows under the email field: the hint and the verify-now opt-in.
   They span both columns so the sentence has the whole form width and reads as
   one line instead of wrapping inside the narrow input cell. */
body.auth-shell .auth-hint-row > td {
    padding: 2px 4px 0;
    text-align: right;
    font-size: 11px;
    line-height: 1.6;
    color: #5a4a34;
}

body.auth-shell .auth-hint-oneline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Red, because this is the one thing a player loses their account over.
   Qualified with the row selector so it outranks the neutral colour above. */
body.auth-shell .auth-hint-row > td.auth-hint-warn {
    color: #c1272d;
    font-size: 10px;
}

/* «وثّق الآن» — shown only when a relay is configured. Green: this one is an
   offer, unlike the red warning above it. */
body.auth-shell .auth-verify-now {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--swd-bronze);
    font-weight: bold;
}

body.auth-shell .auth-verify-now input.check {
    flex: 0 0 auto;
    margin: 0;
}

@media (max-width: 760px) {
    /* Narrow screens: wrapping beats clipping the sentence to an ellipsis. */
    body.auth-shell .auth-hint-oneline {
        white-space: normal;
        overflow: visible;
    }
}

body.auth-shell .auth-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.auth-shell .auth-skip-link {
    position: fixed;
    top: 5px;
    right: 5px;
    z-index: 1000;
    padding: 8px 12px;
    background: #fff;
    color: #111;
    transform: translateY(-150%);
}

body.auth-shell .auth-skip-link:focus {
    transform: translateY(0);
}

body.auth-shell .auth-card {
    width: 540px;
    max-width: calc(100% - 30px);
    margin: 20px auto;
    padding: 18px;
    border: 1px dashed #ccc;
    background: #fff;
}

body.auth-shell .auth-card__header h1 {
    margin-top: 0;
}

body.auth-shell .auth-form,
body.auth-shell .auth-field {
    display: grid;
    gap: 8px;
}

body.auth-shell .auth-form {
    gap: 14px;
}

body.auth-shell .auth-field input {
    min-height: 32px;
}

body.auth-shell .auth-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

body.auth-shell .auth-button {
    display: inline-block;
    padding: 4px 16px;
    border: 1px solid var(--swd-bronze-deep);
    border-radius: 4px;
    color: #555;
    background: linear-gradient(#fff, #e7e7e7);
    text-decoration: none;
}

/* The original public skin is a fixed desktop canvas; preserving it also keeps
   coordinates, spacing and typography identical on narrow browser windows. */
@media (max-width: 0px) {
    body.auth-shell div#dynamic_header {
        height: 82px;
        background-size: auto 82px;
    }

    body.auth-shell #mtop .InBar {
        display: flex;
        justify-content: center;
        overflow-x: auto;
    }

    body.auth-shell #mtop .InBar a {
        min-width: auto;
        margin: 0 2px;
        padding-inline: 8px;
    }

    body.auth-shell #mid {
        width: auto;
        max-width: 620px;
        margin: 0 auto;
        padding: 15px 10px 30px;
    }

    body.auth-shell #side_navi {
        display: none;
    }

    body.auth-shell #content.login,
    body.auth-shell #content.signup {
        float: none;
        width: auto;
        min-height: 0;
        margin: 0 auto;
    }

    body.auth-shell #content :where(input.text, input[type="email"], input[type="password"], input[type="number"]) {
        max-width: 100%;
        min-height: 34px;
    }
}

/* ── Legal documents: game rules & privacy policy ───────────────────────── */
/* `#content.auth-legal` beats the classic gpack `#content { width }` rule. */
body.auth-shell #content.auth-legal {
    box-sizing: border-box;
    width: 760px;
    max-width: calc(100% - 24px);
    margin: 22px auto 40px;
    padding: 34px 40px 28px;
    float: none;
    background: #fff;
    border: 1px solid #e3e6e0;
    border-top: 4px solid var(--swd-bronze);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    color: #33383a;
    line-height: 1.95;
    text-align: justify;
}

body.auth-shell .auth-legal-heading {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef0ec;
    text-align: center;
}

body.auth-shell .auth-legal-heading h1 {
    margin: 0 0 12px;
    color: var(--swd-bronze);
    font-size: 27px;
    font-weight: 800;
    line-height: 1.4;
}

body.auth-shell .auth-legal-heading p {
    margin: 8px auto;
    max-width: 62ch;
    color: #6b7169;
    font-size: 14px;
    text-align: center;
}

body.auth-shell .auth-legal section {
    margin: 0 0 22px;
}

body.auth-shell .auth-legal section h2 {
    position: relative;
    margin: 0 0 12px;
    padding: 0 14px 0 0;
    color: #2f3a25;
    font-size: 18px;
    font-weight: 700;
}

/* Accent tab at the start (right, in RTL) of every section heading. */
body.auth-shell .auth-legal section h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(var(--swd-bronze-lift), var(--swd-bronze));
}

body.auth-shell .auth-legal section p {
    margin: 0 0 10px;
    color: #40453f;
    font-size: 14.5px;
}

body.auth-shell .auth-legal section p strong {
    color: #2f3a25;
    font-weight: 700;
}

body.auth-shell .auth-legal ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.auth-shell .auth-legal ul li {
    position: relative;
    margin: 0 0 9px;
    padding-inline-start: 24px;
    color: #40453f;
    font-size: 14.5px;
}

/* Custom check-style bullet, RTL-aware via logical inset. */
body.auth-shell .auth-legal ul li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    color: var(--swd-bronze);
    font-weight: 700;
    font-size: 13px;
}

body.auth-shell .auth-legal-footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #eef0ec;
    color: #6b7169;
    font-size: 13.5px;
    text-align: center;
}

body.auth-shell .auth-legal-footer p {
    margin: 6px 0;
}

body.auth-shell .auth-legal-footer a,
body.auth-shell .auth-legal a {
    color: var(--swd-link);
    font-weight: 700;
    text-decoration: none;
}

body.auth-shell .auth-legal-footer a:hover,
body.auth-shell .auth-legal a:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    body.auth-shell #content.auth-legal {
        padding: 22px 18px 20px;
        line-height: 1.85;
    }
    body.auth-shell .auth-legal-heading h1 {
        font-size: 23px;
    }
}

@media (forced-colors: active) {
    body.auth-shell #content input,
    body.auth-shell .auth-card,
    body.auth-shell .auth-classic-box {
        border: 1px solid CanvasText;
    }
}

/* ── لوح التسجيل والدخول — مقاسات المصدر بهويتنا اللونية ──────────────────
 *
 * Every dimension below was measured on the reference's `/sign?s=1` at
 * innerWidth 1280 and again at 375, with `innerWidth` printed beside each
 * reading (the parity methodology in CLAUDE.md exists because a measurement
 * taken at a different window size once produced a 150px difference that was
 * pure illusion). The numbers are therefore the reference's, exactly:
 *
 *   #content  572 wide            h1     562 × 47, 25px, padding 8/13/9
 *   form      560 × 496, radius 7, padding 25/30/22
 *   input     200 × 20, radius 5, padding 6/10, 15px
 *   submit    140 × 36, radius 5, padding 7/22, 13px
 *
 * The colours are **ours**. The reference is green-on-beige like every Travian
 * skin; سيوف الحضارات takes bronze on parchment instead — the same classic
 * weight and the same measurements, a different civilisation.
 */
body.auth-shell {
    /* Arial throughout, at the owner's request. The reference runs Segoe UI
       with Arial only as a fallback; Arial renders Arabic identically on every
       platform this game is played on, which Segoe does not. */
    font-family: Arial, Helvetica, sans-serif;

    --swd-ink: #3b342a;          /* warm dark, for body text            */
    --swd-parchment: #fdfbf5;    /* the card's ground                   */
    --swd-rule: #d9cfb4;         /* card and table borders              */
    --swd-field-rule: #c9be9f;   /* input borders, a shade deeper       */
    --swd-bronze: #8c6d1f;       /* the accent: buttons, active states  */
    --swd-bronze-deep: #6b5216;  /* pressed / border of the button      */
    --swd-bronze-lift: #b8912f;  /* hover                               */
    /* The register button's bronze, lightened until it works as a surface —
       the owner asked for the tribe tiles to carry the button's colour, and a
       button colour used at full strength behind text is unreadable. */
    --swd-tile: #f7f1e0;
    --swd-tile-rule: #dcc794;
    --swd-tile-on: #efe3c4;

    /* الرابط أخضر — والبرونز للهوية. القسمة نفسها في
       `assets-htatar/css/game/11-shell-foundation.css`، ويحرس تطابقهما
       `scripts/check_identity_palette.py`. */
    --swd-link: #71d000;
    --swd-link-hover: #00c000;
}

body.auth-shell #content,
body.auth-shell #content :where(h1, p, th, td, label, input, button, select, a) {
    font-family: Arial, Helvetica, sans-serif;
}

/* The card the reference draws around the whole form. Ours had none at all —
   the fields floated on the page with dashed table borders around them. */
body.auth-shell #content .signup-main-form,
body.auth-shell #content #login_form_wrap {
    box-sizing: border-box;
    width: 560px;
    max-width: 100%;
    margin: 0 auto;
    padding: 25px 30px 22px;
    background: var(--swd-parchment);
    border: 1px solid var(--swd-rule);
    border-radius: 7px;
    /* A single hairline of depth: classic pages are flat, not shadowed. */
    box-shadow: 0 1px 0 rgba(59, 52, 42, .04);
}

/* The card needs the full 560 inside a 572-wide `#content`.
 *
 * The classic gpack sheet sets `div.signup { width: 522px; padding: 0 25px }`
 * as a **content-box**, so the outer width is 522 + 50 = 572 and the usable
 * inner width is only 522 — thirty-eight short of the reference's form.
 * Shrinking the padding alone shrinks the whole panel to 532 instead, which is
 * what happened on the first attempt. The inner width has to grow by the same
 * amount the padding loses, so the outer 572 is preserved exactly.
 */
body.auth-shell #content.signup,
body.auth-shell #content.login {
    width: 562px;
    padding: 1px 5px 0;
}

/* The heading panel: same ground, same rule and same radius as the tribe and
   agreement panels below, so the page is one stack of cards rather than loose
   text sitting above a form. */
body.auth-shell #content .auth-head-card {
    box-sizing: border-box;
    width: 560px;
    max-width: 100%;
    margin: 0 auto 12px;
    padding: 10px 14px 11px;
    background: #fff;
    border: 1px solid var(--swd-rule);
    border-radius: 6px;
    /* The bronze appears once, on the start edge, as the panel's only accent. */
    border-inline-start: 3px solid var(--swd-bronze);
}

/* Title at the start edge, world chip pushed to the far end. */
body.auth-shell #content .auth-head-card h1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    color: var(--swd-ink);
    font-size: 18px;
    line-height: 24px;
}

/* The two halves of the heading: the page name, then the server number set
   apart from it the way the reference does. */
/* Measured on the reference: the title is 17px/600 and the world label 12px,
   inside an h1 whose own font-size is 25px. Ours takes the same two sizes and
   swaps the reference's olive for our bronze. */
/* The heading text itself stays dark — in the reference the title carries the
   page's weight, not its colour. The bronze is spent on the rule beside it and
   on the world chip, where it reads as an accent instead of shouting. */
body.auth-shell #content .signup-page-title {
    color: var(--swd-ink);
    font-size: 17px;
    font-weight: 700;
}

/* «العالم 1» sits in its own small bordered chip in the reference, floated to
   the far side of the heading, not as loose text beside the title. */
body.auth-shell #content .signup-server-label {
    flex: 0 0 auto;
    padding: 3px 9px;
    color: #5c564d;
    font-size: 12px;
    font-weight: 400;
    background: var(--swd-tile);
    border: 1px solid var(--swd-tile-rule);
    border-radius: 5px;
}

body.auth-shell #content .signup-server-number {
    color: var(--swd-bronze);
    font-weight: 700;
}

/* The name/email/password block gets the same white panel with the dashed
   edge that the login form already carries, so the two pages read as one
   design rather than two. `#sign_select` keeps its own solid panel below —
   the dashed edge marks *entry*, the solid one marks *choice*. */
body.auth-shell #content #sign_input {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 6px;
    border-collapse: separate;
}

body.auth-shell #content #sign_select {
    width: 100%;
}

body.auth-shell #content :where(#sign_input, #sign_select) th {
    color: var(--swd-ink);
    font-size: 16px;
    font-weight: 500;
    text-align: start;
}

/* «أختر القبيلة» — the one orange line in the reference. Bronze here. */
body.auth-shell #content .auth-tribe-title {
    color: var(--swd-bronze) !important;
    font-size: 14px;
    font-weight: 900;
    text-align: start;
}

/* ── قوالب القبائل ────────────────────────────────────────────────────────
 * The reference draws each tribe as its own 100.2 × 38 tile with a 5px radius
 * and 4px between them. Ours were bare table cells. Same geometry here, with
 * the register button's bronze lightened into a surface colour.
 */
/* The reference boxes the whole tribe group, and boxes the agreement line
   under it, so the card reads as three stacked panels rather than one long
   column of loose rows. */
body.auth-shell #content #sign_select {
    box-sizing: border-box;
    width: 100%;
    margin: 14px 0 12px;
    padding: 8px;
    border-collapse: separate;
    border-spacing: 4px;
    background: #fff;
    border: 1px solid var(--swd-rule);
    border-radius: 6px;
}

body.auth-shell #content .checks {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 12px;
    background: #fff;
    border: 1px solid var(--swd-rule);
    border-radius: 6px;
}

body.auth-shell #content .checks label {
    font-size: 13px;
}

/* One line, bold, small enough not to wrap at 560 — it wrapped to three on a
   phone before and pushed the form below the fold. */
body.auth-shell #content .auth-head-card .auth-register-intro {
    margin: 7px 0 0;
    color: #5c564d;
    font-size: 12px;
    font-weight: 700;
    line-height: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The four nav items stay on one line at any width the game is played at; the
   gap and the padding give way first, and the label size last. */
@media (max-width: 420px) {
    body.auth-shell #mtop .InBar {
        gap: 2px;
        padding: 0 4px;
    }
    body.auth-shell #mtop .InBar a {
        padding: 3px 5px;
        font-size: 13px;
    }
}

/* A phone cannot hold the sentence on one line at 12px, so there it is allowed
   to wrap rather than be clipped. */
@media (max-width: 480px) {
    body.auth-shell #content .auth-head-card .auth-register-intro {
        font-size: 11px;
        white-space: normal;
    }
    body.auth-shell #content .auth-head-card h1 {
        font-size: 16px;
    }
}

body.auth-shell #content #sign_select th:has(input.radio) {
    box-sizing: border-box;
    width: 100px;
    height: 38px;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    background: #fffdf8;
    border: 1px solid var(--swd-tile-rule);
    border-radius: 5px;
    transition: background .12s ease, border-color .12s ease;
}

/* The whole tile is the target, not just the 20px dot inside it. */
body.auth-shell #content #sign_select th:has(input.radio) label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

body.auth-shell #content #sign_select th:has(input.radio):hover {
    border-color: var(--swd-bronze);
}

/* The chosen tribe reads as chosen without moving anything: same box, deeper
   ground and a full-strength border. */
body.auth-shell #content #sign_select th:has(input.radio:checked) {
    background: var(--swd-tile-on);
    border-color: var(--swd-bronze);
    box-shadow: inset 0 0 0 1px var(--swd-bronze);
}

body.auth-shell #content :where(#sign_select th label) {
    color: var(--swd-ink);
    font-size: 12px;
    font-weight: 400;
}

body.auth-shell #content #sign_select input.radio {
    accent-color: var(--swd-bronze);
    margin: 0;
}

/* ── عين كشف كلمة المرور ──────────────────────────────────────────────────
 * 14px in the reference's muted grey, sitting inside the field rather than
 * beside it, so the field keeps its measured 200 × 20.
 */
body.auth-shell #content .auth-password-cell,
body.auth-shell #content .password-field {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* The password row must end level with the two fields above it, and the eye
   must sit at the same height as the field rather than towering over it.
   The tile is 20 square — the field's own height — with 4px of gap, so the
   field gives up 24: 176 + 4 + 20 is the same 200 that الكنية and البريد
   occupy, and the three rows share one right edge and one baseline. */
/* The cell is a <td>, so its width is the table column's to decide, not the
   rule's — setting `width` here does nothing. Anchoring the pair to the row's
   start edge and fixing the field instead puts the two of them on exactly the
   200 the fields above occupy, and leaves the column's spare width outside
   them where it cannot be seen.
   176 + 4 gap + 20 tile = 200. */
body.auth-shell #content :where(.auth-password-cell, .password-field) {
    justify-content: flex-start;
}

body.auth-shell #content :where(.auth-password-cell, .password-field) input.text,
body.auth-shell #content :where(.auth-password-cell, .password-field) input[type="password"] {
    flex: 0 0 auto;
    width: 176px;
    min-width: 0;
}

/* A bordered tile beside the field, as the reference draws it — but squared to
   the field's own 20px rather than the reference's 34, so the password row
   keeps the same height as the two rows above it. The glyph drops to 12px to
   sit inside the smaller box. */
body.auth-shell #content .auth-password-toggle {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #756f65;
    font-size: 12px;
    line-height: 1;
    background: var(--swd-tile);
    border: 1px solid var(--swd-tile-rule);
    border-radius: 5px;
    cursor: pointer;
}

body.auth-shell #content .auth-password-toggle:hover {
    color: var(--swd-bronze);
}

body.auth-shell #content .auth-password-toggle[aria-pressed="true"] {
    color: var(--swd-bronze);
}

/* 200 × 20 inside a 6/10 padding — the reference's field, to the pixel. */
body.auth-shell #content :where(
    input.text, input[type="email"], input[type="password"], input[type="number"]
) {
    /* `border-box`, so 200 × 20 is the whole field including its padding and
       border — which is what the reference's own rect measures. Content-box
       would make it 222 × 34 and every column beside it would shift. */
    box-sizing: border-box;
    width: 200px;
    max-width: 100%;
    height: 20px;
    padding: 6px 10px;
    color: #332f29;
    font-size: 15px;
    line-height: 20px;
    background: #fff;
    border: 1px solid var(--swd-field-rule);
    border-radius: 5px;
}

body.auth-shell #content :where(input.text, input[type="email"], input[type="password"]):focus {
    border-color: var(--swd-bronze);
    outline: 2px solid rgba(140, 109, 31, .25);
    outline-offset: 1px;
}

/* 140 × 36 — ours was 83 × 22 and grey, which read as disabled. */
body.auth-shell #content :where(.trav_buttons, button[type="submit"], input[type="submit"]) {
    box-sizing: border-box;
    min-width: 140px;
    height: 36px;
    padding: 7px 22px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(180deg, var(--swd-bronze-lift), var(--swd-bronze));
    border: 1px solid var(--swd-bronze-deep);
    border-radius: 5px;
    cursor: pointer;
}

body.auth-shell #content :where(.trav_buttons, button[type="submit"]):hover {
    background: linear-gradient(180deg, #c9a03a, var(--swd-bronze-lift));
}

body.auth-shell #content :where(.trav_buttons, button[type="submit"]):active {
    background: var(--swd-bronze-deep);
}

/* ── الجوال والشاشات المختلفة ─────────────────────────────────────────────
 *
 * Measured on the reference at 375: the card goes fluid (361 of 375) but the
 * field stays **200 wide** and the button stays **140 × 36** — they do not
 * stretch — and the tribe grid keeps its three columns. Matching that is the
 * whole point: a form that stretches its inputs to the viewport stops looking
 * like this game.
 *
 * The reference declares 960 / 768 / 700 / 600; the card only needs the point
 * where 560 + margins no longer fits.
 */
@media (max-width: 620px) {
    body.auth-shell #content .signup-main-form,
    body.auth-shell #content #login_form_wrap {
        width: 100%;
        padding: 18px 14px 16px;
    }
    body.auth-shell #content h1 {
        font-size: 21px;
        line-height: 26px;
    }
    /* Field and button keep their measurements, as the reference's do. */
    body.auth-shell #content :where(#sign_select th) {
        font-size: 13px;
    }
}

/* Below the point where three tribe columns stop fitting, the reference still
   keeps three — so the label text shrinks rather than the grid reflowing.
   The field is deliberately NOT stretched: measured at 375 the reference's is
   still exactly 200 wide, and letting it fill the viewport is the single
   change that stops a classic form looking like one. */
@media (max-width: 400px) {
    body.auth-shell #content :where(#sign_select th label) {
        font-size: 12px;
    }
}


/* ── العمود الأيسر ────────────────────────────────────────────────────────
 * The public pages load `Qs.css` and this sheet, not the game bundle, so the
 * column that frames every logged-in page has to be declared here too. The
 * geometry is the game's own: 257 wide plus 16 of padding is the 273 that was
 * standing empty in `#mid` beside `#side_navi` (155) and `#content` (572).
 */
body.auth-shell #side_info.auth-side-frame {
    float: right;
    width: 257px;
    min-height: 453px;
    padding-right: 16px;
    background: transparent url("/assets/default/img/vip/shadow-b-rtl.png?v=4a16029b455c") no-repeat right top;
}

/* Below the width where three columns stop fitting the frame is dropped
   rather than squeezed — a decorative column that wraps under the form is
   worse than no column at all. */
@media (max-width: 1000px) {
    body.auth-shell #side_info.auth-side-frame {
        display: none;
    }
}


/* ── نزول الجميع بمستوى واحد ──────────────────────────────────────────────
 * The menu, the content and both frame columns all began flush against the
 * header's shadow, so the links read as part of the bar above rather than as a
 * menu of their own. One padding on the row they share drops all of them by
 * the same amount, which is what keeps them level — lowering the menu on its
 * own would have put it out of line with the form beside it.
 */
body.auth-shell #mid {
    padding-top: 22px;
}

body.auth-shell #side_navi p {
    margin: 0 0 28px;
}

body.auth-shell #side_navi a {
    display: block;
    padding: 4px 10px 4px 0;
    line-height: 18px;
}
