:root {
    color-scheme: light;
    --ink: #20233a;
    --muted: #72768b;
    --line: #e9e8f0;
    --paper: #ffffff;
    --canvas: #f7f7fa;
    --purple: #342078;
    --purple-dark: #21144f;
    --purple-pale: #f0edfa;
    --green: #17816d;
    --green-dark: #116956;
    --green-pale: #e8f5f1;
    --gold: #dfbd77;
    --font-body: 'Segoe UI', Arial, sans-serif;
    --font-display: 'Segoe UI', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 26px;
}

body.bimis-page {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(ellipse at 88% 8%, rgba(52, 32, 120, .055), transparent 30rem),
        var(--canvas);
    font-family: var(--font-body);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.page-shell {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(52, 32, 120, .09);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(52, 32, 120, .09);
    border-radius: 13px;
    background: #fff;
}

.brand-mark img {
    display: block;
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    color: #262139;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.025em;
}

.brand-copy > span {
    color: #88879a;
    font-size: 10px;
    letter-spacing: .012em;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #55516d;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .2s, color .2s, transform .2s;
}

.header-link:hover {
    transform: translateY(-1px);
    border-color: #d1c9e8;
    color: var(--purple);
}

.header-link-dot,
.status-active > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #45a88c;
    box-shadow: 0 0 0 3px rgba(69, 168, 140, .12);
}

.welcome-panel {
    position: relative;
    display: flex;
    min-height: 290px;
    align-items: center;
    justify-content: center;
    margin: 13px 0 0;
    padding: 52px 30px 42px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
}

