/* Briefee — app pages: auth (login/signup), account, store.
   Desktop: auth*, page-*, acc-*, store-*, pgrid, pcard
   Mobile:  mauth*, mpage*, mstore*  (+ .device-mobile overrides)       */

/* ── Form fields (shared) ───────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; color: var(--navy); font-size: 14px; font-weight: 800; }
.field__box {
    display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px;
    background: var(--white); border: 1.5px solid var(--line); border-radius: 16px;
    color: #9a9aa2; transition: border-color .2s, box-shadow .2s, color .2s;
}
.field__box:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(10, 17, 85, .07); color: var(--navy); }
.field__box input {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none;
    color: var(--navy); font: 700 16px var(--font); /* 16px stops iOS zoom-on-focus */
}
.field__box input::placeholder { color: #a8a8b0; font-weight: 600; }
.field__prefix { padding-inline-end: 10px; margin-inline-end: 2px; border-inline-end: 1.5px solid var(--line); color: var(--navy); font-size: 14px; font-weight: 800; white-space: nowrap; }
.field__eye { display: grid; place-items: center; width: 36px; height: 36px; margin-inline-end: -8px; border: 0; border-radius: 10px; background: none; color: #9a9aa2; cursor: pointer; }
.field__eye:hover { background: var(--bg); color: var(--navy); }
.field__eye .eye-off, .field__eye.is-on .eye-on { display: none; }
.field__eye.is-on .eye-off { display: block; }
.field__error { display: block; min-height: 0; margin-top: 6px; color: var(--coral); font-size: 13px; font-weight: 700; }
.field__error:empty { display: none; }
.field.is-invalid .field__box { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(242, 69, 53, .1); color: var(--coral); animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.auth-form__submit { margin-top: 8px; justify-content: center; }
.auth-form__alt { margin: 20px 0 0; text-align: center; font-size: 15px; }
.auth-form__alt a { color: var(--coral); font-weight: 900; text-decoration: none; }
.auth-form__alt a:hover { text-decoration: underline; }

/* ================================================================
   DESKTOP
   ================================================================ */

/* ── Auth (login / signup) ── */
.auth { padding: calc(var(--nav-h) + 56px) 16px 56px; }
.auth__card {
    display: grid; grid-template-columns: 1fr 1fr; max-width: 1080px; margin: 0 auto;
    background: var(--white); border-radius: 40px; overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.auth__main { padding: 56px 64px; align-self: center; }
.auth__title { font-size: clamp(36px, 4vw, 50px); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 10px; }
.auth__lead { font-size: 16.5px; margin-bottom: 28px; }

.auth-aside {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 40px;
    padding: 40px 44px; min-height: 620px;
    background: radial-gradient(circle at 100% 100%, rgba(242, 69, 53, .5), transparent 50%), var(--navy);
    color: rgba(255, 255, 255, .68);
}
.auth-aside__dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .1) 1.2px, transparent 1.2px); background-size: 20px 20px;
    -webkit-mask-image: linear-gradient(160deg, #000 20%, transparent 70%); mask-image: linear-gradient(160deg, #000 20%, transparent 70%);
}
.auth-aside > * { position: relative; }
.auth-aside__chev { position: absolute !important; inset-inline-end: 40px; top: 42px; width: 48px; }
.auth-aside__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); font-size: 22px; font-weight: 900; text-decoration: none; }
.auth-aside__copy { margin-top: auto; }
.auth-aside h2 { color: var(--white); font-size: 44px; font-weight: 900; letter-spacing: -.04em; line-height: 1.02; margin-bottom: 14px; }
.auth-aside p { font-size: 16px; margin-bottom: 24px; }
.auth-aside__points { list-style: none; padding: 0; margin: 0; }
.auth-aside__points li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--white); font-size: 15px; font-weight: 700; }
.auth-aside__points li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }
.auth-aside__points .icon { stroke-width: 3; }
.auth-aside__tutor {
    display: flex; align-items: center; gap: 12px; width: fit-content; padding-block: 10px; padding-inline: 10px 18px;
    border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1);
}
.auth-aside__tutor img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.auth-aside__tutor strong { display: block; color: var(--white); font-size: 14.5px; font-weight: 900; }
.auth-aside__tutor span { font-size: 12.5px; }

@media (max-width: 960px) {
    .auth__card { grid-template-columns: 1fr; max-width: 560px; }
    .auth-aside { min-height: 0; padding: 32px; gap: 24px; }
    .auth-aside__tutor, .auth-aside__points { display: none; }
    .auth-aside h2 { font-size: 34px; }
    .auth__main { padding: 40px; }
}

/* ── Generic page header ── */
.page-wrap { padding: calc(var(--nav-h) + 64px) 0 72px; }
.page-head { margin-bottom: 36px; }
.page-head__title { font-size: clamp(38px, 4.6vw, 58px); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin: 0; }

/* ── Account ── */
.acc-grid { display: grid; grid-template-columns: 370px 1fr; gap: 20px; align-items: start; }
.acc-side { display: grid; gap: 20px; }
.acc-card { background: var(--white); border: 1px solid var(--line); border-radius: 30px; padding: 28px; }
.acc-card h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.acc-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.acc-card__who { min-width: 0; }
.acc-card__who h2 { overflow-wrap: anywhere; }
.acc-list { margin: 0 0 22px; }
.acc-list > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.acc-list dt { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.acc-list dd { margin: 0; color: var(--navy); font-weight: 800; overflow-wrap: anywhere; }
.acc-admin-btn { margin-bottom: 10px; }

.acc-device { background: var(--navy); border-color: var(--navy); color: rgba(255, 255, 255, .66); position: relative; overflow: hidden; }
.acc-device::before {
    content: ""; position: absolute; inset-inline-end: -90px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 69, 53, .45), transparent 65%);
}
.acc-device > * { position: relative; }
.acc-device__top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acc-device__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--coral); color: var(--white); flex-shrink: 0; }
.acc-device__kicker { display: block; color: #ff8a7e; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.acc-device h3 { color: var(--white); font-size: 19px; font-weight: 900; margin: 2px 0 0; }
.acc-device p { margin: 0; font-size: 14.5px; }
.acc-device__chip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 16px; padding: 12px 14px;
    border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); font-size: 13px;
}
.acc-device__chip strong { color: var(--white); font-size: 15px; font-weight: 900; }
.acc-device__chip .icon { color: #ff8a7e; }
.acc-device__rules { list-style: none; padding: 0; margin: 0 0 18px; }
.acc-device__rules li { position: relative; padding-inline-start: 18px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.5; }
.acc-device__rules li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.acc-device__help {
    display: inline-flex; align-items: center; gap: 8px; color: var(--white); font-size: 14px; font-weight: 900; text-decoration: none;
    padding: 10px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); transition: background .2s;
}
.acc-device__help:hover { background: rgba(255, 255, 255, .18); }

