:root {
    --rrreg-bg: #f7f8fa;
    --rrreg-surface: #ffffff;
    --rrreg-surface-soft: #f9fafb;
    --rrreg-text: #111827;
    --rrreg-muted: #6b7280;
    --rrreg-line: #e5e7eb;
    --rrreg-line-strong: #d1d5db;
    --rrreg-accent: #111827;
    --rrreg-success: #027a48;
    --rrreg-success-bg: #ecfdf3;
    --rrreg-warning: #b54708;
    --rrreg-warning-bg: #fff7ed;
    --rrreg-danger: #b42318;
    --rrreg-danger-bg: #fef2f2;
    --rrreg-radius: 22px;
    --rrreg-radius-sm: 14px;
    --rrreg-shadow: 0 18px 50px rgba(17, 24, 39, .07);
}

.rrreg-webapp {
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
    background: var(--rrreg-bg);
    color: var(--rrreg-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.rrreg-webapp *,
.rrreg-webapp *::before,
.rrreg-webapp *::after {
    box-sizing: border-box;
}

.rrreg-screen { display: none; }
.rrreg-screen.is-active { display: block; animation: rrregFade .18s ease; }

@keyframes rrregFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rrreg-lang-switch {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.rrreg-lang-switch select,
.rrreg-lang-row a {
    border: 1px solid var(--rrreg-line);
    border-radius: 999px;
    background: var(--rrreg-surface);
    color: var(--rrreg-text);
    font-size: 13px;
    font-weight: 750;
}

.rrreg-lang-switch select {
    height: 38px;
    padding: 0 36px 0 14px;
}

.rrreg-loader-card,
.rrreg-hero,
.rrreg-success-card,
.rrreg-info-card,
.rrreg-profile-card,
.rrreg-payment-card {
    background: var(--rrreg-surface);
    border: 1px solid var(--rrreg-line);
    border-radius: var(--rrreg-radius);
    box-shadow: var(--rrreg-shadow);
}

.rrreg-loader-card,
.rrreg-success-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: 20vh;
    padding: 28px 24px;
    text-align: center;
}

.rrreg-hero,
.rrreg-info-card,
.rrreg-payment-card,
.rrreg-profile-card {
    padding: 22px;
}

.rrreg-hero {
    margin-bottom: 16px;
}

.rrreg-hero.compact {
    padding: 20px;
}

.rrreg-icon,
.rrreg-loader-icon,
.rrreg-success-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    background: var(--rrreg-surface-soft);
    font-size: 24px;
}

.rrreg-loader-card .rrreg-loader-icon,
.rrreg-success-card .rrreg-success-icon {
    margin-bottom: 2px;
}

.rrreg-hero h2,
.rrreg-loader-card h2,
.rrreg-success-card h2,
.rrreg-screen > h2 {
    margin: 0 0 8px;
    color: var(--rrreg-text);
    font-size: 25px;
    line-height: 1.15;
    font-weight: 820;
    letter-spacing: -.02em;
}

.rrreg-hero p,
.rrreg-loader-card p,
.rrreg-success-card p,
.rrreg-muted,
.rrreg-info-card,
.rrreg-note {
    color: var(--rrreg-muted);
    line-height: 1.55;
}

.rrreg-muted { margin: 0 0 14px; }

.rrreg-list {
    display: grid;
    gap: 12px;
}

.rrreg-item {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 17px;
    background: var(--rrreg-surface);
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(17, 24, 39, .045);
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.rrreg-item::after {
    content: '›';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 24px;
    line-height: 1;
}

.rrreg-item:hover,
.rrreg-item:focus-visible {
    border-color: var(--rrreg-accent);
    box-shadow: 0 14px 34px rgba(17, 24, 39, .08);
    transform: translateY(-1px);
}

.rrreg-item strong {
    display: block;
    padding-right: 24px;
    color: var(--rrreg-text);
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
}

.rrreg-price {
    margin-top: 3px;
    color: var(--rrreg-text);
    font-size: 18px;
    font-weight: 850;
}

.rrreg-back,
.rrreg-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rrreg-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.rrreg-back:hover,
.rrreg-link:hover { color: var(--rrreg-text); }
.rrreg-back.mini { width: 40px; height: 40px; justify-content: center; border: 1px solid var(--rrreg-line); border-radius: 14px; background: #fff; font-size: 20px; }

.rrreg-form {
    display: grid;
    gap: 12px;
}

.rrreg-form label {
    display: grid;
    gap: 7px;
    color: var(--rrreg-muted);
    font-size: 13px;
    font-weight: 780;
}

.rrreg-form input,
.rrreg-form select,
.rrreg-payment-card input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--rrreg-line-strong);
    border-radius: var(--rrreg-radius-sm);
    background: var(--rrreg-surface);
    color: var(--rrreg-text);
    padding: 0 14px;
    font-size: 15px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.rrreg-form select,
.rrreg-lang-switch select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%), linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.rrreg-form input:focus,
.rrreg-form select:focus,
.rrreg-payment-card input:focus,
.rrreg-lang-switch select:focus {
    border-color: var(--rrreg-accent);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, .08);
    outline: 0;
}