.welcome-panel::after {
    position: absolute;
    inset: 24px 10% 0;
    background-image:
        linear-gradient(30deg, transparent 49.5%, rgba(52, 32, 120, .035) 50%, transparent 50.5%),
        linear-gradient(150deg, transparent 49.5%, rgba(23, 129, 109, .035) 50%, transparent 50.5%);
    background-size: 42px 72px;
    content: '';
    mask-image: radial-gradient(ellipse, #000, transparent 72%);
    pointer-events: none;
}

.welcome-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(23, 129, 109, .13);
    border-radius: 999px;
    background: var(--green-pale);
    color: var(--green-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.welcome-copy h1 {
    margin: 20px 0 12px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 54px);
    font-weight: 600;
    letter-spacing: -.065em;
    line-height: 1.14;
}

.welcome-copy h1 span {
    color: var(--purple);
}

.welcome-copy > p {
    max-width: 520px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 19px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
}

.button:hover {
    transform: translateY(-2px);
}

.welcome-mark {
    position: absolute;
    top: 35px;
    right: 8%;
    display: grid;
    width: 112px;
    height: 112px;
    place-items: center;
    opacity: .52;
    pointer-events: none;
}

.welcome-mark-orbit,
.welcome-mark-ring {
    position: absolute;
    border: 1px solid rgba(52, 32, 120, .2);
    border-radius: 50%;
}

.welcome-mark-orbit {
    inset: 0;
    border-style: dashed;
}

.welcome-mark-ring {
    inset: 13px;
    border-color: rgba(23, 129, 109, .28);
}

.welcome-mark-center {
    color: var(--purple);
    font-family: serif;
    font-size: 17px;
}

.welcome-mark-star {
    position: absolute;
    color: #b99d61;
}

.star-top {
    top: 4px;
    left: 25px;
    font-size: 13px;
}

.star-bottom {
    right: 7px;
    bottom: 18px;
    font-size: 11px;
}

.welcome-note {
    position: absolute;
    right: 10%;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(52, 32, 120, .1);
    border-radius: 13px;
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 6px 18px rgba(37, 28, 78, .04);
}

.welcome-note-icon {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 9px;
    background: var(--purple-pale);
    color: var(--purple);
}

.welcome-note > span:last-child {
    display: grid;
    gap: 2px;
}

.welcome-note strong {
    color: var(--ink);
    font-size: 10px;
}

.welcome-note small {
    color: var(--muted);
    font-size: 9px;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 21px;
    padding: 14px 17px;
    border: 1px solid;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.notice-success {
    border-color: #cce8dc;
    background: #eff9f4;
    color: #266b55;
}

.notice-error {
    border-color: #f1d2ca;
    background: #fff6f3;
    color: #934b39;
}

.notice-icon {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    place-items: center;
    border-radius: 50%;
    background: rgba(23, 129, 109, .1);
    font-size: 12px;
    font-weight: 800;
}

.notice-error .notice-icon {
    background: rgba(147, 75, 57, .1);
}

.notice strong {
    font-size: 13px;
}

.notice ul {
    margin: 5px 0 0;
    padding-left: 18px;
}

.content-section {
    margin-top: 25px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.section-kicker {
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .15em;
}

.section-heading h2 {
    margin: 7px 0 5px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.045em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.count-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #78758c;
    font-size: 10px;
    font-weight: 600;
}

.form-card {
    padding: 25px 27px 20px;
    border: 1px solid #e8e7ef;
    border-radius: 19px;
    background: var(--paper);
    box-shadow: 0 16px 38px rgba(38, 32, 69, .065);
}

.shortener-heading {
    justify-content: center;
    margin-bottom: 15px;
    text-align: center;
}

.shortener-heading .section-kicker {
    letter-spacing: .16em;
}

.shortener-heading h2 {
    font-size: 24px;
}

.shortener-card {
    width: min(100%, 790px);
    margin: 0 auto;
    padding: 23px 25px 17px;
}

.shortener-card .form-grid {
    gap: 17px;
}

.shortener-card .field-hint {
    display: none;
}

.qr-logo-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.qr-logo-field legend {
    margin-bottom: 8px;
    color: #35334a;
    font-size: 11px;
    font-weight: 700;
}

.qr-logo-options {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

.qr-logo-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.qr-logo-radio {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: -1px;
    padding: 0 !important;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0 !important;
}

.qr-logo-option-content {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    padding: 4px 1px;
    border: 1px solid #e5e4ec;
    border-radius: 7px;
    background: #fdfdfe;
    color: #5b5870;
    text-align: center;
    transition: border-color .18s, background .18s, box-shadow .18s;
}

.qr-logo-radio:checked + .qr-logo-option-content {
    border-color: #8e7ac6;
    background: #f7f5fc;
    box-shadow: 0 0 0 3px rgba(52, 32, 120, .08);
    color: var(--purple);
}

.qr-logo-radio:focus-visible + .qr-logo-option-content {
    outline: 2px solid #8e7ac6;
    outline-offset: 2px;
}

.qr-logo-option-content strong {
    font-size: 7px;
    font-weight: 700;
    line-height: 1.1;
}

.qr-logo-image,
.qr-logo-no-image {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
}

.qr-logo-image {
    object-fit: contain;
}

.qr-logo-no-image {
    border: 1px dashed #c9c5d5;
    border-radius: 6px;
    color: #88849a;
    font-size: 16px;
    font-weight: 400;
}

.qr-logo-field > small {
    color: #9391a0;
    font-size: 10px;
    line-height: 1.5;
}

.shortener-input-wrap {
    position: relative;
}

.shortener-input-wrap input {
    min-height: 54px;
    padding: 14px 47px 14px 16px;
    border-color: #e3e1eb;
    border-radius: 13px;
    background: #fbfafd;
    font-size: 14px;
}

.shortener-input-wrap input:focus {
    background: #fff;
}

.input-link-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    display: grid;
    width: 27px;
    height: 27px;
    transform: translateY(-50%);
    place-items: center;
    border-radius: 8px;
    background: var(--purple-pale);
    color: var(--purple);
    font-size: 15px;
    pointer-events: none;
}

.shortener-slug-input {
    min-height: 46px;
    border-radius: 11px;
}

.shortener-slug-input > span {
    padding: 0 11px;
    border-right: 0;
    color: #77738a;
    font-size: 12px;
}

.shortener-slug-input input {
    min-height: 44px;
    padding-left: 0;
    font-size: 13px;
}

.advanced-options {
    margin-top: 14px;
    border-top: 1px solid #efedf4;
}

.advanced-options summary {
    display: flex;
    min-height: 53px;
    align-items: center;
    gap: 10px;
    color: #5e5a70;
    cursor: pointer;
    list-style: none;
}

.advanced-options summary::-webkit-details-marker {
    display: none;
}

.advanced-icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid #e8e4f0;
    border-radius: 8px;
    background: #faf9fc;
    color: var(--purple);
    font-size: 15px;
    transition: transform .2s;
}

.advanced-options[open] .advanced-icon {
    transform: rotate(45deg);
}

.advanced-options summary > span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.advanced-options summary strong {
    font-size: 10px;
}

.advanced-options summary small {
    color: #9693a2;
    font-size: 9px;
}

.advanced-chevron {
    margin-left: auto;
    color: #89859a;
    font-size: 15px;
    transition: transform .2s;
}

.advanced-options[open] .advanced-chevron {
    transform: rotate(180deg);
}

.advanced-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 19px;
    padding: 3px 0 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    color: #35334a;
    font-size: 11px;
    font-weight: 700;
}

.field > small {
    color: #9391a0;
    font-size: 10px;
    line-height: 1.5;
}

.required-mark {
    color: #c05c57;
}

.optional-label {
    margin-left: 4px;
    color: #9b98a8;
    font-size: 10px;
    font-weight: 500;
}

.field-hint {
    margin-top: -5px;
    color: #9391a0;
    font-size: 10px;
}

.field input,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #e5e4ec;
    border-radius: 10px;
    outline: none;
    background: #fdfdfe;
    color: #343247;
    font: 12px var(--font-body);
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #aaa8b5;
}