.acc-main { padding: 14px; }
.acc-tabs { margin-bottom: 4px; }
.acc-tabs .mtabs__btn { padding: 12px 8px; font-size: 14.5px; }
.acc-panel { padding: 22px 14px 14px; animation: pageIn .4s var(--ease); }
.acc-panel[hidden] { display: none; }
.acc-panel__head { margin-bottom: 20px; }
.acc-panel__head h3 { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.acc-panel__head p { margin: 0; font-size: 15px; }
.acc-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.field { min-width: 0; }
.acc-form__save { margin-top: 4px; }
/* Language setting: its own section under the profile form */
.acc-lang { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.acc-lang .acc-panel__head { margin-bottom: 16px; }
.device-mobile .acc-lang { margin-top: 26px; padding-top: 22px; }
.device-mobile .acc-lang .langs--segmented { width: 100%; }
.device-mobile .acc-lang .langs__opt { flex: 1; text-align: center; }
.acc-form__confirm { animation: pageIn .35s var(--ease); }

.acc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 44px; border-radius: 24px; background: var(--bg); }
.acc-empty__art { position: relative; width: 150px; height: 120px; margin-bottom: 22px; }
.acc-empty__art .art-paper { inset: 0; }
.acc-empty__art .art-paper--back { transform: rotate(-9deg) translate(-12px, 4px); background: #E8EAF6; }
.acc-empty__art .art-paper--front { padding: 18px; transform: rotate(4deg); }
.acc-empty h3 { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.acc-empty p { max-width: 380px; font-size: 15px; margin-bottom: 20px; }

@media (max-width: 1000px) {
    .acc-grid { grid-template-columns: 1fr; }
    .acc-side { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 700px) {
    .acc-side { grid-template-columns: 1fr; }
    .acc-form__grid { grid-template-columns: 1fr; }
}

/* ── Auth extras ── */
.field__labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.field__labelrow label { margin: 0; }
.field__link { color: var(--coral); font-size: 13.5px; font-weight: 800; text-decoration: none; }
.field__link:hover { text-decoration: underline; }
.auth-form__note {
    display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px;
    background: var(--coral-soft); color: var(--navy); font-size: 13.5px; font-weight: 700; line-height: 1.45;
}
.auth-form__note .icon { color: var(--coral); margin-top: 1px; }
.auth-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; animation: pageIn .4s var(--ease); }
.auth-state__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 22px; background: var(--coral); color: var(--white); }
.auth-state__icon--ok { background: var(--navy); }
.auth-state h3 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.auth-state p { font-size: 15px; margin-bottom: 20px; }

/* ── Admin ── */
.page-head__lead { max-width: 560px; font-size: 17px; margin: 14px 0 0; }
.astats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.astat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 22px; font-size: 13.5px; font-weight: 700; }
.astat > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--navy); color: var(--white); flex-shrink: 0; }
.astat--alert > span { background: var(--coral); }
.astat strong { display: block; color: var(--navy); font-size: 26px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.asearch { margin-bottom: 16px; }
.asearch .field__box { border-radius: 999px; }

.slist { background: var(--white); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; }
.slist__head, .srow { display: grid; grid-template-columns: minmax(220px, 1.6fr) 1fr minmax(180px, 1.4fr) .8fr 150px; gap: 16px; align-items: center; padding: 14px 20px; }
.slist__head { background: var(--bg); color: var(--text); font-size: 11.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.srow { border-top: 1px solid var(--line); animation: cardIn .35s var(--ease) both; }
.srow--alert { background: #FFF8F7; }
.srow__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srow__who div { min-width: 0; }
.srow__who strong { display: block; color: var(--navy); font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__who div span { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__cell { color: var(--navy); font-size: 14px; font-weight: 700; min-width: 0; }
.srow__device small { display: block; color: var(--text); font-size: 12px; font-weight: 600; margin-top: 3px; }
.srow__seen { color: var(--text); }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--navy); color: var(--white); font-size: 12.5px; font-weight: 800; max-width: 100%; }
.dchip--free { background: var(--bg); color: var(--text); }
.srow__blocked { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--coral); font-size: 12px; font-weight: 800; }
.srow__action { display: flex; justify-content: flex-end; }
.sbtn {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid rgba(242, 69, 53, .35); background: var(--white); color: var(--coral); font: 900 13px var(--font); white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.sbtn:hover { background: var(--coral); border-color: var(--coral); color: var(--white); }

@media (max-width: 1080px) {
    .slist__head { display: none; }
    .srow { grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 18px 20px; align-items: start; }
    .srow__who { grid-column: 1 / -1; }
    .srow__cell::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
    .srow__action { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
    .astats { grid-template-columns: 1fr; }
}

/* ── Store ── */
.store-hero { position: relative; padding: calc(var(--nav-h) + 64px) 0 40px; overflow: hidden; }
.store-hero__bg {
    position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(rgba(10, 17, 85, .1) 1.2px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 50% 70% at 80% 40%, #000 15%, transparent 70%);
    mask-image: radial-gradient(ellipse 50% 70% at 80% 40%, #000 15%, transparent 70%);
}
.store-hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: end; }
.store-hero__title { font-size: clamp(42px, 5.4vw, 74px); font-weight: 900; letter-spacing: -.045em; line-height: .98; margin-bottom: 20px; }
.store-hero__lead { max-width: 520px; font-size: 18px; margin: 0; }

.trust { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.trust li {
    display: flex; align-items: center; gap: 14px; padding: 14px 18px;
    background: var(--white); border: 1px solid var(--line); border-radius: 20px; font-size: 14px;
}
.trust li > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--navy); color: var(--white); flex-shrink: 0; }
.trust li:nth-child(2) > span { background: var(--coral); }
.trust strong { display: block; color: var(--navy); font-size: 15px; font-weight: 900; }

.store { padding: 10px 0 80px; }
.store__bar {
    position: sticky; top: calc(var(--nav-h) + 26px); z-index: 40;
    margin-bottom: 26px; padding: 10px; border-radius: 26px;
    background: rgba(255, 255, 255, .86); border: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    box-shadow: var(--shadow-sm);
}

/* Filters */
.sfilters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sfilters__search { flex: 1 1 260px; height: 48px; border-radius: 999px; background: var(--bg); border-color: transparent; }
.sfilters__search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.sfilters__seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg); }
.seg input, .chipr input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
    display: block; padding: 9px 16px; border-radius: 999px; cursor: pointer;
    color: var(--navy); font-size: 14px; font-weight: 800; transition: background .2s, color .2s;
}
.seg input:checked + span { background: var(--navy); color: var(--white); box-shadow: 0 4px 12px rgba(10, 17, 85, .2); }
.seg input:focus-visible + span, .chipr input:focus-visible + span { outline: 3px solid rgba(242, 69, 53, .45); outline-offset: 2px; }
.sfilters__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chipr span {
    display: block; padding: 10px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap;
    border: 1.5px solid var(--line); background: var(--white);
    color: var(--navy); font-size: 13.5px; font-weight: 800; transition: all .2s;
}
.chipr span:hover { border-color: rgba(10, 17, 85, .3); }
.chipr input:checked + span { background: var(--coral); border-color: var(--coral); color: var(--white); }

/* Grid + cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.pcard {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid var(--line); border-radius: 26px;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
    animation: cardIn .45s var(--ease) both;
}
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pgrid .pcard:nth-child(2) { animation-delay: 40ms; } .pgrid .pcard:nth-child(3) { animation-delay: 80ms; }
.pgrid .pcard:nth-child(4) { animation-delay: 120ms; } .pgrid .pcard:nth-child(n+5) { animation-delay: 160ms; }

.pcard__cover {
    position: relative; height: 150px; overflow: hidden;
    background: radial-gradient(circle at 110% 120%, rgba(242, 69, 53, .55), transparent 55%), var(--navy);
}
.pcard--cs .pcard__cover { background: radial-gradient(circle at -10% 120%, rgba(10, 17, 85, .35), transparent 55%), var(--coral); }
.pcard__cover::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .14) 1.2px, transparent 1.2px); background-size: 16px 16px;
}
.pcard__type {
    position: absolute; inset-inline-start: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px; border-radius: 999px; background: var(--white); color: var(--navy); font-size: 12px; font-weight: 900;
}
.pcard__lock {
    position: absolute; inset-inline-end: 14px; top: 14px; display: grid; place-items: center; width: 30px; height: 30px;
    border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--white);
}
.pcard__subject {
    position: absolute; inset-inline-start: 14px; bottom: -14px;
    color: rgba(255, 255, 255, .95); font-size: 68px; font-weight: 900; letter-spacing: -.05em; line-height: 1;
}
.pcard__lines { position: absolute; inset-inline-end: 16px; bottom: 18px; width: 92px; padding: 12px; border-radius: 12px; background: var(--white); transform: rotate(-6deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); transition: transform .4s var(--ease); }
.pcard:hover .pcard__lines { transform: rotate(-2deg) translateY(-4px); }
.pcard__lines i { display: block; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.pcard__lines i:nth-child(2) { width: 75%; background: var(--coral-soft); }
.pcard__lines i:last-child { width: 55%; margin: 0; }

.pcard__body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 18px; }
.pcard__meta { color: var(--coral); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.pcard__title { font-size: 19px; font-weight: 900; margin-bottom: 6px; }
.pcard__summary { font-size: 14.5px; line-height: 1.55; margin-bottom: 18px; }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.pcard__price { color: var(--navy); font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pcard__price--soon { color: var(--text); font-size: 14px; font-weight: 800; }
.pcard__btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px;
    background: var(--coral); color: var(--white); font-size: 13.5px; font-weight: 900; text-decoration: none; white-space: nowrap;
    transition: background .2s, transform .2s var(--ease);
}
.pcard__btn:hover { background: var(--coral-2); transform: translateY(-1px); }
.pcard__btn--muted { background: var(--bg); color: var(--text); pointer-events: none; }
.pcard__btn--owned { background: var(--navy); }

.store-note {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px 20px;
    border-radius: 20px; background: var(--coral-soft); color: var(--navy);
}
.store-note p { margin: 0; font-size: 15px; }
.store-note a { color: var(--coral); font-weight: 900; }
.store-note__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--coral); color: var(--white); flex-shrink: 0; }

.store-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 20px; border: 1.5px dashed rgba(10, 17, 85, .18); border-radius: 30px; }
.store-empty__icon { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 20px; background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.store-empty h3 { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.store-empty p { margin-bottom: 20px; }

@media (max-width: 1080px) {
    .store-hero__grid { grid-template-columns: 1fr; align-items: start; }
    .trust { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .trust { grid-template-columns: 1fr; }
}

/* ================================================================
   MOBILE
   ================================================================ */

/* ── Auth ── */
.mauth { padding: calc(76px + var(--safe-t)) 0 28px; }
.mauth__hero {
    position: relative; overflow: hidden; margin: 0 10px; padding: 30px 24px 64px;
    border-radius: 30px; text-align: start;
    background: radial-gradient(circle at 100% 110%, rgba(242, 69, 53, .55), transparent 55%), var(--navy);
    color: rgba(255, 255, 255, .7);
}
.mauth__dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .1) 1.2px, transparent 1.2px); background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(160deg, #000 20%, transparent 70%); mask-image: linear-gradient(160deg, #000 20%, transparent 70%);
}
.mauth__hero > * { position: relative; }
.mauth__chev { position: absolute !important; inset-inline-end: 24px; top: 32px; width: 40px; }
.mauth__mark { margin-bottom: 18px; }
.mauth__hero h1 { color: var(--white); font-size: clamp(34px, 10vw, 42px); font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.mauth__hero p { font-size: 15.5px; margin: 0; max-width: 300px; }
.mauth__card {
    position: relative; z-index: 2; margin: -36px 18px 0; padding: 24px 20px 22px;
    background: var(--white); border-radius: 28px; box-shadow: var(--shadow-lg);
}

/* ── Generic phone page ── */
.mpage { padding: calc(88px + var(--safe-t)) 14px 28px; }
.mpage__head { padding: 0 6px; margin-bottom: 20px; }
.device-mobile .acc-grid, .device-mobile .acc-side { grid-template-columns: 1fr; gap: 12px; }
/* Phones: profile → tabs → device card, so editing isn't buried below the fold. */
.device-mobile .acc-side { display: contents; }
.device-mobile .acc-card--profile { order: 1; }
.device-mobile .acc-main { order: 2; }
.device-mobile .acc-device { order: 3; }
.device-mobile .acc-card { padding: 22px 20px; border-radius: 26px; }
.device-mobile .acc-main { padding: 10px; }
.device-mobile .acc-tabs .mtabs__btn { padding: 11px 4px; font-size: 13.5px; gap: 6px; }
.device-mobile .acc-panel { padding: 20px 8px 8px; }
.device-mobile .acc-form__grid { grid-template-columns: 1fr; }
.device-mobile .acc-form__save { width: 100%; }
.device-mobile .acc-empty { padding: 28px 16px 30px; }

/* Admin on phones: stats as a swipe row, students as cards */
.device-mobile .astats { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 0 14px; gap: 10px; }
.device-mobile .astats::-webkit-scrollbar { display: none; }
.device-mobile .astat { flex: 0 0 auto; padding: 14px 16px; }
.device-mobile .astat strong { font-size: 22px; }
.device-mobile .astat > span { width: 40px; height: 40px; border-radius: 13px; }
.device-mobile .slist { background: none; border: 0; border-radius: 0; display: grid; gap: 10px; }
.device-mobile .slist__head { display: none; }
.device-mobile .srow { grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.device-mobile .srow--alert { background: #FFF8F7; border-color: rgba(242, 69, 53, .25); }
.device-mobile .srow__who { grid-column: 1 / -1; }
.device-mobile .srow__device { grid-column: 1 / -1; }
.device-mobile .srow__cell::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.device-mobile .srow__action { grid-column: 1 / -1; }
.device-mobile .srow__action form, .device-mobile .sbtn { width: 100%; justify-content: center; }
.device-mobile .sbtn { padding: 12px; font-size: 14px; }

/* ── Store ── */
.mstore { padding: calc(88px + var(--safe-t)) 0 20px; }
.mstore__head { padding: 0 20px; margin-bottom: 14px; }
.mstore__trust { display: flex; gap: 8px; padding: 0 20px 4px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.mstore__trust::-webkit-scrollbar { display: none; }
.mstore__trust span {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
    background: var(--white); border: 1px solid var(--line); color: var(--navy); font-size: 12.5px; font-weight: 800;
}
.mstore__trust .icon { color: var(--coral); }

.mstore__bar {
    position: sticky; top: calc(70px + var(--safe-t)); z-index: 40;
    padding: 10px 0 10px; margin-bottom: 8px;
    background: linear-gradient(var(--bg) 82%, rgba(247, 247, 245, 0));
}
.device-mobile .sfilters { display: grid; gap: 8px; }
.device-mobile .sfilters__search { margin: 0 16px; height: 50px; background: var(--white); border-color: var(--line); }
.device-mobile .sfilters__seg { margin: 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border: 1px solid var(--line); }
.device-mobile .seg span { text-align: center; padding: 10px; }
.device-mobile .sfilters__chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 2px; scrollbar-width: none; }
.device-mobile .sfilters__chips::-webkit-scrollbar { display: none; }

.mstore__grid { padding: 0 14px; }
.device-mobile .store-note { margin: 0 2px 14px; padding: 14px 16px; align-items: flex-start; }
.device-mobile .store-note p { font-size: 14px; }
.device-mobile .pgrid { grid-template-columns: 1fr; gap: 12px; }
.device-mobile .pcard { flex-direction: row; border-radius: 24px; }
.device-mobile .pcard:hover { transform: none; box-shadow: none; }
.device-mobile .pcard__cover { width: 104px; height: auto; min-height: 168px; flex-shrink: 0; }
.device-mobile .pcard__type { left: 50%; right: auto; top: 10px; transform: translateX(-50%); padding: 6px; font-size: 0; gap: 0; }
.device-mobile .pcard__lock, .device-mobile .pcard__lines { display: none; }
.device-mobile .pcard__subject { left: 50%; right: auto; bottom: 12px; transform: translateX(-50%); font-size: 34px; }
.device-mobile .pcard__body { padding: 16px 16px 14px; min-width: 0; }
.device-mobile .pcard__title { font-size: 17px; }
.device-mobile .pcard__summary { font-size: 13.5px; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.device-mobile .pcard__foot { padding-top: 10px; flex-wrap: wrap; }
.device-mobile .pcard__btn { padding: 9px 13px; font-size: 13px; }
.device-mobile .store-empty { padding: 44px 18px; margin: 0 2px; }

/* ================================================================
   SHARED COMPONENTS (site + manage)
   ================================================================ */
/* Status chips */
.status-chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap; background: var(--bg); color: var(--text); }
.status-chip--lg { padding: 8px 14px; font-size: 13.5px; }
.status-chip--in_review { background: var(--coral); color: var(--white); }
.status-chip--awaiting_payment { background: #FFF1DE; color: #9a5b00; }
.status-chip--paid { background: var(--navy); color: var(--white); }
.status-chip--rejected { background: var(--coral-soft); color: var(--coral); }
.status-chip--off { background: var(--bg); color: #9a9aa2; }


.lic { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.lic--active { background: var(--navy); color: var(--white); }
.lic--paused { background: #FFF1DE; color: #9a5b00; }
.lic--expired, .lic--removed, .lic--pending { background: var(--bg); color: var(--text); }

.mini-cover {
    display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 52px; border-radius: 10px;
    background: var(--navy); color: var(--white); font-size: 11px; font-weight: 900; letter-spacing: -.02em;
}
.mini-cover--cs { background: var(--coral); }
.mini-cover--other { background: #E8EAF6; color: var(--navy); }
.mini-cover--lg { width: 52px; height: 62px; font-size: 13px; border-radius: 12px; }


.textarea {
    width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--white);
    color: var(--navy); font: 600 15px/1.5 var(--font); resize: vertical; transition: border-color .2s, box-shadow .2s;
}
.textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(10, 17, 85, .07); }
.field.is-invalid .textarea { border-color: var(--coral); }


.field__box--select select {
    flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; appearance: none; -webkit-appearance: none;
    color: var(--navy); font: 700 15px var(--font); cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230A1155' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 2px center; padding-inline-end: 22px;
}

.linkbtn { padding: 6px 0; border: 0; background: none; color: var(--coral); font: 800 14px var(--font); cursor: pointer; text-decoration: underline; }
.copybtn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--bg); color: var(--navy); cursor: pointer; transition: background .2s; flex-shrink: 0; }
.copybtn:hover { background: var(--line); }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: .02em; }
.tabdot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: var(--white); font-size: 11px; font-weight: 900; }
.mtabs__btn.is-on .tabdot { background: var(--white); color: var(--coral); }

/* Drop zone (file inputs) */
.drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 16px; text-align: center; cursor: pointer;
    border: 2px dashed rgba(10, 17, 85, .2); border-radius: 20px; background: var(--bg); color: var(--text); font-size: 13px;
    transition: border-color .2s, background .2s;
}
.drop:hover, .drop:focus-within { border-color: var(--navy); background: var(--white); }
.drop.has-file { border-style: solid; border-color: var(--coral); background: #FFF8F7; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { color: var(--navy); font-size: 15px; font-weight: 900; word-break: break-all; }
.drop__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border-radius: 15px; background: var(--navy); color: var(--white); }
.drop--sm { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: start; }
.drop--sm .drop__icon { width: 34px; height: 34px; margin: 0; border-radius: 11px; }
.field.is-invalid .drop { border-color: var(--coral); }

/* ── Store: Other subject design + hold banner + card states ── */
.pcard--other .pcard__cover { background: radial-gradient(circle at 110% 120%, rgba(242, 69, 53, .25), transparent 55%), #E8EAF6; }
.pcard--other .pcard__cover::before { background-image: radial-gradient(rgba(10, 17, 85, .12) 1.2px, transparent 1.2px); }
.pcard--other .pcard__subject { color: var(--navy); }
.pcard--other .pcard__lock { background: rgba(10, 17, 85, .1); color: var(--navy); }
.pcard__btn { border: 0; font-family: var(--font); cursor: pointer; }
.pcard__foot form { margin: 0; }
.pcard__btn--added { background: var(--navy); }
.pcard__btn--added:hover { background: var(--navy-3); }
.pcard__btn--pending { background: #FFF1DE; color: #9a5b00; }
.pcard__btn--pending:hover { background: #FFE6C4; }
.store-note--hold { background: var(--navy); color: rgba(255, 255, 255, .8); }
.store-note--hold strong { color: var(--white); }
.store-note--hold a { color: #ff8a7e; }
.store-note--hold .store-note__icon { background: var(--white); color: var(--navy); }

/* ── Floating order bar ── */
.cartbar { position: fixed; z-index: 95; left: 50%; bottom: 22px; transform: translate(-50%, 140%); transition: transform .45s var(--ease); width: min(560px, calc(100% - 32px)); }
.cartbar.is-on { transform: translate(-50%, 0); }
.cartbar__inner {
    display: flex; align-items: center; gap: 14px; padding-block: 10px; padding-inline: 12px 10px; border-radius: 999px;
    background: var(--navy); color: rgba(255, 255, 255, .7); text-decoration: none; box-shadow: 0 18px 44px rgba(10, 17, 85, .35);
}
.cartbar__icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: var(--white); }
.cartbar__icon b { position: absolute; top: -3px; inset-inline-end: -3px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--coral); color: var(--white); font-size: 11px; }
.cartbar__text { flex: 1; min-width: 0; font-size: 13px; }
.cartbar__text strong { display: block; color: var(--white); font-size: 15px; font-weight: 900; }
.cartbar__go { display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: 999px; background: var(--coral); color: var(--white); font-weight: 900; font-size: 14.5px; white-space: nowrap; }
.device-mobile .cartbar { bottom: calc(var(--bar-h) + var(--safe-b) + 20px); }
.device-mobile .cartbar__go { padding: 11px 14px; }
body[data-page="checkout"] .cartbar, body[data-page="order"] .cartbar { display: none; }

/* ── Checkout / order pages ── */
.shophead { margin-bottom: 22px; }
.shophead--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shophead__title { font-size: clamp(32px, 4vw, 50px); font-weight: 900; letter-spacing: -.04em; line-height: 1.02; margin: 0; }
.shopgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.shopgrid__main, .shopgrid__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.shopcard { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 26px; min-width: 0; }
.shopcard__title { font-size: 19px; font-weight: 900; margin-bottom: 14px; }
.shopcard__meta { margin: 12px 0 0; font-size: 13px; }
.olist { list-style: none; margin: 0; padding: 0; }
.olist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.olist li + li { border-top: 1px solid var(--line); }
.olist__main { flex: 1; min-width: 0; }
.olist__main strong { display: block; color: var(--navy); font-size: 15px; font-weight: 900; }
.olist__main span { font-size: 13px; }
.olist__price { color: var(--navy); font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.olist__x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 11px; background: var(--bg); color: var(--text); cursor: pointer; }
.olist__x:hover { background: var(--coral-soft); color: var(--coral); }
.olist__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--coral); font-size: 14px; font-weight: 800; text-decoration: none; }
.olist--compact li { padding: 10px 0; }
.shopsum { position: sticky; top: calc(var(--nav-h) + 30px); }
.shopsum__row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.shopsum__row span { font-weight: 800; }
.shopsum__row strong { color: var(--navy); font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.shopsum__row--line { margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.shopsum__row--line strong { font-size: 20px; }
.shopsum__license { display: flex; gap: 10px; padding: 14px; margin-bottom: 16px; border-radius: 16px; background: var(--coral-soft); color: var(--navy); font-size: 13.5px; line-height: 1.5; }
.shopsum__license .icon { color: var(--coral); margin-top: 2px; }
.shopsum__license p { margin: 0; }
.shopsteps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.shopsteps li { display: flex; align-items: center; gap: 10px; color: var(--navy); font-size: 14px; font-weight: 700; }
.shopsteps span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 12px; font-weight: 900; flex-shrink: 0; }
.shopsum__closed { margin: 0; padding: 14px; border-radius: 14px; background: var(--bg); text-align: center; font-weight: 700; }

.otrack { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 8px; }
.otrack li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; font-weight: 800; }
.otrack li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-size: 12px; flex-shrink: 0; }
.otrack li.is-done { color: var(--navy); }
.otrack li.is-done span { background: var(--navy); color: var(--white); }
.otrack li.is-now { border-color: var(--coral); color: var(--navy); }
.otrack li.is-now span { background: var(--coral); color: var(--white); }