.rrreg-student-fields {
    display: grid;
    gap: 12px;
}

.rrreg-student-fields[hidden] {
    display: none !important;
}

.rrreg-primary,
.rrreg-scan-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    background: var(--rrreg-accent);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 850;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.rrreg-primary:hover,
.rrreg-scan-button:hover { background: #000; transform: translateY(-1px); }
.rrreg-primary:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.rrreg-payment-card {
    display: grid;
    gap: 12px;
}

.rrreg-payment-card p { margin: 0; color: var(--rrreg-muted); line-height: 1.5; }

.rrreg-appbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    margin-bottom: 10px;
}

.rrreg-appbar strong {
    color: var(--rrreg-text);
    font-size: 20px;
    font-weight: 850;
}

.rrreg-burger {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--rrreg-line);
    border-radius: 14px;
    background: var(--rrreg-surface);
    color: var(--rrreg-text);
    cursor: pointer;
    font-size: 20px;
}

.rrreg-menu {
    display: none;
    gap: 4px;
    margin: 0 0 14px;
    padding: 8px;
    background: var(--rrreg-surface);
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    box-shadow: var(--rrreg-shadow);
}

.rrreg-menu.is-open { display: grid; }

.rrreg-menu button {
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--rrreg-text);
    cursor: pointer;
    text-align: left;
    font-weight: 780;
}

.rrreg-menu button:hover { background: var(--rrreg-surface-soft); }

.rrreg-profile-card { padding: 20px; }

.rrreg-profile-top {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

.rrreg-profile-avatar {
    position: relative;
    width: 74px;
    height: 74px;
    border: 1px solid var(--rrreg-line);
    border-radius: 24px;
    background: var(--rrreg-surface-soft);
    color: var(--rrreg-text);
    cursor: pointer;
    font-size: 24px;
    font-weight: 850;
}

.rrreg-profile-avatar span {
    position: absolute;
    right: -4px;
    bottom: -4px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--rrreg-line);
    border-radius: 50%;
    background: var(--rrreg-surface);
    color: var(--rrreg-muted);
    font-size: 13px;
}

.rrreg-profile h2 {
    margin: 0 0 8px;
    color: var(--rrreg-text);
    font-size: 23px;
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -.02em;
}

.rrreg-status,
.rrreg-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 850;
}

.rrreg-status.is-paid,
.rrreg-badge { background: var(--rrreg-success-bg); color: var(--rrreg-success); }
.rrreg-status.is-pending { background: var(--rrreg-warning-bg); color: var(--rrreg-warning); }
.rrreg-status.is-cancelled { background: var(--rrreg-danger-bg); color: var(--rrreg-danger); }

.rrreg-profile-grid {
    display: grid;
    gap: 10px;
    margin: 12px 0;
}

.rrreg-profile-field {
    position: relative;
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    background: var(--rrreg-surface-soft);
    border: 1px solid #eef0f3;
    border-radius: 16px;
}

.rrreg-profile-field span {
    color: var(--rrreg-muted);
    font-size: 12px;
    font-weight: 800;
}

.rrreg-profile-field strong {
    color: var(--rrreg-text);
    font-size: 15px;
    line-height: 1.35;
}

.rrreg-profile-field.editable { padding-right: 54px; }

.rrreg-profile-field.editable button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--rrreg-line);
    border-radius: 12px;
    background: var(--rrreg-surface);
    cursor: pointer;
}