.field textarea {
    min-height: 92px;
    resize: vertical;
    line-height: 1.6;
}

.field input:focus,
.field textarea:focus {
    border-color: #8e7ac6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 32, 120, .09);
}

.input-with-prefix,
.input-with-suffix {
    display: flex;
    min-width: 0;
    align-items: center;
    overflow: hidden;
    border: 1px solid #e5e4ec;
    border-radius: 10px;
    background: #fdfdfe;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.input-with-prefix:focus-within,
.input-with-suffix:focus-within {
    border-color: #8e7ac6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 32, 120, .09);
}

.input-with-prefix > span,
.input-with-suffix > span {
    flex: 0 0 auto;
    color: #8a879b;
    font-size: 11px;
}

.input-with-prefix > span {
    padding-left: 13px;
    border-right: 1px solid #eeedf2;
}

.input-with-prefix input,
.input-with-suffix input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.input-with-prefix input:focus,
.input-with-suffix input:focus {
    box-shadow: none;
}

.input-with-suffix > span {
    padding: 0 13px 0 5px;
}

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid #f0eff4;
}

.form-footer p {
    margin: 0;
    color: #8a8798;
    font-size: 10px;
}

.form-footer p span {
    margin-right: 4px;
    color: var(--gold);
}

.shortener-footer .button {
    min-width: 180px;
    min-height: 46px;
    border-radius: 11px;
    font-size: 12px;
}

.button-primary {
    background: linear-gradient(110deg, var(--purple), #49318e);
    color: #fff;
    box-shadow: 0 7px 17px rgba(52, 32, 120, .16);
}

.button-primary:hover {
    background: linear-gradient(110deg, #2c1c69, #3c287e);
    box-shadow: 0 9px 20px rgba(52, 32, 120, .22);
}

.links-section {
    margin-top: 40px;
}

.announcement-settings {
    margin-top: 12px;
}

.announcement-form {
    padding: 21px 23px;
}

.announcement-toggle {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding-bottom: 17px;
    border-bottom: 1px solid #f0eff4;
    cursor: pointer;
}

.announcement-toggle input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin: 1px 0 0;
    accent-color: var(--purple);
}

.announcement-toggle > span {
    display: grid;
    gap: 4px;
}

.announcement-toggle strong {
    color: #35334a;
    font-size: 12px;
}

.announcement-toggle small {
    color: #898698;
    font-size: 10px;
    line-height: 1.5;
}

.announcement-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 19px;
    padding-top: 17px;
}

.announcement-form .form-footer {
    align-items: center;
}

.announcement-image-preview {
    display: block;
    width: min(100%, 360px);
    max-height: 240px;
    margin-top: 12px;
    border: 1px solid #e9e5f1;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
}

.transit-message.announcement-image {
    padding: 0;
    background: transparent;
}

.announcement-image img {
    display: block;
    width: 100%;
    max-height: 60vh;
    border: 1px solid #ece8f3;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
}

.count-badge {
    gap: 5px;
    color: var(--purple);
    font-weight: 800;
}

.count-badge > span {
    color: #8c899b;
    font-weight: 500;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
    padding: 16px 19px;
    border: 1px solid #ecebf2;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(38, 32, 69, .025);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.link-domain {
    color: #8a8798;
    font-size: 10px;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: #dcd6ec;
    box-shadow: 0 10px 22px rgba(38, 32, 69, .06);
}