.onotice { display: flex; gap: 14px; padding: 18px; margin-bottom: 18px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); }
.onotice strong { color: var(--navy); font-size: 15.5px; }
.onotice p { margin: 4px 0 0; font-size: 14.5px; }
.onotice__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--coral-soft); color: var(--coral); flex-shrink: 0; }
.onotice__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--coral); font-weight: 800; font-size: 14px; }
.onotice .btn { margin-top: 12px; }
.onotice--good { background: var(--navy); border-color: var(--navy); color: rgba(255, 255, 255, .75); }
.onotice--good strong { color: var(--white); }
.onotice--good .onotice__icon { background: var(--coral); color: var(--white); }
.onotice--bad { border-color: rgba(242, 69, 53, .4); background: #FFF8F7; }
.onotice--bad .onotice__icon { background: var(--coral); color: var(--white); }

.paycard__amount { padding: 20px; margin-bottom: 18px; border-radius: 20px; background: var(--navy); color: rgba(255, 255, 255, .7); }
.paycard__amount > span { font-size: 13px; font-weight: 800; }
.paycard__amount > strong { display: block; color: var(--white); font-size: 38px; font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.paycard__amount small { display: block; margin-top: 6px; font-size: 12.5px; }
.paycard__ref { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--white); font-size: 13.5px; font-weight: 700; }
.paycard__ref code { padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .12); color: var(--white); font-size: 14px; }
.paycard__ref .copybtn { background: rgba(255, 255, 255, .12); color: var(--white); }
.paycard__none { padding: 16px; border-radius: 16px; background: var(--bg); margin: 0; }
.paycard__none a { color: var(--coral); font-weight: 800; }
.paycard__note { display: flex; gap: 8px; margin: 14px 0 0; font-size: 13.5px; }
.paycard__note .icon { color: var(--coral); margin-top: 2px; }
.paytabs .mtabs__bar { margin-bottom: 14px; }
.paypanel[hidden] { display: none; }
.paylist { margin: 0; display: grid; gap: 4px; }
.paylist > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.paylist dt { grid-column: 1; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.paylist dd { grid-column: 1; margin: 0; color: var(--navy); font-size: 15.5px; font-weight: 900; word-break: break-all; }
.paylist .copybtn { grid-column: 2; grid-row: 1 / span 2; background: var(--white); }
.paybenefit { display: flex; align-items: center; gap: 18px; }
.paybenefit__qr { width: 170px; height: 170px; padding: 10px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); object-fit: contain; flex-shrink: 0; }
.paylist__solo { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--bg); color: var(--navy); font-size: 17px; font-weight: 900; }
.proofform__method { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

@media (max-width: 960px) {
    .shopgrid { grid-template-columns: 1fr; }
    .shopsum { position: static; }
}

/* Phone versions of the shop pages */
.shoppage--m .shophead__title { font-size: clamp(28px, 8vw, 36px); }
.device-mobile .shopgrid { grid-template-columns: 1fr; gap: 12px; }
.device-mobile .shopgrid__main, .device-mobile .shopgrid__side { gap: 12px; }
.device-mobile .shopcard { padding: 18px 16px; border-radius: 22px; }
.device-mobile .shopsum { position: static; }
.device-mobile .otrack { flex-direction: column; gap: 6px; }
.device-mobile .otrack li { padding: 10px 12px; }
.device-mobile .paycard__amount > strong { font-size: 32px; }
.device-mobile .paybenefit { flex-direction: column; align-items: flex-start; }
.device-mobile .shophead--row .status-chip { order: -1; }

/* ── Account: library + orders ── */
.libgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.libitem { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--bg); }
.libitem--expired, .libitem--removed { opacity: .75; }
.libitem__main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.libitem__type { color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.libitem__main strong { color: var(--navy); font-size: 15.5px; font-weight: 900; }
.libitem__main .lic { justify-self: start; }
.libitem__open { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px; background: var(--white); color: var(--text); font-size: 13px; font-weight: 800; white-space: nowrap; }
.libnote { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; }
.libnote .icon { color: var(--coral); flex-shrink: 0; }
.ordlist { list-style: none; padding: 0; margin: 0; }
.ordlist li + li { border-top: 1px solid var(--line); }
.ordlist a { display: flex; align-items: center; gap: 12px; padding: 14px 6px; color: inherit; text-decoration: none; border-radius: 14px; }
.ordlist a:hover { background: var(--bg); }
.ordlist__ref { flex: 1; min-width: 0; }
.ordlist__ref strong { display: block; color: var(--navy); font-weight: 900; }
.ordlist__ref span { font-size: 13px; }
.ordlist__total { color: var(--navy); font-weight: 900; white-space: nowrap; }
.ordlist__go { color: var(--line); }
.device-mobile .ordlist a { flex-wrap: wrap; }
.device-mobile .ordlist__ref { flex-basis: 100%; }
.device-mobile .ordlist__go { margin-inline-start: auto; }
.device-mobile .libitem { flex-wrap: wrap; }
.device-mobile .libitem__main { flex-basis: calc(100% - 70px); }
.device-mobile .libitem__open, .device-mobile .libitem form { margin-inline-start: 66px; }
.device-mobile .acc-tabs .mtabs__btn { gap: 4px; padding: 11px 2px; font-size: 12.5px; }
.device-mobile .acc-tabs .mtabs__btn > .icon { display: none; }

/* Back links (site + manage) */
.mgback { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text); font-size: 14px; font-weight: 800; text-decoration: none; }
.mgback .icon { transform: rotate(180deg); }
.mgback:hover { color: var(--navy); }