.rrreg-event-card {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    background: var(--rrreg-surface-soft);
}

.rrreg-event-card span {
    color: var(--rrreg-muted);
    font-size: 12px;
    font-weight: 800;
}

.rrreg-event-card strong { font-size: 18px; }
.rrreg-event-card small { color: var(--rrreg-muted); }

.rrreg-info-card {
    line-height: 1.65;
}

.rrreg-info-card h3 { margin-top: 0; color: var(--rrreg-text); }

.rrreg-success-qr {
    display: grid;
    place-items: center;
    gap: 10px;
    margin: 14px 0;
}

.rrreg-success-qr img {
    width: 206px;
    height: 206px;
    padding: 10px;
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    background: #fff;
}

.rrreg-success-ticket {
    display: grid;
    gap: 4px;
    color: var(--rrreg-text);
}

.rrreg-success-ticket span {
    color: var(--rrreg-muted);
    font-size: 13px;
}

.rrreg-ticket-card {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    background: var(--rrreg-surface-soft);
}

.rrreg-ticket-card > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rrreg-ticket-card > div:first-child span {
    color: var(--rrreg-muted);
    font-size: 12px;
    font-weight: 800;
}

.rrreg-ticket-card > div:first-child strong { font-size: 14px; }

.rrreg-ticket-card img {
    justify-self: center;
    width: 166px;
    height: 166px;
    padding: 8px;
    border: 1px solid var(--rrreg-line);
    border-radius: 16px;
    background: #fff;
}

.rrreg-ticket-meta {
    display: flex;
    justify-content: center;
    color: var(--rrreg-muted);
    font-size: 14px;
}

.rrreg-ticket-meta strong { color: var(--rrreg-text); }

.rrreg-error,
.rrreg-success {
    margin: 10px 0;
    padding: 11px 13px;
    border-radius: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.rrreg-error { background: var(--rrreg-danger-bg); color: var(--rrreg-danger); border: 1px solid #fecdd3; }
.rrreg-success { background: var(--rrreg-success-bg); color: var(--rrreg-success); border: 1px solid #abefc6; }

.rrreg-webapp[data-lang='ru'] .rrreg-profile h2,
.rrreg-webapp[data-lang='en'] .rrreg-profile h2 { font-size: 21px; }

@media (max-width: 420px) {
    .rrreg-webapp { padding: 12px; }
    .rrreg-hero h2,
    .rrreg-loader-card h2,
    .rrreg-success-card h2,
    .rrreg-screen > h2 { font-size: 23px; }
    .rrreg-loader-card,
    .rrreg-success-card { padding: 24px 18px; }
    .rrreg-success-qr img { width: 186px; height: 186px; }
    .rrreg-ticket-card img { width: 148px; height: 148px; }
    .rrreg-ticket-card > div:first-child { display: grid; }
    .rrreg-webapp[data-lang='ru'] .rrreg-profile h2,
    .rrreg-webapp[data-lang='en'] .rrreg-profile h2 { font-size: 19px; }
}

/* v0.5.3 — Modern WebApp visual refresh */
.rrreg-webapp {
    --rrreg-bg: #f4f7fb;
    --rrreg-surface: #ffffff;
    --rrreg-surface-soft: #f8fafc;
    --rrreg-text: #172033;
    --rrreg-muted: #64748b;
    --rrreg-line: #e6ebf2;
    --rrreg-line-strong: #d8dee8;
    --rrreg-accent: #1f6feb;
    --rrreg-accent-soft: #eef6ff;
    --rrreg-classic-border: #d8d3cc;
    --rrreg-classic-bg: #fffdf9;
    --rrreg-shadow: 0 20px 60px rgba(15, 23, 42, .08);
    --rrreg-shadow-soft: 0 10px 28px rgba(15, 23, 42, .055);
    max-width: 500px;
    padding: 16px;
    background:
        radial-gradient(circle at 12% 0%, rgba(31, 111, 235, .10), transparent 34%),
        radial-gradient(circle at 92% 12%, rgba(14, 165, 233, .09), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f4f7fb 52%, #eef3f9 100%);
}

.rrreg-lang-switch {
    margin-bottom: 14px;
}

.rrreg-lang-switch select,
.rrreg-lang-row a {
    border-color: rgba(216, 222, 232, .95);
    background-color: rgba(255, 255, 255, .86);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
    font-weight: 500;
}

.rrreg-loader-card,
.rrreg-hero,
.rrreg-success-card,
.rrreg-info-card,
.rrreg-profile-card,
.rrreg-payment-card {
    border-color: rgba(230, 235, 242, .96);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--rrreg-shadow);
    backdrop-filter: blur(12px);
}

.rrreg-hero,
.rrreg-info-card,
.rrreg-payment-card,
.rrreg-profile-card {
    padding: 24px;
}

.rrreg-hero {
    overflow: hidden;
    position: relative;
}

.rrreg-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, rgba(31, 111, 235, .55), rgba(14, 165, 233, .18), transparent);
}

.rrreg-icon,
.rrreg-loader-icon,
.rrreg-success-icon {
    width: 50px;
    height: 50px;
    border-color: #e7eef8;
    background: linear-gradient(180deg, #ffffff, #f5f9ff);
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, .04), 0 10px 22px rgba(15, 23, 42, .045);
}

.rrreg-hero h2,
.rrreg-loader-card h2,
.rrreg-success-card h2,
.rrreg-screen > h2,
.rrreg-profile h2,
.rrreg-info-card h3 {
    color: #172033;
    font-weight: 500;
    letter-spacing: -.012em;
}

.rrreg-hero p,
.rrreg-loader-card p,
.rrreg-success-card p,
.rrreg-muted,
.rrreg-info-card,
.rrreg-note {
    color: #64748b;
}

.rrreg-form {
    gap: 13px;
}

.rrreg-screen[data-screen='login'] .rrreg-form,
.rrreg-screen[data-screen='code'] .rrreg-form,
.rrreg-screen[data-screen='form'] .rrreg-form {
    padding: 16px;
    border: 1px solid rgba(230, 235, 242, .96);
    border-radius: 22px;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--rrreg-shadow-soft);
}