.qr-preview {
    display: flex;
    width: 184px;
    flex: 0 0 184px;
    flex-direction: column;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid #eeedf3;
    border-radius: 17px;
    background:
        radial-gradient(circle at 90% 4%, rgba(223, 189, 119, .12), transparent 7rem),
        linear-gradient(155deg, #f8f6fc, #f2f8f5);
}

.qr-preview img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 440 / 530;
    border: 1px solid #eeedf3;
    border-radius: 13px;
    background: #fff;
    object-fit: contain;
}

.qr-download {
    display: inline-flex;
    width: 100%;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid rgba(52, 32, 120, .13);
    border-radius: 10px;
    background: linear-gradient(110deg, var(--purple), #49318e);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(52, 32, 120, .12);
    transition: transform .2s, box-shadow .2s, background .2s;
}

.qr-download svg {
    width: 16px;
    height: 16px;
}

.qr-download:hover {
    transform: translateY(-1px);
    background: linear-gradient(110deg, #2c1c69, #3c287e);
    box-shadow: 0 6px 14px rgba(52, 32, 120, .19);
}

.text-link:hover {
    text-decoration: underline;
}

.link-details {
    min-width: 0;
    flex: 1;
}

.link-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.short-link {
    overflow: hidden;
    color: var(--purple);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.all-links-link {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #e8e6ef;
    border-radius: 999px;
    background: #fff;
}

.short-link:hover {
    color: var(--green-dark);
}

.short-link > span {
    font-size: 11px;
}

.status-pill {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.status-active {
    background: #edf7f1;
    color: #327557;
}

.status-active > span {
    width: 6px;
    height: 6px;
    background: #51a379;
    box-shadow: none;
}

.status-expired {
    background: #fff1ee;
    color: #a55145;
}

.destination-link {
    display: block;
    overflow: hidden;
    margin-top: 6px;
    color: #8b8998;
    font-size: 10px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.destination-link:hover {
    color: var(--purple);
}

.announcement-chip {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    margin: 9px 0 0;
    padding: 5px 8px;
    border: 1px solid #eee4c9;
    border-radius: 7px;
    background: #fcf8ec;
    color: #806c3e;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announcement-chip > span {
    color: #b99c58;
}

.link-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    color: #858394;
    font-size: 10px;
}

.link-meta > span > span {
    margin-right: 3px;
    color: #8175a4;
}

.empty-state {
    padding: 43px 20px;
    border: 1px dashed #dcd9e7;
    border-radius: 17px;
    background: rgba(255, 255, 255, .55);
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 14px;
    background: var(--purple-pale);
    color: var(--purple);
    font-size: 18px;
}

.empty-state h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 15px;
}

.empty-state p {
    margin: 7px 0 12px;
    color: var(--muted);
    font-size: 11px;
}

.text-link {
    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.site-footer {
    display: flex;
    min-height: 77px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 26px;
    border-top: 1px solid rgba(52, 32, 120, .09);
    color: #9693a2;
    font-size: 10px;
}

.footer-note > span {
    margin-right: 5px;
    color: #c0a35c;
}

.centered-page {
    display: grid;
    min-height: 100vh;
    grid-template-rows: 1fr auto;
    justify-items: center;
    padding: 38px 18px 20px;
    background:
        radial-gradient(ellipse at 15% 12%, rgba(52, 32, 120, .085), transparent 25rem),
        radial-gradient(ellipse at 95% 91%, rgba(23, 129, 109, .08), transparent 26rem),
        var(--canvas);
}

.transit-card,
.expired-card {
    width: min(100%, 460px);
    align-self: center;
    padding: 29px 36px 32px;
    border: 1px solid #ebeaf1;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 55px rgba(37, 28, 78, .1);
    text-align: center;
}

.transit-brand,
.centered-brand {
    justify-content: center;
    margin: 0 auto;
    text-align: left;
}

.transit-symbol,
.expired-symbol {
    display: grid;
    width: 60px;
    height: 60px;
    margin: 23px auto 15px;
    place-items: center;
    border: 1px solid #e5ddf3;
    border-radius: 20px;
    background: linear-gradient(145deg, #f7f3ff, #edf7f4);
    color: var(--purple);
    font-size: 25px;
    box-shadow: 0 8px 18px rgba(52, 32, 120, .08);
}

.eyebrow-soft {
    color: var(--green);
    font-size: 9px;
}

.transit-card h1,
.expired-card h1 {
    margin: 8px 0 12px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1.28;
}

.transit-message {
    padding: 14px 16px;
    border: 1px solid #eeedf3;
    border-radius: 13px;
    background: #faf9fc;
    color: #656477;
    text-align: left;
}

.transit-message p {
    margin: 0;
    font-size: 12px;
    line-height: 1.75;
    white-space: pre-line;
}

.countdown-panel {
    display: grid;
    justify-items: center;
    margin-top: 17px;
    padding: 16px;
    border: 1px solid #eae6f4;
    border-radius: 15px;
    background:
        radial-gradient(circle at 90% 0, rgba(223, 189, 119, .11), transparent 8rem),
        #f8f6fc;
}

.countdown-caption,
.countdown-unit {
    color: #858197;
    font-size: 10px;
}

.countdown-number {
    margin: 0;
    color: var(--purple);
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: 1.1;
}

.countdown-track {
    width: 100%;
    height: 3px;
    margin-top: 13px;
    overflow: hidden;
    border-radius: 10px;
    background: #e7e2f1;
}

.countdown-track > span {
    display: block;
    width: 60%;
    height: 100%;
    transform-origin: left;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), #74b798);
    animation: countdown-progress var(--countdown-duration, 3s) linear infinite;
}

@keyframes countdown-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.transit-blessing {
    margin: 15px 0 12px;
    color: #898698;
    font-size: 10px;
}

.transit-button,
.expired-button {
    width: 100%;
}

.transit-fallback {
    margin: 11px 0 0;
    color: #a09eab;
    font-size: 9px;
}

.centered-footer {
    align-self: end;
    padding-top: 20px;
    color: #9693a2;
    font-size: 10px;
    text-align: center;
}

.centered-footer > span {
    margin-left: 5px;
    color: #c0a35c;
}

.expired-card {
    width: min(100%, 420px);
    padding-bottom: 29px;
}

.expired-symbol {
    border-color: #f2ddd3;
    background: linear-gradient(145deg, #fff6ef, #f5f0fa);
    color: #a66343;
    font-size: 30px;
}

.expired-card h1 {
    margin-top: 10px;
}

.expired-card > p {
    max-width: 310px;
    margin: 0 auto 21px;
    color: #797789;
    font-size: 12px;
    line-height: 1.8;
}

.expired-blessing {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #f0eff4;
    color: #9995a3;
    font-size: 9px;
}

.expired-blessing > span {
    margin-right: 4px;
    color: #c0a35c;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions > form {
    margin: 0;
}

.account-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #777487;
    font-size: 10px;
}

.role-badge {
    padding: 4px 6px;
    border-radius: 5px;
    background: #f4f0df;
    color: #806b34;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
}

.logout-link {
    cursor: pointer;
    font-family: inherit;
}

.admin-link-tools {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid #f0eff4;
}

.admin-link-tools > summary {
    width: fit-content;
    color: var(--purple);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.admin-edit-form {
    margin-top: 12px;
}

.admin-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-edit-grid .field {
    gap: 5px;
}

.admin-edit-grid .field label {
    font-size: 10px;
}

.admin-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.button-danger {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #f1d5d1;
    border-radius: 9px;
    background: #fff7f5;
    color: #a3443a;
    cursor: pointer;
    font: 700 10px var(--font-body);
}

.login-page {
    display: grid;
    min-height: 100vh;
    grid-template-rows: 1fr auto;
    justify-items: center;
    padding: 30px 18px 18px;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(52, 32, 120, .09), transparent 24rem),
        radial-gradient(ellipse at 91% 92%, rgba(23, 129, 109, .08), transparent 26rem),
        var(--canvas);
}

.login-card {
    width: min(100%, 460px);
    align-self: center;
    padding: 34px 38px 29px;
    border: 1px solid #ebeaf1;
    border-radius: 25px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 55px rgba(37, 28, 78, .1);
    text-align: center;
}

.login-brand {
    justify-content: center;
    margin: 0 auto 27px;
    text-align: left;
}

.login-emblem {
    display: grid;
    width: 65px;
    height: 65px;
    margin: 0 auto 17px;
    place-items: center;
    border: 1px solid #e5ddf3;
    border-radius: 22px;
    background: linear-gradient(145deg, #f7f3ff, #edf7f4);
    color: var(--purple);
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(52, 32, 120, .08);
}

.login-card h1 {
    margin: 11px 0 10px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 29px;
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1.25;
}

.login-card h1 span {
    color: var(--purple);
}

.login-description {
    max-width: 330px;
    margin: 0 auto 23px;
    color: #777487;
    font-size: 12px;
    line-height: 1.75;
}

.account-form {
    display: grid;
    gap: 13px;
    text-align: left;
}

.account-form .field {
    gap: 6px;
}

.account-form .field label {
    font-size: 11px;
}

.account-form .field input {
    min-height: 46px;
    font-size: 12px;
}

.field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #e5e4ec;
    border-radius: 10px;
    outline: none;
    background: #fdfdfe;
    color: #343247;
    font: 12px var(--font-body);
}

.field select:focus {
    border-color: #8e7ac6;
    box-shadow: 0 0 0 3px rgba(52, 32, 120, .09);
}

.account-submit {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(110deg, var(--purple), #49318e);
    color: #fff;
    cursor: pointer;
    font: 700 12px var(--font-body);
    box-shadow: 0 7px 17px rgba(52, 32, 120, .16);
    transition: transform .2s, box-shadow .2s, background .2s;
}

.account-submit:hover {
    transform: translateY(-1px);
    background: linear-gradient(110deg, #2c1c69, #3c287e);
    box-shadow: 0 9px 20px rgba(52, 32, 120, .22);
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #777487;
    font-size: 12px;
}

.remember-option input {
    width: 15px;
    height: 15px;
    accent-color: var(--purple);
}

.account-switch {
    margin: 17px 0 0;
    color: #777487;
    font-size: 11px;
}

.account-switch a {
    color: var(--purple);
    font-weight: 700;
    text-decoration: none;
}

.account-switch a:hover {
    text-decoration: underline;
}

.forgot-password-link {
    justify-self: end;
    color: var(--purple);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.login-privacy {
    margin: 18px 0 0;
    color: #9a97a4;
    font-size: 9px;
    line-height: 1.7;
}

.login-blessing {
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid #f0eff4;
    color: #9995a3;
    font-size: 9px;
}

.login-blessing span {
    margin-left: 4px;
    color: #c0a35c;
}

.login-error {
    text-align: left;
}

.login-error ul {
    margin: 0;
}

.user-admin-welcome {
    min-height: 205px;
}

.user-admin-welcome .welcome-copy h1 {
    font-size: clamp(32px, 4vw, 44px);
}

.user-create-form {
    padding: 22px 24px;
}

.user-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 18px;
}

.user-admin-card {
    margin-bottom: 12px;
    padding: 16px 19px;
    border: 1px solid #ecebf2;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(38, 32, 69, .025);
}

.user-card-heading,
.user-card-heading > div,
.user-card-status {
    display: flex;
    align-items: center;
}

.user-card-heading {
    justify-content: space-between;
    gap: 12px;
}

.user-card-heading > div:first-child {
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.user-card-heading strong {
    overflow-wrap: anywhere;
    color: #35334a;
    font-size: 13px;
}

.user-card-heading > div:first-child > span {
    overflow-wrap: anywhere;
    color: #898698;
    font-size: 10px;
}

.user-card-status {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.user-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 13px;
}

.user-admin-actions > form {
    margin: 0;
}

.button-secondary {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #e5e1ef;
    border-radius: 9px;
    background: #f8f6fc;
    color: var(--purple);
    cursor: pointer;
    font: 700 10px var(--font-body);
}

.pagination-wrap {
    margin: 20px 0;
}

.verification-logout {
    margin-top: 13px;
}

.verification-logout button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body);
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 32px, 580px);
    }

    .welcome-panel {
        min-height: 255px;
        padding: 42px 24px 30px;
    }

    .welcome-mark,
    .welcome-note {
        display: none;
    }

    .welcome-copy {
        max-width: 540px;
    }

    .welcome-copy > p {
        max-width: 440px;
    }

    .form-card {
        padding: 22px 20px 17px;
    }

    .advanced-fields {
        gap: 16px;
    }

    .account-label {
        display: none;
    }

    .user-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: calc(100% - 28px);
    }

    .site-header {
        min-height: 70px;
    }

    .brand-mark {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        border-radius: 11px;
    }

    .brand-mark img {
        width: 32px;
        height: 32px;
    }

    .brand-copy strong {
        font-size: 12px;
    }

    .brand-copy > span {
        max-width: 205px;
        font-size: 9px;
    }

    .header-link {
        gap: 7px;
        padding: 9px 11px;
        font-size: 10px;
    }

    .header-actions {
        gap: 6px;
    }

    .welcome-panel {
        min-height: 0;
        margin-top: 9px;
        padding: 40px 8px 27px;
        border-radius: 0;
    }

    .welcome-copy h1 {
        max-width: 370px;
        margin: 17px auto 10px;
        font-size: clamp(31px, 9vw, 38px);
    }

    .welcome-copy > p {
        max-width: 350px;
        font-size: 12px;
    }

    .content-section {
        margin-top: 36px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .section-heading p {
        max-width: 270px;
        line-height: 1.6;
    }

    .form-card {
        padding: 18px 15px 15px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .field-full {
        grid-column: auto;
    }

    .form-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .shortener-footer {
        align-items: stretch;
    }

    .shortener-footer .button {
        width: 100%;
    }

    .shortener-card {
        padding: 16px 13px 14px;
    }

    .shortener-input-wrap input {
        min-height: 50px;
        padding-left: 12px;
        font-size: 12px;
    }

    .shortener-slug-input > span {
        padding: 0 8px;
        font-size: 10px;
    }

    .shortener-slug-input input {
        font-size: 12px;
    }

    .advanced-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .link-card {
        align-items: flex-start;
        gap: 13px;
        padding: 12px;
        border-radius: 15px;
    }

    .qr-preview {
        width: 130px;
        flex-basis: 130px;
        gap: 8px;
        padding: 9px;
        border-radius: 13px;
    }

    .qr-preview img {
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .qr-download {
        min-height: 34px;
        gap: 5px;
        padding: 0 6px;
        font-size: 9px;
    }

    .qr-download svg {
        width: 14px;
        height: 14px;
    }

    .link-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .short-link {
        max-width: 100%;
        font-size: 13px;
    }

    .destination-link {
        max-width: 100%;
    }

    .link-meta {
        flex-direction: column;
        gap: 5px;
    }

    .admin-edit-grid {
        grid-template-columns: 1fr;
    }

    .user-form-grid {
        grid-template-columns: 1fr;
    }

    .user-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-card-status {
        justify-content: flex-start;
    }

    .announcement-form {
        padding: 17px 15px;
    }

    .announcement-fields {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .login-card {
        padding: 27px 22px 24px;
        border-radius: 21px;
    }

    .login-card h1 {
        font-size: 26px;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 14px 0;
    }

    .transit-card,
    .expired-card {
        padding: 24px 21px 25px;
        border-radius: 20px;
    }

    .transit-card h1,
    .expired-card h1 {
        font-size: 22px;
    }
}

@media (max-width: 520px) {
    body.bimis-page {
        min-width: 0;
        background: var(--canvas);
    }

    .page-shell {
        width: calc(100% - 28px);
    }

    .site-header {
        display: grid;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 11px 0;
    }

    .site-header > .brand {
        min-width: 0;
    }

    .header-actions {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .header-actions > a,
    .header-actions > form,
    .header-actions > form > button {
        width: 100%;
        min-width: 0;
    }

    .header-actions .header-link {
        min-height: 38px;
        justify-content: center;
        padding: 6px 4px;
        border-radius: 9px;
        font-size: 10px;
        line-height: 1.2;
        text-align: center;
    }

    .welcome-panel,
    .user-admin-welcome {
        min-height: 0;
        margin: 0;
        padding: 30px 4px 18px;
    }

    .welcome-panel::after {
        display: none;
    }

    .welcome-copy h1,
    .user-admin-welcome .welcome-copy h1 {
        margin: 12px 0 8px;
        font-size: clamp(27px, 8vw, 34px);
        line-height: 1.16;
    }

    .welcome-copy > p {
        font-size: 12px;
        line-height: 1.55;
    }

    .notice {
        gap: 9px;
        margin-top: 12px;
        padding: 11px 12px;
        border-radius: 10px;
        font-size: 12px;
    }

    .content-section {
        margin-top: 25px;
    }

    .section-heading {
        align-items: flex-start;
        gap: 9px;
        margin-bottom: 12px;
    }

    .section-heading h2 {
        font-size: 18px;
    }

    .section-heading p {
        font-size: 11px;
        line-height: 1.5;
    }

    .count-badge {
        padding: 7px 9px;
    }

    .form-card,
    .shortener-card,
    .announcement-form,
    .user-create-form {
        padding: 15px 12px;
        border-radius: 12px;
        box-shadow: none;
    }

    .form-grid,
    .announcement-fields,
    .advanced-fields,
    .user-form-grid,
    .admin-edit-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 13px;
    }

    .field-full {
        grid-column: auto;
    }

    .field input,
    .field textarea,
    .field select {
        min-height: 44px;
        font-size: 16px;
    }

    .field textarea {
        min-height: 100px;
    }

    .shortener-card .form-grid {
        gap: 13px;
    }

    .shortener-input-wrap input,
    .shortener-slug-input input {
        min-height: 46px;
        font-size: 16px;
    }

    .shortener-slug-input > span {
        padding: 0 8px;
        font-size: 10px;
    }

    .qr-logo-options {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 2px 2px 7px;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .qr-logo-option {
        flex: 0 0 58px;
    }

    .qr-logo-option-content {
        min-height: 66px;
    }

    .qr-logo-option-content strong {
        font-size: 8px;
    }

    .form-footer,
    .shortener-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-top: 13px;
    }

    .form-footer > p {
        font-size: 10px;
        line-height: 1.45;
    }

    .form-footer .button,
    .shortener-footer .button,
    .admin-action-row .button,
    .user-admin-actions .button {
        width: 100%;
        min-height: 42px;
    }

    .link-card {
        align-items: stretch;
        flex-direction: column;
        gap: 11px;
        margin-bottom: 10px;
        padding: 11px;
        border-radius: 12px;
        box-shadow: none;
    }

    .qr-preview {
        width: 100%;
        flex: 0 0 auto;
        flex-direction: row;
        gap: 10px;
        padding: 8px;
        border-radius: 10px;
        background: #f8f7fa;
    }

    .qr-preview img {
        width: 58px;
        height: 68px;
        flex: 0 0 58px;
        border-radius: 7px;
    }

    .qr-download {
        min-height: 40px;
        font-size: 11px;
    }

    .link-details {
        width: 100%;
    }

    .link-title-row {
        align-items: center;
        flex-direction: row;
        gap: 6px;
    }

    .link-domain {
        width: 100%;
    }

    .short-link {
        max-width: 100%;
        font-size: 14px;
    }

    .destination-link {
        max-width: 100%;
        margin-top: 7px;
    }

    .link-meta {
        flex-direction: column;
        gap: 5px;
        margin-top: 9px;
    }

    .admin-edit-form,
    .user-admin-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .user-admin-card {
        margin-bottom: 9px;
        padding: 13px;
        border-radius: 12px;
        box-shadow: none;
    }

    .user-card-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .user-card-status {
        justify-content: flex-start;
    }

    .pagination-wrap {
        max-width: 100%;
        overflow-x: auto;
    }

    .login-page,
    .centered-page {
        min-height: 100svh;
        padding: 12px;
        background: var(--canvas);
    }

    .login-card,
    .transit-card,
    .expired-card {
        width: 100%;
        padding: 20px 17px;
        border-radius: 15px;
        box-shadow: none;
    }

    .login-card {
        align-self: center;
    }

    .login-brand {
        margin-bottom: 13px;
    }

    .login-emblem {
        display: none;
    }

    .eyebrow {
        gap: 6px;
        padding: 6px 9px;
        font-size: 8px;
    }

    .login-card h1 {
        margin: 11px 0 8px;
        font-size: 25px;
        line-height: 1.2;
    }

    .login-description {
        margin-bottom: 15px;
        font-size: 11px;
        line-height: 1.55;
    }

    .account-form {
        gap: 10px;
    }

    .account-form .field input {
        min-height: 45px;
        font-size: 16px;
    }

    .account-submit {
        min-height: 46px;
        margin-top: 2px;
    }

    .account-switch,
    .login-privacy {
        margin-top: 12px;
    }

    .login-blessing {
        margin-top: 15px;
        padding-top: 11px;
    }

    .verification-logout {
        margin-top: 10px;
    }

    .transit-card h1,
    .expired-card h1 {
        font-size: 22px;
    }

    .transit-message {
        overflow-wrap: anywhere;
        padding: 12px;
    }

    .announcement-image img {
        max-height: 42svh;
    }

    .transit-button,
    .expired-button {
        min-height: 44px;
    }

    .site-footer {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        margin-top: 18px;
        padding: 12px 0;
        font-size: 9px;
    }

    .centered-footer {
        padding-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