/* Long cover words (5–8 letters) shrink so they clear the paper graphic */
.pcard__subject--long { font-size: 44px; bottom: -8px; }
.device-mobile .pcard__subject--long { font-size: 22px; }

/* ================================================================
   BRANDED DROPDOWN (ui.js upgrades every <select>)
   ================================================================ */
.cselect__native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.cselect { position: relative; flex: 1; min-width: 0; height: 100%; }
.field__box--select { position: relative; padding-inline-end: 8px; }
.cselect__btn {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 100%;
    padding-block: 0; padding-inline: 0 6px; border: 0; background: none; cursor: pointer; text-align: start;
    color: var(--navy); font: 700 15px var(--font);
}
.cselect__btn:focus-visible { outline: none; }
.field__box--select:has(.cselect__btn:focus-visible) { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(10, 17, 85, .07); }
.cselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect.is-placeholder .cselect__value { color: #a8a8b0; font-weight: 600; }
.cselect__chev { flex-shrink: 0; display: grid; place-items: center; padding: 6px; width: 28px; height: 28px; border-radius: 9px; background: var(--bg); color: var(--navy); transition: transform .25s var(--ease), background .2s; }
.cselect.is-open .cselect__chev { transform: rotate(180deg); background: var(--navy); color: var(--white); }

.cselect__pop {
    position: absolute; z-index: 160; top: calc(100% + 10px); inset-inline-start: -44px; inset-inline-end: -8px;
    padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 2px 4px rgba(10, 17, 85, .05), 0 24px 60px rgba(10, 17, 85, .18);
    opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top center;
    transition: opacity .18s ease, transform .25s var(--ease), visibility 0s linear .25s;
}
.cselect.is-open .cselect__pop { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .25s var(--ease), visibility 0s; }
.cselect__sheethead { display: none; }
.cselect__search { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 0 12px; height: 42px; border-radius: 13px; background: var(--bg); color: #9a9aa2; }
.cselect__search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--navy); font: 700 14.5px var(--font); }
.cselect__list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cselect__opt {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 12px; cursor: pointer;
    color: var(--navy); font-size: 14.5px; font-weight: 700; line-height: 1.35;
}
.cselect__opt.is-active { background: var(--bg); }
.cselect__opt.is-selected { background: var(--navy); color: var(--white); }
.cselect__opt.is-selected.is-active { background: var(--navy-3); }
.cselect__opt--placeholder { color: var(--text); font-weight: 600; }
.cselect__opt.is-disabled { opacity: .45; cursor: default; }
.cselect__tick { flex-shrink: 0; opacity: 0; color: var(--coral); }
.cselect__opt.is-selected .cselect__tick { opacity: 1; color: var(--white); }
.cselect__empty { margin: 0; padding: 14px; text-align: center; font-size: 14px; }
.cselect__scrim { display: none; }