.rrreg-form label {
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.rrreg-form label span {
    padding-left: 2px;
}

.rrreg-form input,
.rrreg-form select,
.rrreg-payment-card input {
    min-height: 52px;
    height: 52px;
    border: 1px solid var(--rrreg-classic-border);
    border-radius: 13px;
    background-color: var(--rrreg-classic-bg);
    color: #172033;
    padding: 0 15px;
    font-size: 15px;
    font-weight: 400;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(15, 23, 42, .025);
}

.rrreg-form input::placeholder,
.rrreg-payment-card input::placeholder {
    color: #8b96a8;
    font-weight: 400;
}

.rrreg-form select,
.rrreg-lang-switch select {
    background-image:
        linear-gradient(45deg, transparent 50%, #7b8797 50%),
        linear-gradient(135deg, #7b8797 50%, transparent 50%);
    background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px;
}

.rrreg-form input:hover,
.rrreg-form select:hover,
.rrreg-payment-card input:hover {
    border-color: #c9c2b8;
}

.rrreg-form input:focus,
.rrreg-form select:focus,
.rrreg-payment-card input:focus,
.rrreg-lang-switch select:focus {
    border-color: #93c5fd;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, .23), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.rrreg-student-fields {
    gap: 13px;
}

.rrreg-primary,
.rrreg-scan-button {
    min-height: 52px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2b7cff, #1f6feb);
    box-shadow: 0 12px 24px rgba(31, 111, 235, .22);
    font-weight: 550;
    letter-spacing: .01em;
}

.rrreg-primary:hover,
.rrreg-scan-button:hover {
    background: linear-gradient(180deg, #1f6feb, #1659c7);
    box-shadow: 0 14px 26px rgba(31, 111, 235, .28);
}

.rrreg-back,
.rrreg-link {
    color: #64748b;
    font-weight: 500;
}

.rrreg-back.mini,
.rrreg-burger {
    border-color: rgba(216, 222, 232, .95);
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

.rrreg-list {
    gap: 13px;
}

.rrreg-item {
    border-color: rgba(230, 235, 242, .96);
    background: rgba(255, 255, 255, .9);
    border-radius: 20px;
    box-shadow: var(--rrreg-shadow-soft);
}

.rrreg-item:hover,
.rrreg-item:focus-visible {
    border-color: #bfdbfe;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

.rrreg-item strong,
.rrreg-appbar strong,
.rrreg-profile-field strong,
.rrreg-event-card strong,
.rrreg-ticket-card > div:first-child strong,
.rrreg-ticket-meta strong,
.rrreg-success-ticket strong,
.rrreg-info-card strong {
    font-weight: 500;
}

.rrreg-price {
    color: #1f6feb;
    font-weight: 500;
}

.rrreg-menu {
    border-color: rgba(230, 235, 242, .96);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--rrreg-shadow);
}

.rrreg-menu button {
    font-weight: 500;
}

.rrreg-menu button:hover {
    background: #f1f7ff;
}

.rrreg-profile-card,
.rrreg-payment-card,
.rrreg-info-card {
    border-radius: 24px;
}

.rrreg-profile-avatar {
    border-color: #e7eef8;
    background: linear-gradient(180deg, #ffffff, #f5f9ff);
    color: #1f6feb;
    font-weight: 500;
}

.rrreg-profile-field,
.rrreg-event-card,
.rrreg-ticket-card {
    border-color: #e7edf5;
    background: #f9fbfe;
}

.rrreg-profile-field span,
.rrreg-event-card span,
.rrreg-ticket-card > div:first-child span,
.rrreg-status,
.rrreg-badge,
.rrreg-error,
.rrreg-success {
    font-weight: 500;
}

.rrreg-success-qr img,
.rrreg-ticket-card img {
    border-color: #e7edf5;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

@media (max-width: 420px) {
    .rrreg-webapp {
        padding: 12px;
    }

    .rrreg-screen[data-screen='login'] .rrreg-form,
    .rrreg-screen[data-screen='code'] .rrreg-form,
    .rrreg-screen[data-screen='form'] .rrreg-form {
        padding: 13px;
    }

    .rrreg-hero,
    .rrreg-info-card,
    .rrreg-payment-card,
    .rrreg-profile-card {
        padding: 20px;
    }
}

/* v0.5.4 — Refined compact WebApp system */
.rrreg-webapp {
    --rrreg-bg: #f6f8fb;
    --rrreg-surface: #ffffff;
    --rrreg-surface-soft: #fafbfc;
    --rrreg-text: #182235;
    --rrreg-muted: #6b7788;
    --rrreg-line: #e7ebf0;
    --rrreg-line-strong: #d7dce3;
    --rrreg-accent: #2563eb;
    --rrreg-accent-soft: #edf5ff;
    --rrreg-classic-border: #d7d0c7;
    --rrreg-classic-bg: #fffefb;
    --rrreg-radius: 18px;
    --rrreg-radius-sm: 12px;
    --rrreg-shadow: 0 14px 38px rgba(15, 23, 42, .065);
    --rrreg-shadow-soft: 0 7px 20px rgba(15, 23, 42, .045);
    max-width: 480px;
    padding: 14px;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, .07), transparent 32%),
        linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 58%, #f1f5f9 100%);
}

.rrreg-screen.is-active {
    animation: rrregFade .16s ease;
}

.rrreg-lang-switch {
    margin-bottom: 10px;
}

.rrreg-lang-switch select {
    height: 34px;
    padding-left: 12px;
    font-size: 12px;
}

.rrreg-loader-card,
.rrreg-hero,
.rrreg-success-card,
.rrreg-info-card,
.rrreg-profile-card,
.rrreg-payment-card {
    border-color: rgba(231, 235, 240, .98);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--rrreg-shadow);
}

.rrreg-hero,
.rrreg-info-card,
.rrreg-payment-card,
.rrreg-profile-card {
    padding: 18px;
}

.rrreg-hero.compact {
    padding: 17px;
}

.rrreg-hero {
    margin-bottom: 12px;
}

.rrreg-icon,
.rrreg-loader-icon,
.rrreg-success-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 14px;
    font-size: 20px;
    box-shadow: none;
}

.rrreg-hero h2,
.rrreg-loader-card h2,
.rrreg-success-card h2,
.rrreg-screen > h2,
.rrreg-profile h2,
.rrreg-info-card h3,
.rrreg-appbar strong {
    font-weight: 480;
    letter-spacing: -.008em;
}

.rrreg-hero h2,
.rrreg-loader-card h2,
.rrreg-success-card h2,
.rrreg-screen > h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.rrreg-hero p,
.rrreg-muted,
.rrreg-info-card,
.rrreg-note {
    font-size: 14px;
    line-height: 1.5;
}

.rrreg-list {
    gap: 8px;
}

.rrreg-item {
    gap: 5px;
    min-height: auto;
    padding: 12px 38px 12px 13px;
    border-radius: 15px;
    border-color: #e7ebf0;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 5px 14px rgba(15, 23, 42, .035);
    transform: none;
}

.rrreg-item::after {
    right: 13px;
    font-size: 20px;
    color: #a4afbd;
}

.rrreg-item:hover,
.rrreg-item:focus-visible {
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
    transform: translateY(-1px);
}

.rrreg-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.rrreg-item-head strong,
.rrreg-item strong {
    padding-right: 0;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 480;
}

.rrreg-item-head span {
    flex: 0 0 auto;
    padding: 2px 7px;
    border: 1px solid #e7ebf0;
    border-radius: 999px;
    background: #f8fafc;
    color: #7a8696;
    font-size: 11px;
    font-weight: 400;
}

.rrreg-item-meta,
.rrreg-item-desc,
.rrreg-item .rrreg-muted {
    color: var(--rrreg-muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.rrreg-item-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rrreg-distance-card {
    padding-top: 13px;
    padding-bottom: 13px;
}

.rrreg-price {
    margin-top: 1px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 480;
}

.rrreg-screen[data-screen='login'] .rrreg-form,
.rrreg-screen[data-screen='code'] .rrreg-form,
.rrreg-screen[data-screen='form'] .rrreg-form {
    gap: 10px;
    padding: 13px;
    border: 1px solid #e8ecef;
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.rrreg-form,
.rrreg-student-fields {
    gap: 10px;
}

.rrreg-form label {
    gap: 6px;
    font-size: 12.5px;
    font-weight: 430;
}

.rrreg-form input,
.rrreg-form select,
.rrreg-payment-card input {
    min-height: 46px;
    height: 46px;
    border: 1px solid var(--rrreg-classic-border);
    border-radius: 11px;
    background-color: var(--rrreg-classic-bg);
    padding: 0 13px;
    font-size: 14px;
    font-weight: 400;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.rrreg-form select,
.rrreg-lang-switch select {
    background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
}

.rrreg-form input:hover,
.rrreg-form select:hover,
.rrreg-payment-card input:hover {
    border-color: #c8c1b8;
}

.rrreg-form input:focus,
.rrreg-form select:focus,
.rrreg-payment-card input:focus,
.rrreg-lang-switch select:focus {
    border-color: #8bbdf8;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, .18), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.rrreg-university-search {
    background-image: linear-gradient(transparent, transparent);
}

.rrreg-primary,
.rrreg-scan-button {
    min-height: 48px;
    border-radius: 13px;
    background: linear-gradient(180deg, #2f73ee, #2563eb);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
    font-size: 15px;
    font-weight: 500;
}

.rrreg-primary:hover,
.rrreg-scan-button:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, .22);
}

.rrreg-back,
.rrreg-link,
.rrreg-menu button,
.rrreg-status,
.rrreg-badge,
.rrreg-profile-field span,
.rrreg-event-card span,
.rrreg-ticket-card > div:first-child span {
    font-weight: 430;
}

.rrreg-profile-top {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.rrreg-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    font-size: 21px;
}

.rrreg-profile-avatar span {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.rrreg-profile h2 {
    font-size: 20px;
}

.rrreg-profile-grid {
    gap: 8px;
}

.rrreg-profile-field {
    padding: 11px 12px;
    border-radius: 13px;
    background: #fbfcfd;
}

.rrreg-profile-field strong,
.rrreg-event-card strong,
.rrreg-ticket-card > div:first-child strong,
.rrreg-ticket-meta strong,
.rrreg-success-ticket strong,
.rrreg-info-card strong {
    font-weight: 480;
}

.rrreg-event-card,
.rrreg-ticket-card {
    padding: 12px;
    border-radius: 15px;
    background: #fbfcfd;
}

.rrreg-event-card strong {
    font-size: 15.5px;
}

.rrreg-event-card small {
    font-size: 12.5px;
}

.rrreg-ticket-card img {
    width: 146px;
    height: 146px;
}

.rrreg-success-qr img {
    width: 176px;
    height: 176px;
}

.rrreg-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 9999;
    max-width: min(420px, calc(100vw - 28px));
    padding: 11px 14px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    color: #182235;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .13);
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    font-size: 13px;
    line-height: 1.4;
}

.rrreg-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rrreg-toast.is-error {
    border-color: #fecdd3;
    color: #991b1b;
}

.rrreg-toast.is-success {
    border-color: #bbf7d0;
    color: #166534;
}

.rrreg-skeleton::after {
    display: none;
}

.rrreg-skeleton strong,
.rrreg-skeleton div {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f6, #f8fafc, #eef2f6);
    background-size: 180% 100%;
    animation: rrregSkeleton 1.1s ease-in-out infinite;
}

.rrreg-skeleton strong {
    width: 70%;
}

.rrreg-skeleton div:nth-child(2) {
    width: 45%;
}

.rrreg-skeleton div:nth-child(3) {
    width: 84%;
}

@keyframes rrregSkeleton {
    0% { background-position: 0 50%; }
    100% { background-position: 180% 50%; }
}

@media (max-width: 420px) {
    .rrreg-webapp {
        padding: 10px;
    }

    .rrreg-hero,
    .rrreg-info-card,
    .rrreg-payment-card,
    .rrreg-profile-card {
        padding: 16px;
    }

    .rrreg-hero h2,
    .rrreg-loader-card h2,
    .rrreg-success-card h2,
    .rrreg-screen > h2 {
        font-size: 21px;
    }

    .rrreg-item {
        padding: 11px 36px 11px 12px;
        border-radius: 14px;
    }

    .rrreg-item-head strong,
    .rrreg-item strong {
        font-size: 14.5px;
    }

    .rrreg-form input,
    .rrreg-form select,
    .rrreg-payment-card input {
        min-height: 45px;
        height: 45px;
    }
}

/* Profile refinement and professional email-phase UI polish */
.rrreg-profile-modern {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.rrreg-profile-modern .rrreg-profile-top {
    margin-bottom: 2px;
    padding: 12px;
    border: 1px solid #e8eef6;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.rrreg-profile-heading p {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 430;
    letter-spacing: .02em;
}

.rrreg-profile-modern .rrreg-profile-heading h2 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 520;
    letter-spacing: -.01em;
}

.rrreg-profile-section {
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid #e8eef6;
    border-radius: 17px;
    background: #ffffff;
}

.rrreg-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 13px;
}

.rrreg-section-title strong {
    font-size: 13px;
    font-weight: 500;
}

.rrreg-profile-event-line {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    background: #f8fbff;
}

.rrreg-profile-event-line strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 520;
    line-height: 1.35;
}

.rrreg-profile-event-line span {
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.4;
}

.rrreg-profile-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rrreg-profile-row {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #eef2f7;
    border-radius: 13px;
    background: #fbfdff;
}

.rrreg-profile-row span {
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.25;
    font-weight: 430;
}

.rrreg-profile-row strong {
    overflow-wrap: anywhere;
    color: #0f172a;
    font-size: 13.5px;
    line-height: 1.35;
    font-weight: 470;
}

.rrreg-profile-row.editable {
    padding-right: 46px;
}

.rrreg-profile-row.editable button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
}

.rrreg-ticket-muted p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.rrreg-profile-modern .rrreg-status,
.rrreg-profile-modern .rrreg-badge {
    font-weight: 480;
}

@media (max-width: 420px) {
    .rrreg-profile-modern {
        padding: 13px;
        gap: 10px;
    }

    .rrreg-profile-mini-grid {
        grid-template-columns: 1fr;
    }

    .rrreg-profile-section {
        padding: 12px;
        border-radius: 15px;
    }
}

.rrreg-qr-screen {
    display: grid;
    gap: 12px;
    text-align: left;
}

.rrreg-qr-screen .rrreg-ticket-card {
    margin-top: 0;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.rrreg-qr-screen .rrreg-ticket-card img {
    width: 190px;
    height: 190px;
    border-radius: 16px;
}

/* Digital QR ticket */
.rrreg-digital-ticket {
  width: min(100%, 390px);
  margin: 4px auto 0;
  padding: 26px 22px 22px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 58, 237, .07), transparent 28%),
    radial-gradient(circle at 90% 92%, rgba(14, 165, 233, .05), transparent 30%),
    #ffffff;
  box-shadow: 0 22px 70px rgba(15, 23, 42, .09);
  color: var(--rrreg-text);
  text-align: center;
}
.rrreg-digital-ticket-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rrreg-ticket-brand-logo {
  display: block;
  width: min(38vw, 132px);
  max-height: 112px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.rrreg-carawa-mark {
  width: 58px;
  height: 42px;
  display: block;
  border-radius: 18px 22px 20px 10px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 46%, #c4b5fd 100%);
  clip-path: polygon(18% 100%, 49% 9%, 82% 100%, 64% 100%, 49% 55%, 34% 100%);
  filter: drop-shadow(0 12px 18px rgba(109, 40, 217, .18));
}
.rrreg-digital-ticket-brand strong {
  font-size: 23px;
  line-height: 1;
  letter-spacing: .36em;
  padding-left: .36em;
  font-weight: 520;
  color: #0f172a;
}
.rrreg-digital-ticket-divider { display: none; }
.rrreg-digital-ticket h2 {
  margin: 0 0 20px;
  color: #0f172a;
  font-size: clamp(23px, 6.8vw, 32px);
  line-height: 1.14;
  letter-spacing: -.035em;
  font-weight: 540;
}
.rrreg-digital-ticket-qr {
  width: min(74vw, 252px);
  height: min(74vw, 252px);
  margin: 18px auto 18px;
  padding: 10px;
  border-radius: 22px;
  background: #ffffff;
}
.rrreg-digital-ticket-qr img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border: 0;
  border-radius: 12px;
  padding: 0;
  background: #fff;
}
.rrreg-ticket-info-list {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
  text-align: left;
}
.rrreg-ticket-info-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #e5e7eb;
}
.rrreg-ticket-info-row:first-child { border-top: 0; }
.rrreg-ticket-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(124, 58, 237, .09);
  border-radius: 16px;
  background: #f7f3ff;
  color: #6d28d9;
  font-size: 21px;
  font-weight: 400;
}
.rrreg-ticket-info-row small,
.rrreg-ticket-bottom-card small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 420;
}
.rrreg-ticket-info-row strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 470;
}
.rrreg-ticket-bottom-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .06);
}
.rrreg-ticket-bottom-card > div {
  padding: 16px 10px;
  text-align: center;
}
.rrreg-ticket-bottom-card > div + div { border-left: 1px solid #e5e7eb; }
.rrreg-ticket-bottom-card strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 520;
  letter-spacing: -.03em;
}
.rrreg-ticket-footnote { display: none; }
@media (max-width: 390px) {
  .rrreg-digital-ticket { padding: 22px 16px 18px; border-radius: 26px; }
  .rrreg-ticket-info-row { grid-template-columns: 50px 1fr; gap: 12px; }
  .rrreg-ticket-icon { width: 46px; height: 46px; border-radius: 16px; }
  .rrreg-ticket-info-row strong { font-size: 16px; }
  .rrreg-ticket-bottom-card strong { font-size: 17px; }
}


/* Profile shortcut near language selector */
.rrreg-lang-switch {
  align-items: center;
  gap: 8px;
}
.rrreg-profile-shortcut {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--rrreg-line);
  border-radius: 999px;
  background: var(--rrreg-surface);
  color: var(--rrreg-text);
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 10px 28px rgba(15,23,42,.05);
}
.rrreg-profile-shortcut[hidden] { display: none !important; }
.rrreg-profile-shortcut:active { transform: translateY(1px); }

.rrreg-home-actions{display:grid;gap:12px;margin:14px 0 8px}.rrreg-secondary-action{width:100%;min-height:48px;border:1px solid #dbe3ef;border-radius:16px;background:#fff;color:#0f172a;font-weight:650;box-shadow:0 10px 24px rgba(15,23,42,.06)}.rrreg-home-note{text-align:center;font-size:13px;line-height:1.5}.rrreg-profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}.rrreg-profile-shortcut{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;min-height:34px;padding:0 12px;border:1px solid #dbe3ef;border-radius:999px;background:#fff;color:#0f172a;font-size:13px;font-weight:650;box-shadow:0 8px 18px rgba(15,23,42,.05)}
