:root {
    color-scheme: light;
    --bg: #eef3f7;
    --surface: #ffffff;
    --ink: #17202a;
    --muted: #5c6b78;
    --line: #dce5ee;
    --blue: #0f6fff;
    --blue-dark: #084ea8;
    --ice: #dff2ff;
    --danger: #c02b2b;
    --shadow: 0 16px 45px rgba(35, 63, 91, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(145deg, rgba(15, 111, 255, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(72, 199, 255, 0.2), transparent 22rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 2px 18px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.03;
    letter-spacing: 0;
}

.mark {
    display: grid;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--blue);
    font-size: 30px;
}

.card {
    margin-bottom: 14px;
    padding: 17px;
    border: 1px solid rgba(220, 229, 238, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(35, 63, 91, 0.07);
}

h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: #111820;
    font-size: 18px;
    line-height: 1.2;
}

label {
    display: block;
    margin: 0 0 7px;
    color: #394653;
    font-size: 14px;
    font-weight: 650;
}

input,
select {
    width: 100%;
    min-height: 48px;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid #c8d4df;
    border-radius: 8px;
    background: #fbfdff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

input:focus,
select:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(15, 111, 255, 0.16);
}

input:last-child,
select:last-child {
    margin-bottom: 0;
}

.primary-action {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 2;
    width: 100%;
    min-height: 56px;
    margin: 4px 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    box-shadow: 0 12px 22px rgba(15, 111, 255, 0.28);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
}

.primary-action:active {
    background: var(--blue-dark);
    transform: translateY(1px) scale(0.99);
}

.result-card {
    display: none;
    border-color: #8bc9ff;
    background: linear-gradient(180deg, #eef8ff, var(--surface));
}

.result-card.is-visible {
    display: block;
}

.result-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #cce5fb;
    color: #293846;
    font-size: 15px;
}

.result-item strong {
    flex: 0 0 auto;
    color: #071a30;
    text-align: right;
}

.result-total {
    display: grid;
    gap: 8px;
    padding-top: 16px;
    text-align: center;
}

.result-total span {
    color: #293846;
    font-weight: 750;
}

.result-total strong {
    color: var(--danger);
    font-size: 26px;
}

@media (max-width: 380px) {
    .app-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    h1 {
        font-size: 29px;
    }

    .mark {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }
}