/* Phones: bottom sheet */
.has-sheet { overflow: hidden; }
.device-mobile .cselect__pop {
    position: fixed; z-index: 9400; top: auto; left: 0; right: 0; bottom: 0; max-height: 72vh; display: flex; flex-direction: column;
    padding: 10px 14px calc(16px + var(--safe-b)); border-radius: 28px 28px 0 0; border: 0;
    transform: translateY(100%); opacity: 1; transition: transform .35s var(--ease), visibility 0s linear .35s;
}
.device-mobile .cselect.is-open .cselect__pop { transform: none; transition: transform .35s var(--ease), visibility 0s; }
.device-mobile .cselect__sheethead { display: block; padding: 0 4px 12px; text-align: center; }
.device-mobile .cselect__handle { display: block; width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 99px; background: var(--line); }
.device-mobile .cselect__sheethead strong { color: var(--navy); font-size: 17px; font-weight: 900; }
.device-mobile .cselect__list { max-height: none; flex: 1; }
.device-mobile .cselect__opt { padding: 14px; font-size: 16px; }
.device-mobile .cselect__scrim { display: block; position: fixed; inset: 0; z-index: 9390; background: rgba(10, 17, 85, .4); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
.device-mobile .cselect.is-open .cselect__scrim { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }

/* ── Discounts: badge on the cover, old price struck through ── */
.pcard__off {
    position: absolute; inset-inline-start: 14px; top: 52px; padding: 5px 10px; border-radius: 999px;
    background: var(--coral); color: var(--white); font-size: 12.5px; font-weight: 900; letter-spacing: -.01em;
    box-shadow: 0 6px 16px rgba(242, 69, 53, .4); transform: rotate(-4deg);
}
.pcard--cs .pcard__off { background: var(--white); color: var(--coral); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.pcard__off[hidden] { display: none; }
.price-was { display: block; color: #9a9aa2; font-size: .72em; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: rgba(242, 69, 53, .7); line-height: 1.1; }
.price-now { display: block; }
.pcard__price .price-was { margin-bottom: 1px; }
.olist__price { text-align: end; }
.olist__price .price-was { font-size: 12px; }
.prow__off { display: inline-block; margin-inline-start: 6px; padding: 2px 7px; border-radius: 99px; background: var(--coral); color: var(--white); font-size: 11px; font-weight: 900; vertical-align: middle; }

.field__suffix { color: var(--navy); font-weight: 900; padding-inline-start: 6px; }
.device-mobile .pcard__off { right: auto; left: 50%; top: auto; bottom: 52px; transform: translateX(-50%) rotate(-4deg); padding: 4px 8px; font-size: 11px; }

/* Prices never split ("BD" / "2.800"); if the card is narrow the button wraps instead. */
.pcard__price, .price-was, .price-now, .olist__price, .prow__price { white-space: nowrap; }
.pcard__price { flex-shrink: 0; }
.pcard__foot { flex-wrap: wrap; row-gap: 10px; }
.pcard__foot form, .pcard__foot .pcard__btn { margin-inline-start: auto; }

/* Drop zones are <label>s: beat the generic .field label rule, and show a preview once a file is picked. */
.field label.drop { display: flex; margin-bottom: 0; color: var(--text); font-size: 13px; font-weight: 600; }
.field label.drop.drop--sm { flex-direction: row; }
.drop__preview { display: none; }
.drop.has-file { padding: 14px; }
.drop.has-file > .drop__icon, .drop.has-file > strong, .drop.has-file > span:not(.drop__preview) { display: none; }
.drop.has-file .drop__preview { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; }
.drop__thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; object-fit: cover; background: var(--white); border: 1px solid var(--line); }
.drop__doc { display: grid; place-items: center; background: var(--navy); border-color: var(--navy); color: var(--white); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.drop__meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.drop__meta strong { color: var(--navy); font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal; }
.drop__meta span { font-size: 12.5px; color: var(--text); }
.drop__ok { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--coral); color: var(--white); flex-shrink: 0; }

/* ── Legal pages ── */
.legal { padding: calc(var(--nav-h) + 56px) 0 72px; }
.legal__head { max-width: 760px; margin-bottom: 30px; }
.legal__title { font-size: clamp(36px, 4.6vw, 56px); font-weight: 900; letter-spacing: -.04em; line-height: 1.02; margin-bottom: 14px; }
.legal__lead { font-size: 17.5px; line-height: 1.65; margin-bottom: 8px; }
.legal__lead strong { color: var(--navy); }
.legal__updated { font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.legal__tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
.legal__tab { padding: 9px 16px; border-radius: 999px; color: var(--navy); font-size: 14px; font-weight: 800; text-decoration: none; }
.legal__tab.is-on { background: var(--navy); color: var(--white); }
.legal__grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.legal__toc { position: sticky; top: calc(var(--nav-h) + 40px); padding: 18px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); }
.legal__toclabel { display: block; margin-bottom: 8px; color: var(--coral); font-size: 11.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.legal__toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.legal__toc li { counter-increment: toc; }
.legal__toc a { display: flex; gap: 8px; padding: 7px 8px; border-radius: 10px; color: var(--text); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.legal__toc a::before { content: counter(toc, decimal-leading-zero); color: var(--coral); font-weight: 900; font-size: 12px; padding-top: 1px; }
.legal__toc a:hover { background: var(--bg); color: var(--navy); }
.legal__doc { padding: 36px 40px; border-radius: 28px; background: var(--white); border: 1px solid var(--line); }
.legal__sec { scroll-margin-top: calc(var(--nav-h) + 40px); padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.legal__sec:last-of-type { border-bottom: 0; margin-bottom: 0; }
.legal__sec h2 { display: flex; align-items: baseline; gap: 12px; font-size: 21px; font-weight: 900; margin-bottom: 12px; }
.legal__sec h2 span { color: var(--coral); font-size: 14px; }
.legal__sec p, .legal__sec li { font-size: 15.5px; line-height: 1.7; }
.legal__sec ul, .legal__sec ol { padding-inline-start: 20px; margin: 0 0 12px; }
.legal__sec li { margin-bottom: 6px; }
.legal__sec strong { color: var(--navy); }
.legal__sec a { color: var(--coral); font-weight: 800; }
.legal__note { margin: 24px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--bg); font-size: 13px; }
@media (max-width: 960px) { .legal__grid { grid-template-columns: 1fr; } .legal__toc { position: static; } }

.legal--m { padding: calc(84px + var(--safe-t)) 14px 28px; }
.legal--m .legal__head { padding: 0 6px; }
.legal--m .legal__title { font-size: clamp(30px, 8.6vw, 38px); }
.legal--m .legal__lead { font-size: 15.5px; }
.legal--m .legal__tabs { display: flex; }
.legal--m .legal__tab { flex: 1; text-align: center; padding: 9px 6px; }
.legal--m .legal__grid { gap: 12px; }
.legal__toc--m { position: static; padding: 0; }
.legal__toc--m summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; color: var(--navy); font-weight: 900; cursor: pointer; list-style: none; }
.legal__toc--m summary::-webkit-details-marker { display: none; }
.legal__toc--m summary .icon { transform: rotate(90deg); transition: transform .25s; }
.legal__toc--m[open] summary .icon { transform: rotate(-90deg); }
.legal__toc--m ol { padding: 0 10px 12px; }
.legal--m .legal__doc { padding: 22px 18px; border-radius: 24px; }
.legal--m .legal__sec h2 { font-size: 18.5px; }
.legal--m .legal__sec p, .legal--m .legal__sec li { font-size: 15px; }
.legal--m .legal__sec { scroll-margin-top: 84px; }

.cselect__opt[hidden] { display: none; }
.cselect__label { min-width: 0; }
.cselect__sub { display: block; margin-top: 2px; color: var(--text); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__opt.is-selected .cselect__sub { color: rgba(255, 255, 255, .7); }

/* ── Confirm-your-email notice (account + checkout) ── */
.verify-note { flex-wrap: wrap; }
.verify-note p { flex: 1 1 260px; }
.verify-note form { margin-inline-start: auto; }
.verify-note__btn { white-space: nowrap; background: var(--white); }
.verify-chip { display: inline-block; margin-inline-start: 6px; padding: 2px 9px; border-radius: 999px; background: var(--coral-soft); color: var(--coral); font-size: 11px; font-weight: 900; vertical-align: middle; }
.device-mobile .verify-note form { margin-inline-start: 54px; }

/* ── Right-to-left (Arabic) ── */
/* Phone field keeps "🇧🇭 +973 | 3344 5566" in reading order. */
[dir="rtl"] .field__box:has(.field__prefix):has(input[type="tel"]) { direction: ltr; }
[dir="rtl"] .field__box:has(.field__prefix) input[type="tel"] { text-align: left; }
[dir="rtl"] .field__box--select select { background-position: left 2px center; }
[dir="rtl"] .mgback .icon { transform: none; } /* arrow already points "back" (right) */
[dir="rtl"] .auth-aside { background: radial-gradient(circle at 0% 100%, rgba(242, 69, 53, .5), transparent 50%), var(--navy); }
[dir="rtl"] .auth-aside__dots, [dir="rtl"] .mauth__dots { -webkit-mask-image: linear-gradient(200deg, #000 20%, transparent 70%); mask-image: linear-gradient(200deg, #000 20%, transparent 70%); }
[dir="rtl"] .mauth__hero { background: radial-gradient(circle at 0% 110%, rgba(242, 69, 53, .55), transparent 55%), var(--navy); }
[dir="rtl"] .store-hero__bg { -webkit-mask-image: radial-gradient(ellipse 50% 70% at 20% 40%, #000 15%, transparent 70%); mask-image: radial-gradient(ellipse 50% 70% at 20% 40%, #000 15%, transparent 70%); }
[dir="rtl"] .pcard__cover { background: radial-gradient(circle at -10% 120%, rgba(242, 69, 53, .55), transparent 55%), var(--navy); }
[dir="rtl"] .pcard--cs .pcard__cover { background: radial-gradient(circle at 110% 120%, rgba(10, 17, 85, .35), transparent 55%), var(--coral); }
[dir="rtl"] .pcard--other .pcard__cover { background: radial-gradient(circle at -10% 120%, rgba(242, 69, 53, .25), transparent 55%), #E8EAF6; }
[dir="rtl"] .pcard__lines { transform: rotate(6deg); }
[dir="rtl"] .pcard:hover .pcard__lines { transform: rotate(2deg) translateY(-4px); }
/* Prices, references and payment numbers never reorder inside Arabic text. */
.price-now, .price-was, .pcard__price, .olist__price, .ordlist__total, .shopsum__row strong,
.paycard__amount > strong, .paycard__ref code, .ordlist__ref strong, .mono, .paylist dd { unicode-bidi: isolate; }
[dir="rtl"] .mono { direction: ltr; }
[dir="rtl"] .paylist dd.mono { text-align: right; }
