:root {
    --primary: #5a2be8;
    --primary-2: #6e3cf2;
    --primary-soft: #f1eaff;
    --primary-soft-2: #f7f2ff;
    --ink: #070b1b;
    --muted: #60677d;
    --muted-2: #8c92a5;
    --line: #e9e6f0;
    --surface: #ffffff;
    --canvas: #fbfbfe;
    --you: #2fa853;
    --you-soft: #eaf8ef;
    --mili: #ff7a00;
    --mili-soft: #fff1e5;
    --danger: #ef2222;
    --danger-soft: #fff0f0;
    --blue: #168be8;
    --blue-soft: #eaf5ff;
    --gold: #b68405;
    --gold-soft: #fff6da;
    --radius-lg: 28px;
    --radius-md: 22px;
    --radius-sm: 16px;
    --shadow-card: 0 12px 26px rgba(17, 21, 39, 0.08);
    --shadow-soft: 0 6px 18px rgba(17, 21, 39, 0.06);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--canvas);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0%, rgba(108, 58, 237, 0.06), transparent 34rem),
        var(--canvas);
    color: var(--ink);
    font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.app-shell {
    position: relative;
    width: min(100%, 430px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(16px, env(safe-area-inset-top, 0px)) 14px calc(92px + var(--safe-bottom));
}

.topbar {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    margin-bottom: 14px;
}

.icon-button,
.round-close {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
}

.icon-button-primary {
    color: var(--primary);
}

.group-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-size: clamp(18px, 4.7vw, 22px);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.screen[hidden],
[hidden] {
    display: none !important;
}

.balance-card {
    min-height: 204px;
    padding: 28px 22px;
    border: 1px solid #eadfff;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 28%),
        linear-gradient(135deg, #faf6ff 0%, #f0e4ff 100%);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.balance-icon,
.summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.balance-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary);
}

.balance-label {
    margin: 0 0 7px;
    font-size: clamp(17px, 4.5vw, 21px);
    font-weight: 700;
}

.balance-amount {
    display: block;
    color: var(--primary);
    font-size: clamp(44px, 12.8vw, 58px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.summary-card {
    min-width: 0;
    min-height: 116px;
    padding: 11px 8px 12px;
    border: 1px solid rgba(223, 223, 232, 0.82);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.summary-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 9px;
}

.summary-total .summary-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.summary-you .summary-icon {
    background: var(--you-soft);
    color: var(--you);
}

.summary-mili .summary-icon {
    background: var(--mili-soft);
    color: var(--mili);
}

.summary-label {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
}

.summary-card strong {
    display: block;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
    font-size: clamp(18px, 5vw, 24px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.summary-you strong {
    color: var(--you);
}

.summary-mili strong {
    color: var(--mili);
}

.movements-section {
    margin-top: 24px;
}

.section-heading,
.list-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-heading h1,
.list-topbar h1 {
    margin: 0;
    font-size: clamp(25px, 6.2vw, 29px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.link-button {
    min-height: 44px;
    padding: 0;
    background: transparent;
    color: var(--primary);
    font-size: 17px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.expense-list {
    display: grid;
    gap: 9px;
}

.expense-item-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--danger);
}

.expense-delete-action {
    position: absolute;
    inset: 0 0 0 auto;
    display: flex;
    width: 102px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: var(--danger);
    font-size: 14px;
    font-weight: 800;
}

.expense-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 74px;
    padding: 9px 12px 9px 10px;
    border: 1px solid rgba(228, 228, 236, 0.88);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    color: inherit;
    text-align: left;
    transition: transform 180ms cubic-bezier(.2, .8, .2, 1);
    touch-action: pan-y;
}

.expense-item-shell.is-swiped .expense-row {
    transform: translateX(-102px);
}

.expense-avatar {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 25px;
    font-weight: 900;
}

.expense-avatar svg {
    width: 27px;
    height: 27px;
}

.avatar-purple {
    background: var(--primary-soft);
    color: var(--primary);
}

.avatar-red {
    background: #fff0e9;
    color: #b91c1c;
}

.avatar-blue {
    background: var(--blue-soft);
    color: var(--blue);
}

.avatar-green {
    background: var(--you-soft);
    color: var(--you);
}

.avatar-gold {
    background: var(--gold-soft);
    color: var(--gold);
}

.expense-main {
    min-width: 0;
}

.expense-title {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: clamp(17px, 4.3vw, 20px);
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-meta {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: clamp(14px, 3.8vw, 17px);
    font-weight: 500;
    line-height: 1.15;
}

.meta-you {
    color: var(--you);
    font-weight: 700;
}

.meta-mili {
    color: var(--mili);
    font-weight: 700;
}

.expense-side {
    display: grid;
    align-self: stretch;
    justify-items: end;
    align-content: space-between;
    padding: 2px 0;
}

.expense-amount {
    color: var(--ink);
    font-size: clamp(16px, 4vw, 19px);
    font-weight: 700;
    white-space: nowrap;
}

.expense-date {
    color: var(--muted);
    font-size: clamp(13px, 3.6vw, 16px);
    font-weight: 500;
}

.fab {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: calc(22px + var(--safe-bottom));
    display: flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(135deg, #6732f2, #4f20d6);
    box-shadow: 0 16px 26px rgba(88, 43, 216, 0.36);
    color: #fff;
}

.fab svg {
    display: block;
    width: 34px;
    height: 34px;
}

.screen-all {
    padding-top: 4px;
}

.sheet-backdrop,
.confirm-dialog {
    position: fixed;
    z-index: 40;
    inset: 0;
    background: rgba(7, 11, 27, 0.54);
}

.bottom-sheet {
    position: fixed;
    z-index: 50;
    right: 50%;
    bottom: 0;
    width: min(100%, 430px);
    max-height: min(88vh, 760px);
    overflow: auto;
    padding: 26px 22px calc(22px + var(--safe-bottom));
    transform: translateX(50%);
    border-radius: 28px 28px 0 0;
    background: var(--surface);
    box-shadow: 0 -18px 40px rgba(17, 21, 39, 0.18);
}

.sheet-handle {
    width: 54px;
    height: 5px;
    margin: 0 auto 22px;
    border-radius: 999px;
    background: #d9dbe3;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.sheet-header h2 {
    margin: 0;
    font-size: clamp(30px, 9vw, 40px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.round-close {
    flex: 0 0 auto;
    background: #f2f2f5;
}

.field-label,
.choice-group legend,
.sheet-subtitle {
    display: block;
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
}

.amount-field {
    display: flex;
    min-height: 70px;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 0 16px;
    border: 2px solid var(--primary);
    border-radius: 14px;
}

.amount-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--primary);
    background: transparent;
    font-size: clamp(42px, 14vw, 58px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
}

.amount-field span {
    color: #7f8495;
    font-size: clamp(38px, 12vw, 52px);
    font-weight: 900;
}

.text-field,
.date-field {
    display: flex;
    align-items: center;
    min-height: 58px;
    border: 1px solid #dfe1ea;
    border-radius: 14px;
    background: #fff;
}

.text-field {
    margin-bottom: 14px;
    padding: 0 14px;
}

.text-field input,
.date-field input,
.new-group-form input,
.new-group-form select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
}

.text-field input::placeholder {
    color: #9296a8;
}

.suggestions {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.suggestions::-webkit-scrollbar {
    display: none;
}

.suggestions button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #e4d8ff;
    border-radius: 14px;
    background: #fbf8ff;
    color: #242a3a;
    font-size: 18px;
    font-weight: 600;
}

.date-field {
    width: min(100%, 190px);
    gap: 10px;
    margin-bottom: 26px;
    padding: 0 12px;
}

.date-field input {
    font-size: 17px;
}

.choice-group {
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.payer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.split-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.choice-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 82px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #dedfea;
    border-radius: 15px;
    background: #fff;
    text-align: center;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card:has(input:checked) {
    border-color: var(--primary);
    background: #fbf8ff;
    box-shadow: inset 0 0 0 1px var(--primary);
}

.choice-card strong {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
}

.choice-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.choice-you .icon-person,
.split-half {
    color: var(--primary);
}

.choice-mili .icon-person,
.split-mili {
    color: var(--mili);
}

.split-you {
    color: var(--you);
}

.split-card {
    min-height: 112px;
}

.primary-button,
.danger-button,
.secondary-button {
    min-height: 56px;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 900;
}

.primary-button {
    width: 100%;
    color: #fff;
    background: linear-gradient(135deg, #5d27e6, #5520d8);
}

.primary-button-small {
    margin-top: 12px;
    font-size: 18px;
}

.delete-in-edit {
    width: 100%;
    min-height: 50px;
    margin-top: 12px;
    border-radius: 14px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 18px;
    font-weight: 900;
}

.group-list {
    display: grid;
    gap: 12px;
    margin-bottom: 28px;
}

.group-row,
.new-group-card,
.tip-card {
    border-radius: 16px;
    background: #fff;
}

.group-row {
    display: grid;
    grid-template-columns: 52px 1fr 34px;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 74px;
    padding: 12px;
    border: 1px solid #e4e4ec;
    text-align: left;
}

.group-row.is-current {
    border-color: #cbb8ff;
    background: #fbf8ff;
}

.group-icon,
.group-check,
.new-group-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.group-icon {
    width: 42px;
    height: 42px;
    color: var(--ink);
}

.group-row.is-current .group-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.group-row strong,
.new-group-card strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
}

.group-row small,
.new-group-card small,
.tip-card p {
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
}

.group-check {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.new-group-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-areas: "icon title" "icon text";
    align-items: center;
    width: 100%;
    min-height: 76px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px dashed #b68cff;
    color: var(--primary);
    text-align: left;
}

.new-group-card span {
    grid-area: icon;
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.new-group-card strong {
    grid-area: title;
}

.new-group-card small {
    grid-area: text;
}

.new-group-form {
    margin: -4px 0 18px;
}

.group-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.group-form-grid label:last-child {
    grid-column: 1 / -1;
}

.group-form-grid label {
    display: grid;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
}

.new-group-form input,
.new-group-form select {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #e0e0e8;
    border-radius: 12px;
}

.tip-card {
    padding: 18px;
    border: 1px solid #eee5ff;
    background: #fcf9ff;
}

.tip-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
}

.tip-card p {
    margin: 0;
    line-height: 1.5;
}

.confirm-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.confirm-card {
    width: min(100%, 340px);
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.confirm-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.confirm-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 600;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.secondary-button {
    background: #f2f3f7;
    color: var(--ink);
    font-size: 16px;
}

.danger-button {
    background: var(--danger);
    color: #fff;
    font-size: 16px;
}

.toast-message {
    position: fixed;
    z-index: 70;
    right: 50%;
    bottom: calc(104px + var(--safe-bottom));
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    transform: translateX(50%);
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: var(--shadow-card);
}

.empty-state {
    padding: 26px 18px;
    border: 1px dashed #d7c8ff;
    border-radius: 20px;
    background: #fff;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 900;
}

.empty-state p {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 600;
}

.empty-state button {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.icon-lines,
.icon-sliders,
.icon-calendar,
.icon-chevron,
.icon-people,
.icon-person,
.icon-search,
.icon-close,
.icon-back,
.split-half,
.icon-trash {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.icon-lines {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8H24M4 14H18M4 20H24' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8H24M4 14H18M4 20H24' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-sliders {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 9H13M17 9H23M5 19H10M14 19H23' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='15' cy='9' r='2.5' stroke='black' stroke-width='2.2'/%3E%3Ccircle cx='12' cy='19' r='2.5' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 9H13M17 9H23M5 19H10M14 19H23' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='15' cy='9' r='2.5' stroke='black' stroke-width='2.2'/%3E%3Ccircle cx='12' cy='19' r='2.5' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E");
}

.icon-calendar {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='6.5' width='18' height='17' rx='2.5' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M9 4.5V9M19 4.5V9M5.5 12H22.5' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='5' y='6.5' width='18' height='17' rx='2.5' stroke='black' stroke-width='2.2'/%3E%3Cpath d='M9 4.5V9M19 4.5V9M5.5 12H22.5' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-chevron {
    width: 18px;
    height: 18px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7L9 12L14 7' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7L9 12L14 7' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.icon-people {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='11' r='4' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M5 25C5 20.6 8.1 18 12 18C15.9 18 19 20.6 19 25' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='22' cy='12' r='3.3' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M21 19C24.3 19.3 27 21.6 27 25' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='11' r='4' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M5 25C5 20.6 8.1 18 12 18C15.9 18 19 20.6 19 25' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3Ccircle cx='22' cy='12' r='3.3' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M21 19C24.3 19.3 27 21.6 27 25' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-person {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='10' r='4.2' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M8 26C8 20.8 11.6 18 16 18C20.4 18 24 20.8 24 26' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='10' r='4.2' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M8 26C8 20.8 11.6 18 16 18C20.4 18 24 20.8 24 26' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-search {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12.5' cy='12.5' r='7' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M18 18L23 23' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12.5' cy='12.5' r='7' stroke='black' stroke-width='2.4'/%3E%3Cpath d='M18 18L23 23' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-close {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8L20 20M20 8L8 20' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 8L20 20M20 8L8 20' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-back {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 7L10 14L17 21' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 7L10 14L17 21' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.split-half {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='10' stroke='black' stroke-width='2.5'/%3E%3Cpath d='M16 6V26' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='16' cy='16' r='10' stroke='black' stroke-width='2.5'/%3E%3Cpath d='M16 6V26' stroke='black' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.icon-trash {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8H22M11 8V6H17V8M9 11L10 23H18L19 11' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8H22M11 8V6H17V8M9 11L10 23H18L19 11' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(90, 43, 232, 0.28);
    outline-offset: 3px;
}

@media (max-width: 359px) {
    .app-shell {
        padding-inline: 10px;
    }

    .summary-grid,
    .split-options {
        gap: 8px;
    }

    .summary-card strong {
        font-size: clamp(17px, 4.7vw, 21px);
    }

    .choice-card small {
        font-size: 12px;
    }

    .expense-row {
        grid-template-columns: 50px 1fr auto;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
