:root {
    color-scheme: light;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bg-top: #fff7e8;
    --bg: #f6f1e8;
    --bg-accent: #efe7d9;
    --surface: #ffffff;
    --surface-subtle: #fdfbf8;
    --surface-muted: #f4f1ea;
    --surface-soft: #f6efe4;
    --surface-soft-2: #f8f3ea;
    --ink: #1c1b19;
    --muted: #6f6a63;
    --accent: #2b67ff;
    --accent-dark: #1f4ed1;
    --accent-soft: rgba(43, 103, 255, 0.12);
    --border: #e5ddcf;
    --border-soft: #efe4d4;
    --border-strong: #d8cdbb;
    --border-panel: #e8dcc8;
    --input-bg: #fbf9f6;
    --notice-bg: #f4f1ea;
    --nav-surface: rgba(255, 255, 255, 0.9);
    --dropdown-surface: #ffffff;
    --icon-surface: #ffffff;
    --hero-surface: linear-gradient(130deg, #ffffff, var(--bg-accent));
    --sheet-backdrop: rgba(18, 15, 10, 0.35);
    --ai-progress-bg: #eef4ff;
    --ai-progress-border: #d6e4ff;
    --pill-real-bg: #f4f1ea;
    --pill-real-ink: #6a6054;
    --pill-virtual-bg: #eef4ff;
    --pill-virtual-ink: #2b67ff;
    --role-bg: rgba(212, 166, 70, 0.16);
    --role-ink: #7a5a13;
    --error: #b0362f;
    --hero-action-surface: #ffffff;
    --hero-action-border: #d8cdbb;
    --tool-border: #efe4d4;
    --map-border: #e0d5c5;
    --loading-ring: #e0e0e0;
    --settled: #2f9e4f;
    --active: #ff6b35;
    --shadow: 0 18px 45px rgba(25, 20, 15, 0.12);
    --shadow-soft: 0 8px 16px rgba(23, 18, 12, 0.12);
    --shadow-float: 0 18px 40px rgba(20, 16, 12, 0.16);
    --radius: 18px;
    --radius-lg: 26px;
    --content: 1100px;
}

.app-shell[data-theme="dark"] {
    color-scheme: dark;
    --bg-top: #1c2433;
    --bg: #111722;
    --bg-accent: #1a2331;
    --surface: #18202d;
    --surface-subtle: #1c2634;
    --surface-muted: #202b3a;
    --surface-soft: #223041;
    --surface-soft-2: #202c3d;
    --ink: #f5f1ea;
    --muted: #aab4c3;
    --accent: #7aa2ff;
    --accent-dark: #5f8ef7;
    --accent-soft: rgba(122, 162, 255, 0.18);
    --border: #344256;
    --border-soft: #3a475c;
    --border-strong: #506079;
    --border-panel: #46566c;
    --input-bg: #101722;
    --notice-bg: #202b3a;
    --nav-surface: rgba(17, 23, 34, 0.9);
    --dropdown-surface: #18202d;
    --icon-surface: #1c2634;
    --hero-surface: linear-gradient(130deg, #18202d, var(--bg-accent));
    --sheet-backdrop: rgba(3, 5, 10, 0.62);
    --ai-progress-bg: #162338;
    --ai-progress-border: #2c4466;
    --pill-real-bg: #253141;
    --pill-real-ink: #c7cfdb;
    --pill-virtual-bg: #19325e;
    --pill-virtual-ink: #9ec0ff;
    --role-bg: rgba(212, 166, 70, 0.2);
    --role-ink: #f0d28a;
    --error: #ff8e84;
    --hero-action-surface: #1c2634;
    --hero-action-border: #506079;
    --tool-border: #3a475c;
    --map-border: #506079;
    --loading-ring: #46566c;
    --settled: #61cf7d;
    --active: #ff8a5b;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Avenir Next", "Optima", "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at top, var(--bg-top), var(--bg) 65%);
    min-height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    color: var(--ink);
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: calc(0.7rem + var(--safe-top)) clamp(1.5rem, 3vw, 3rem) 0.9rem;
    background: var(--nav-surface);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.nav-brand-text {
    white-space: nowrap;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    color: var(--muted);
    align-items: center;
}

.nav-links-desktop {
    flex: 1 1 auto;
    justify-content: center;
}

.nav-links a {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-group {
    position: relative;
}

.nav-trigger {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
}

.nav-trigger:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.nav-dropdown {
    position: absolute;
    top: 44px;
    left: 0;
    min-width: 220px;
    background: var(--dropdown-surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-float);
    color: var(--ink);
    padding: 0.5rem;
    display: grid;
    gap: 0.35rem;
    z-index: 30;
}

.dropdown-empty {
    padding: 0.4rem 0.6rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.dropdown-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.nav-highlight {
    background: var(--accent-soft);
    color: var(--ink);
    font-weight: 700;
}

.nav-links a:hover {
    background: var(--accent-soft);
    color: var(--ink);
}

.user-menu {
    position: relative;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    cursor: default;
    z-index: 10;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--icon-surface);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.icon-button:not(:disabled):hover {
    transform: translateY(-1px);
    background: var(--surface-subtle);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
}

.user-badge {
    position: relative;
    overflow: visible;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.admin-badge {
    border: 2px solid #d4a646;
    box-shadow: 0 0 0 3px rgba(212, 166, 70, 0.16), 0 8px 16px rgba(23, 18, 12, 0.12);
}

.admin-shield {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(180deg, #f3d78b, #d4a646);
    border: 1px solid #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 12px rgba(56, 40, 12, 0.18);
}

.admin-shield svg {
    width: 11px;
    height: 11px;
    fill: #5b430d;
}

.dropdown {
    position: absolute;
    right: 0;
    top: 52px;
    background: var(--dropdown-surface);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: var(--shadow-float);
    min-width: 180px;
    padding: 0.5rem;
    display: grid;
    gap: 0.35rem;
    z-index: 30;
}

.dropdown-header {
    font-size: 0.85rem;
    color: var(--muted);
    padding: 0.4rem 0.6rem;
}

.dropdown-name {
    font-weight: 700;
    padding: 0.45rem 0.6rem 0.1rem;
}

.dropdown-role {
    margin: 0 0.6rem 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: var(--role-bg);
    color: var(--role-ink);
    font-size: 0.76rem;
    font-weight: 700;
    width: fit-content;
}

.dropdown-item {
    background: none;
    border: none;
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.dropdown-item:hover {
    transform: translateY(-1px);
    background: var(--accent-soft);
}

.app-main {
    min-height: calc(100vh - 64px);
    display: flex;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem);
}

.mobile-tabbar {
    display: none;
}

.app {
    width: min(var(--content), 100%);
}

.auth-shell {
    min-height: min(92vh, 900px);
    display: grid;
    place-items: center;
}

.splash-screen {
    min-height: min(92vh, 900px);
    display: grid;
    place-items: center;
}

.splash-card {
    display: grid;
    gap: 0.75rem;
    place-items: center;
    text-align: center;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    box-shadow: var(--shadow);
}

.splash-card p {
    margin: 0;
    color: var(--muted);
}

.auth-card {
    width: min(520px, 100%);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 3rem);
    box-shadow: var(--shadow);
    display: grid;
    gap: 1.5rem;
}

.brand-block {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 12px 20px rgba(15, 12, 8, 0.2);
}

h1 {
    margin: 0 0 0.25rem 0;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

h2 {
    margin: 0;
    font-size: 1.1rem;
}

.tagline {
    margin: 0;
    color: var(--muted);
}

.auth-panel {
    display: grid;
    gap: 1rem;
}

.quick-login {
    display: grid;
    gap: 0.5rem;
}

.field-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.quick-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.field {
    display: grid;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.input {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--ink);
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.notice {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: var(--notice-bg);
    color: var(--muted);
    font-size: 0.95rem;
}

.button {
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.button.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 12px 25px rgba(43, 103, 255, 0.3);
}

.button.primary:hover {
    background: var(--accent-dark);
}

.button.ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border-strong);
}

.button.ghost:not(:disabled):hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.button.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.auth-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fine-print {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.home-shell {
    display: grid;
    gap: 2rem;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    padding: 2.25rem;
    background: var(--hero-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    color: var(--muted);
    margin: 0 0 0.5rem 0;
}

.subtitle {
    margin: 0.4rem 0 0 0;
    color: var(--muted);
}

.home-grid {
    display: grid;
    gap: 1.5rem;
}

.panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    color: var(--ink);
    display: grid;
    gap: 1.25rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface-subtle);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-soft);
    color: var(--ink);
    display: grid;
    gap: 0.65rem;
}

.card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
}

.card-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.card-actions {
    margin-top: 0.25rem;
}

.activity-list {
    display: grid;
    gap: 0.75rem;
}

.activity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
    color: var(--ink);
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pill {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pill-active {
    background: rgba(255, 107, 53, 0.12);
    color: var(--active);
}

.pill-real {
    background: var(--pill-real-bg);
    color: var(--pill-real-ink);
}

.pill-virtual {
    background: var(--pill-virtual-bg);
    color: var(--pill-virtual-ink);
}

.pill-settled {
    background: rgba(47, 158, 79, 0.12);
    color: var(--settled);
}

.stacked-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.inline-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.page-header-actions,
.section-header-actions {
    align-items: center;
}

.header-action-button,
.section-action-button {
    white-space: nowrap;
}

.home-quick-action {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.home-quick-action-icon {
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
    line-height: 1;
    font-weight: 700;
    flex: 0 0 auto;
}

.button.ghost.home-quick-action .home-quick-action-icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.list {
    display: grid;
    gap: 0.85rem;
}

.participant-entry {
    display: grid;
    gap: 0.5rem;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
    color: var(--ink);
}

.list-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.participant-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.participant-icon-badge {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: block;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.participant-edit-panel {
    border-radius: 16px;
    border: 1px solid var(--border-panel);
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-subtle) 95%, transparent), var(--surface-soft));
    padding: 1rem;
    display: grid;
    gap: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.participant-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.participant-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.danger-zone {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, #d24c4c 30%, var(--border-panel));
    background: linear-gradient(180deg, color-mix(in srgb, #fff2f2 70%, var(--surface-soft)), color-mix(in srgb, #ffe6e6 55%, var(--surface)));
}

.settings-form {
    display: grid;
    gap: 1rem;
}

.danger-zone-header,
.danger-confirm-title {
    font-weight: 700;
    color: var(--ink);
}

.danger-confirm-panel {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, #d24c4c 35%, var(--border));
    background: color-mix(in srgb, #fff7f7 78%, var(--surface));
}

.delete-profile-button {
    border-color: color-mix(in srgb, #d24c4c 50%, var(--border));
    color: color-mix(in srgb, #b22d2d 70%, var(--ink));
}

.leave-team-panel {
    border-color: color-mix(in srgb, #d98b1f 35%, var(--border-panel));
}

.pill-owner {
    background: color-mix(in srgb, #d98b1f 18%, var(--surface));
    color: color-mix(in srgb, #7a4a00 82%, var(--ink));
    border-color: color-mix(in srgb, #d98b1f 28%, var(--border));
}

.confirm-button {
    background: #2f9e4f;
    border-color: #2f9e4f;
    color: white;
}

.cancel-button {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--ink);
}

.activity-header {
    display: grid;
    gap: 1.25rem;
}

.activity-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.activity-hero img {
    width: 100%;
    height: clamp(220px, 35vw, 320px);
    object-fit: cover;
    display: block;
}

.activity-hero-content {
    position: absolute;
    inset: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.5rem;
    color: white;
    background: linear-gradient(180deg, rgba(15, 12, 8, 0.1), rgba(15, 12, 8, 0.6));
}

.hero-participants {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(15, 12, 8, 0.55);
    padding: 0.85rem;
    border-radius: 16px;
    display: grid;
    gap: 0.6rem;
    min-width: 200px;
    align-items: end;
}

.participant-count {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1rem;
    justify-self: end;
}

.participant-list {
    display: grid;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.participant-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.participant-row-current {
    font-weight: 600;
}

.participant-info {
    display: grid;
    gap: 0.1rem;
}

.participant-name {
    font-weight: 600;
}

.participant-self {
    margin-left: 0.35rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.participant-email {
    color: rgba(255, 255, 255, 0.75);
}

.debt-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 107, 53, 0.18);
    border: 1px solid rgba(255, 107, 53, 0.4);
    color: #ffe7dd;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.credit-badge,
.settled-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.credit-badge {
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #e8fff1;
}

.settled-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: rgba(255, 255, 255, 0.9);
}

.hero-meta {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    color: #fff7e8;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-action-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-quick-actions {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    margin-left: auto;
}

.icon-action {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hero-action-border);
    background: var(--hero-action-surface);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.icon-action-glyph {
    font-size: 1.15rem;
    line-height: 1;
}

.icon-action.copied {
    background: rgba(47, 158, 79, 0.12);
    border-color: rgba(47, 158, 79, 0.45);
    color: var(--settled);
    box-shadow: 0 10px 24px rgba(47, 158, 79, 0.2);
    animation: copy-pop 0.32s ease;
}

.hero-actions-end {
    margin-left: auto;
}

.hero-add-item {
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@keyframes copy-pop {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1.04);
    }
}

.activity-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: var(--sheet-backdrop);
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 1.5rem;
    z-index: 40;
}

.bottom-sheet {
    width: min(560px, 100%);
    background: var(--surface);
    border-radius: 24px 24px 16px 16px;
    padding: 1.5rem;
    max-height: min(88vh, 880px);
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(10, 8, 6, 0.35);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 1.25rem;
    animation: sheet-rise 0.2s ease;
}

@keyframes sheet-rise {
    from {
        transform: translateY(20px);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.sheet-body {
    display: grid;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.35rem;
    padding-bottom: 0.35rem;
}

.profile-sheet-body {
    min-height: 0;
    max-height: min(70vh, 720px);
    overflow-y: auto;
    padding-right: 0.35rem;
}

.profile-avatar-field {
    min-height: 0;
}

.theme-option {
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    color: var(--ink);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.theme-option:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-soft);
}

.theme-option.selected {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.theme-option:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
    outline-offset: 2px;
}

.theme-toggle-button {
    width: fit-content;
    min-width: 140px;
}

.ai-progress {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem;
    border-radius: 16px;
    background: var(--ai-progress-bg);
    border: 1px solid var(--ai-progress-border);
}

.ai-progress-spinner {
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    border: 3px solid rgba(43, 103, 255, 0.2);
    border-top-color: var(--accent);
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.item-money-grid {
    width: min(430px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.8fr);
}

.location-capture-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.receipt-upload-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.receipt-preview-card,
.receipt-camera-card,
.receipt-tip-card {
    margin-top: 0.75rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    padding: 0.85rem;
}

.receipt-preview-image {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.receipt-camera-preview {
    display: block;
    width: 100%;
    min-height: 220px;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
    margin-bottom: 0.75rem;
}

.sheet-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.item-card-new {
    animation: item-pop 0.6s ease;
    border-color: rgba(43, 103, 255, 0.5);
    box-shadow: 0 18px 35px rgba(43, 103, 255, 0.12);
}

@keyframes item-pop {
    0% {
        transform: scale(0.98);
        background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    }
    60% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

.split-section {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.split-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.split-mode {
    display: flex;
    gap: 0.5rem;
}

.split-list {
    display: grid;
    gap: 0.6rem;
}

.split-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.split-person {
    min-width: 0;
}

.split-inputs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.split-percent {
    width: 90px;
    text-align: right;
}

.split-exclude {
    margin-right: 0.35rem;
    white-space: nowrap;
}

.split-symbol {
    color: var(--muted);
}

.split-amount {
    font-weight: 600;
    color: var(--ink);
    min-width: 90px;
    text-align: right;
}

.split-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
}

.split-error {
    color: var(--error);
    font-size: 0.9rem;
}

.item-shares {
    display: grid;
    gap: 0.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.item-share {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
    gap: 0.75rem;
}

.item-share-person {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.item-share-marker {
    font-size: 0.9rem;
    line-height: 1;
}

.settlement-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 16px;
    background: var(--surface-soft-2);
    border: 1px solid var(--border);
}

.settlement-list {
    display: grid;
    gap: 0.5rem;
}

.settlement-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.95rem;
}

.settlement-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    justify-content: flex-end;
}

.settlement-arrow {
    color: var(--muted);
}

.settlement-amount {
    font-weight: 700;
    text-align: right;
}

.settlement-preview h4 {
    margin: 0 0 0.5rem 0;
}

.share-preview {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: var(--surface-soft-2);
    border: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.qr-sheet {
    width: min(720px, 100%);
}

.qr-frame {
    width: 100%;
    min-height: 520px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.item-list {
    display: grid;
    gap: 1rem;
}

.payment-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.payment-row {
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
    padding: 1rem 1.1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
}

.payment-row-main {
    min-width: 0;
    display: grid;
    gap: 0.3rem;
}

.payment-row-title {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    font-weight: 700;
    flex-wrap: wrap;
}

.payment-row-meta {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--muted);
    font-size: 0.88rem;
    flex-wrap: wrap;
}

.payment-row-side {
    display: grid;
    gap: 0.3rem;
    justify-items: end;
}

.payment-amount {
    font-weight: 700;
    white-space: nowrap;
}

.payment-status-badge {
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.payment-status-pending {
    background: rgba(255, 107, 53, 0.12);
    color: var(--active);
}

.payment-status-settled {
    background: rgba(47, 158, 79, 0.12);
    color: var(--settled);
}

.payment-status-failed {
    background: rgba(220, 53, 69, 0.12);
    color: #b42318;
}

.payment-action-row {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.item-card {
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
    padding: 1rem 1.25rem;
    display: grid;
    gap: 0.65rem;
}

.item-header {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.item-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    min-width: 0;
}

.item-amount {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

.item-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.item-controls {
    display: grid;
    gap: 0.55rem;
}

.share-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
}

.item-action-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.item-action-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.item-action-glyph {
    font-size: 1rem;
    line-height: 1;
}

.chip {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0.25rem 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.chip:hover {
    border-color: var(--border-strong);
    background: var(--surface-subtle);
}

.chip.active {
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    color: var(--accent-dark);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.avatar-picker {
    display: grid;
    gap: 0.85rem;
}

.profile-avatar-field .avatar-picker {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.avatar-picker-section {
    display: grid;
    gap: 0.5rem;
}

.avatar-picker-heading {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 0.5rem;
}

.avatar-option {
    position: relative;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0.5rem 0.45rem;
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(23, 18, 12, 0.06);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.profile-avatar-field .avatar-option-image {
    width: 2.5rem;
    height: 2.5rem;
}

.profile-avatar-field .avatar-option-label {
    font-size: 0.78rem;
}

.avatar-option:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
}

.avatar-option.selected {
    background: rgba(202, 138, 4, 0.14);
    border-color: #ca8a04;
    box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.22), 0 12px 22px rgba(202, 138, 4, 0.18);
    transform: translateY(-1px) scale(1.02);
}

.avatar-option:focus-visible {
    outline: 3px solid rgba(202, 138, 4, 0.3);
    outline-offset: 2px;
}

.avatar-option-image {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.avatar-option.selected .avatar-option-image {
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px rgba(202, 138, 4, 0.75);
}

.avatar-option-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    color: var(--ink);
}

.avatar-option.selected .avatar-option-label {
    color: var(--role-ink);
}

.avatar-option-indicator {
    position: absolute;
    top: -0.45rem;
    right: -0.35rem;
    border-radius: 999px;
    background: #ca8a04;
    color: #fff;
    border: 2px solid var(--surface);
    box-shadow: 0 8px 18px rgba(202, 138, 4, 0.24);
    padding: 0.24rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.tool-grid {
    display: grid;
    gap: 0.75rem;
}

.tool-action {
    border-radius: 16px;
    border: 1px solid var(--tool-border);
    background: var(--surface-subtle);
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-align: left;
    width: 100%;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tool-action:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--hero-action-border);
    box-shadow: var(--shadow-soft);
}

.tool-action-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--hero-action-border);
    background: var(--hero-action-surface);
    color: var(--ink);
}

.tool-action-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.map-placeholder {
    margin-top: 1rem;
    border-radius: 18px;
    border: 1px dashed var(--map-border);
    padding: 1.5rem;
    color: var(--muted);
    text-align: center;
}

.activity-map-shell {
    display: grid;
    gap: 1rem;
}

.activity-map-canvas {
    min-height: 420px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
}

.activity-map-list {
    display: grid;
    gap: 0.75rem;
}

.activity-map-item {
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: var(--surface-subtle);
    padding: 0.9rem 1rem;
    display: grid;
    gap: 0.25rem;
}

@media (max-width: 960px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .top-nav {
        align-items: center;
        gap: 0.55rem;
        justify-content: space-between;
        padding: calc(0.55rem + var(--safe-top)) 1rem 0.7rem;
    }

    .nav-brand {
        gap: 0.55rem;
        flex: 0 1 auto;
        min-width: 0;
    }

    .nav-brand-text {
        display: inline;
        font-size: 0.95rem;
    }

    .nav-links-desktop {
        display: none;
    }

    .user-menu {
        flex: 0 0 auto;
    }

    .dropdown {
        right: 0;
        top: 56px;
    }

    .app-main {
        padding: 1rem 1rem calc(5.75rem + var(--safe-bottom));
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 35;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 0.55rem;
        padding: 0.7rem 1rem calc(0.7rem + var(--safe-bottom));
        background: color-mix(in srgb, var(--nav-surface) 96%, transparent);
        backdrop-filter: blur(18px);
        border-top: 1px solid var(--border-soft);
        box-shadow: 0 -8px 24px rgba(20, 16, 12, 0.08);
    }

    .mobile-tabbar-link {
        display: grid;
        justify-items: center;
        gap: 0.2rem;
        padding: 0.45rem 0.25rem;
        border-radius: 16px;
        color: var(--muted);
        font-size: 0.76rem;
        font-weight: 700;
        transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    }

    .mobile-tabbar-link:hover {
        background: var(--accent-soft);
        color: var(--ink);
        transform: translateY(-1px);
    }

    .mobile-tabbar-link-active {
        background: var(--accent-soft);
        color: var(--ink);
    }

    .mobile-tabbar-icon {
        font-size: 1rem;
        line-height: 1;
    }

    .mobile-tabbar-label {
        white-space: nowrap;
    }

    .home-shell {
        gap: 1rem;
    }

    .activity-header {
        gap: 0.85rem;
    }

    .activity-hero img {
        height: clamp(190px, 52vw, 240px);
    }

    .activity-hero-content {
        padding: 1rem;
        gap: 0.4rem;
    }

    .activity-hero-content h1 {
        font-size: 1.55rem;
        line-height: 1.1;
    }

    .hero-participants {
        position: static;
        min-width: 0;
        margin-top: 0.35rem;
        padding: 0.7rem;
        gap: 0.45rem;
        background: rgba(15, 12, 8, 0.52);
        align-items: stretch;
    }

    .participant-count {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        justify-self: start;
    }

    .participant-list {
        gap: 0.3rem;
        max-height: 136px;
        overflow-y: auto;
        padding-right: 0.2rem;
    }

    .participant-row {
        gap: 0.5rem;
        align-items: flex-start;
    }

    .participant-info {
        min-width: 0;
    }

    .participant-name,
    .participant-email {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .participant-email {
        display: none;
    }

    .debt-badge,
    .credit-badge,
    .settled-badge {
        font-size: 0.72rem;
        padding: 0.18rem 0.5rem;
    }

    .brand-block {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .logo {
        margin: 0 auto;
    }

    .home-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
        padding: 1rem 1rem 1.1rem;
        border-radius: 22px;
    }

    .home-header h1 {
        font-size: 1.55rem;
        line-height: 1.1;
    }

    .subtitle {
        font-size: 0.92rem;
    }

    .panel {
        padding: 1rem;
        gap: 1rem;
    }

    .panel-header {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-header-actions,
    .section-header-actions {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.5rem;
        padding-bottom: 0.1rem;
    }

    .page-header-actions::-webkit-scrollbar,
    .section-header-actions::-webkit-scrollbar {
        display: none;
    }

    .page-header-actions .button,
    .page-header-actions a.button,
    .section-header-actions .button,
    .section-header-actions a.button {
        flex: 0 0 auto;
    }

    .header-action-button {
        padding: 0.55rem 0.8rem;
        font-size: 0.88rem;
    }

    .section-action-button {
        padding: 0.45rem 0.7rem;
        font-size: 0.82rem;
    }

    .home-quick-action {
        gap: 0.45rem;
    }

    .stacked-actions {
        width: 100%;
        align-items: stretch;
    }

    .activity-row,
    .list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-meta,
    .list-actions {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .payment-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .payment-row-side,
    .payment-action-row,
    .settlement-row-actions {
        justify-items: start;
        justify-content: flex-start;
    }

    .settlement-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .participant-edit-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.6rem;
    }

    .hero-action-icons {
        gap: 0.6rem;
        flex-wrap: nowrap;
    }

    .hero-quick-actions {
        gap: 0.6rem;
    }

    .hero-actions::-webkit-scrollbar {
        display: none;
    }

    .hero-quick-actions {
        margin-left: auto;
    }

    .activity-map-canvas {
        min-height: 320px;
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#app {
    min-height: 100vh;
}

.loading-progress.boot-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 1.25rem;
    padding: 2rem;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(255, 247, 232, 0.96) 35%, rgba(246, 241, 232, 0.98) 100%);
}

.boot-loader-stage {
    position: relative;
    width: min(340px, 80vw);
    aspect-ratio: 1;
}

.boot-loader-notes {
    position: absolute;
    inset: 0;
    animation: boot-loader-orbit 18s linear infinite;
}

.boot-note {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    --note-base: #f6d48b;
    --note-accent: #dd8f3b;
    --note-ink: #8d4f16;
    --note-shadow: rgba(112, 66, 24, 0.18);
    border: 1px solid color-mix(in srgb, var(--note-accent) 30%, white);
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.92), transparent 32%),
        radial-gradient(circle at 68% 72%, color-mix(in srgb, var(--note-accent) 24%, white), transparent 44%),
        linear-gradient(145deg, color-mix(in srgb, var(--note-base) 86%, white), color-mix(in srgb, var(--note-base) 60%, var(--note-accent)) 62%, color-mix(in srgb, var(--note-accent) 74%, white));
    box-shadow: 0 12px 24px var(--note-shadow);
    opacity: 0;
    transform-origin: center;
    transform: var(--note-hidden-transform);
    transition: opacity 0.2s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.boot-note::before,
.boot-note::after {
    content: "";
    position: absolute;
}

.boot-note::before {
    inset: 7px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--note-accent) 30%, white);
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.48), transparent 68%),
        conic-gradient(from 0deg, transparent 0 14%, color-mix(in srgb, var(--note-accent) 16%, white) 14% 18%, transparent 18% 32%, color-mix(in srgb, var(--note-accent) 16%, white) 32% 36%, transparent 36% 100%);
}

.boot-note::after {
    content: "€";
    display: grid;
    place-items: center;
    inset: 0;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    color: var(--note-ink);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.boot-note:nth-child(1) {
    --note-base: #f2c46d;
    --note-accent: #d6822f;
    --note-ink: #804815;
    --note-shadow: rgba(112, 66, 24, 0.2);
}

.boot-note:nth-child(2) {
    --note-base: #b7d5f4;
    --note-accent: #6798d4;
    --note-ink: #305d8d;
    --note-shadow: rgba(49, 90, 138, 0.18);
}

.boot-note:nth-child(3) {
    --note-base: #e7bcc9;
    --note-accent: #c76d8a;
    --note-ink: #8b3d57;
    --note-shadow: rgba(122, 58, 79, 0.18);
}

.boot-note:nth-child(4) {
    --note-base: #f0cf84;
    --note-accent: #d59a33;
    --note-ink: #855317;
    --note-shadow: rgba(122, 81, 23, 0.2);
}

.boot-note:nth-child(5) {
    --note-base: #c9d6a5;
    --note-accent: #8aa356;
    --note-ink: #546c29;
    --note-shadow: rgba(76, 95, 37, 0.18);
}

.boot-note:nth-child(6) {
    --note-base: #d7bfd8;
    --note-accent: #9d74ab;
    --note-ink: #6b4a75;
    --note-shadow: rgba(88, 63, 96, 0.18);
}

.boot-note:nth-child(1) {
    top: 6%;
    left: 50%;
    --note-hidden-transform: translate(-50%, 14px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(-50%, 0) rotate(0deg) scale(1);
}

.boot-note:nth-child(2) {
    top: 22%;
    right: 3%;
    --note-hidden-transform: translate(-10px, 10px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(0, 0) rotate(0deg) scale(1);
}

.boot-note:nth-child(3) {
    bottom: 18%;
    right: 8%;
    --note-hidden-transform: translate(-10px, -8px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(0, 0) rotate(0deg) scale(1);
}

.boot-note:nth-child(4) {
    bottom: 5%;
    left: 50%;
    --note-hidden-transform: translate(-50%, -14px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(-50%, 0) rotate(0deg) scale(1);
}

.boot-note:nth-child(5) {
    bottom: 18%;
    left: 8%;
    --note-hidden-transform: translate(10px, -8px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(0, 0) rotate(0deg) scale(1);
}

.boot-note:nth-child(6) {
    top: 22%;
    left: 3%;
    --note-hidden-transform: translate(10px, 10px) rotate(-120deg) scale(0.4);
    --note-visible-transform: translate(0, 0) rotate(0deg) scale(1);
}

.boot-loader[data-progress-step="1"] .boot-note:nth-child(1),
.boot-loader[data-progress-step="2"] .boot-note:nth-child(-n+2),
.boot-loader[data-progress-step="3"] .boot-note:nth-child(-n+3),
.boot-loader[data-progress-step="4"] .boot-note:nth-child(-n+4),
.boot-loader[data-progress-step="5"] .boot-note:nth-child(-n+5),
.boot-loader[data-progress-step="6"] .boot-note:nth-child(-n+6) {
    opacity: 1;
    transform: var(--note-visible-transform);
    box-shadow: 0 16px 28px var(--note-shadow);
    animation: boot-euro-spin 6s linear infinite;
}

.boot-loader[data-progress-step="1"] .boot-note:nth-child(1) {
    animation-delay: 0s;
}

.boot-loader[data-progress-step="2"] .boot-note:nth-child(2) {
    animation-delay: -0.8s;
}

.boot-loader[data-progress-step="3"] .boot-note:nth-child(3) {
    animation-delay: -1.6s;
}

.boot-loader[data-progress-step="4"] .boot-note:nth-child(4) {
    animation-delay: -2.4s;
}

.boot-loader[data-progress-step="5"] .boot-note:nth-child(5) {
    animation-delay: -3.2s;
}

.boot-loader[data-progress-step="6"] .boot-note:nth-child(6) {
    animation-delay: -4s;
}

@keyframes boot-loader-orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes boot-euro-spin {
    from {
        rotate: 0deg;
    }

    to {
        rotate: -360deg;
    }
}

.boot-loader-center {
    position: absolute;
    inset: 50%;
    width: 148px;
    height: 148px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 32px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 234, 0.98));
    border: 1px solid rgba(216, 205, 187, 0.9);
    box-shadow:
        0 24px 48px rgba(25, 20, 15, 0.18),
        0 0 0 10px rgba(255, 255, 255, 0.38);
}

.boot-loader-logo {
    width: 92px;
    height: 92px;
    display: block;
    object-fit: cover;
    border-radius: 24px;
}

.loading-progress-text.boot-loader-text {
    position: static;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #2a261f;
}

.loading-progress-text.boot-loader-text::after {
    content: none;
}
