/* ==========================================================================
   Morava — Hustopeče
   Airbnb-like layout, glassmorphism karty, hero fotka náměstí.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Airbnb paleta */
    --rausch: #ff385c;
    --rausch-deep: #e0184a;
    --rausch-soft: #fff1f3;
    --babu: #00a699;
    --babu-soft: #e6f6f4;
    --arches: #fc642d;
    --arches-soft: #fff0e9;
    --hof: #222222;
    --foggy: #717171;
    --faint: #dddddd;

    /* podklad + sklo */
    --bg: #f7f7f8;
    --glass: rgba(255, 255, 255, .74);
    --glass-strong: rgba(255, 255, 255, .88);
    --glass-line: rgba(255, 255, 255, .85);
    --glass-blur: saturate(180%) blur(22px);

    --radius: 18px;
    --radius-sm: 12px;
    --radius-lg: 26px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow: 0 6px 20px rgba(0, 0, 0, .09);
    --shadow-lift: 0 12px 34px rgba(0, 0, 0, .14);

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    color: var(--hof);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Barevné bloby pod obsahem — bez nich nemá backdrop-filter co rozostřovat */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(46rem 30rem at 8% 4%, rgba(255, 56, 92, .16) 0%, transparent 62%),
        radial-gradient(40rem 28rem at 96% 18%, rgba(0, 166, 153, .16) 0%, transparent 60%),
        radial-gradient(38rem 26rem at 20% 62%, rgba(252, 100, 45, .13) 0%, transparent 62%),
        radial-gradient(44rem 30rem at 88% 88%, rgba(255, 56, 92, .11) 0%, transparent 64%);
}

.wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 18px 16px calc(56px + env(safe-area-inset-bottom));
}

/* --------------------------------------------------------------------------
   Hero — fotka Hustopečí + skleněný panel
   -------------------------------------------------------------------------- */

.head {
    position: relative;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    box-shadow: var(--shadow);
    isolation: isolate;
    animation: hero-in .7s cubic-bezier(.2, .7, .3, 1) both;
}

.head__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* radnice sedí v horní polovině snímku — ořez ji musí nechat nad panelem */
    object-position: center 30%;
    z-index: -2;
}

/* čitelnost skleněného panelu — ztmavení zdola */
.head::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .04) 0%, rgba(0, 0, 0, .10) 42%, rgba(0, 0, 0, .34) 100%);
}

.head__panel {
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
    animation: rise .6s cubic-bezier(.2, .7, .3, 1) .18s both;
}

.head h1 {
    margin: 0;
    font-size: clamp(1.75rem, 6.5vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.head__place {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--foggy);
}
.head__place svg { flex: 0 0 auto; color: var(--rausch); }

.subtitle {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    color: var(--foggy);
    font-size: .88rem;
    font-weight: 500;
}

.head__credit {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 1;
    font-size: .62rem;
    color: rgba(255, 255, 255, .8);
    background: rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    padding: 3px 8px;
    border-radius: 999px;
    text-decoration: none;
    letter-spacing: .02em;
}
.head__credit:hover { background: rgba(0, 0, 0, .45); color: #fff; }

@keyframes hero-in {
    from { opacity: 0; transform: scale(.985) translateY(10px); }
    to   { opacity: 1; transform: none; }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Skleněné karty
   -------------------------------------------------------------------------- */

.card {
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* Fallback tam, kde backdrop-filter chybí — jinak by karta byla průsvitná a nečitelná */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, .stat, .head__panel, .spotlight, .owner-card,
    .expense-item, .packitem, .settle-item, .expense-total, .expense-person {
        background: rgba(255, 255, 255, .96);
    }
}

.card h2 {
    margin: 0 0 18px;
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: -.025em;
    display: flex;
    align-items: center;
    gap: 9px;
}

.count {
    font-size: .72rem;
    background: rgba(0, 0, 0, .06);
    color: var(--foggy);
    border-radius: 999px;
    padding: 3px 10px;
    font-weight: 700;
    letter-spacing: .01em;
}

.empty { color: var(--foggy); margin: 4px 0; font-size: .93rem; }
.hint { color: var(--foggy); font-size: .84rem; margin: 14px 0 0; }

/* --------------------------------------------------------------------------
   Statistiky
   -------------------------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat {
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat__label {
    display: block;
    font-size: .68rem;
    color: var(--foggy);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 700;
}
.stat__value {
    display: block;
    margin-top: 4px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.04em;
}
.stat__value--ok { color: var(--babu); }
.stat__value--warn { color: var(--rausch); }

/* --------------------------------------------------------------------------
   Postup
   -------------------------------------------------------------------------- */

.progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.progress-head h2 { margin-bottom: 14px; }
.progress-head strong {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, .08);
}
.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rausch) 0%, var(--arches) 100%);
    transition: width .5s cubic-bezier(.2, .7, .3, 1);
}

/* --------------------------------------------------------------------------
   Spotlighty (Program / Nákup / Den odjezdu)
   -------------------------------------------------------------------------- */

.spotlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.spotlight {
    background: var(--glass);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius);
    padding: 17px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s;
}
.spotlight:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.spotlight--program   { background: linear-gradient(165deg, rgba(255, 241, 243, .92) 0%, var(--glass) 68%); }
.spotlight--shop      { background: linear-gradient(165deg, rgba(230, 246, 244, .92) 0%, var(--glass) 68%); }
.spotlight--departure { background: linear-gradient(165deg, rgba(255, 240, 233, .92) 0%, var(--glass) 68%); }

/* program je hlavní, ať zabere celou šířku */
.spotlight--program { grid-column: 1 / -1; }

.spotlight__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.spotlight__head div { display: flex; align-items: center; gap: 9px; }
.spotlight__head strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; }
.spotlight__head em {
    color: var(--foggy);
    font-size: .74rem;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(0, 0, 0, .05);
    border-radius: 999px;
    padding: 3px 9px;
}

.spotlight__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spotlight__list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #3d3d3d;
    font-size: .91rem;
    line-height: 1.4;
    font-weight: 500;
}
.spotlight__list li span { color: var(--rausch); font-weight: 800; }
.spotlight__list li.is-done { color: var(--foggy); text-decoration: line-through; }
.spotlight__list li.is-done span { color: var(--babu); }

/* --------------------------------------------------------------------------
   Avataři
   -------------------------------------------------------------------------- */

.avatar {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: .92rem;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .12);
}
.avatar--img { background: #ececec; }
.avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar--all {
    background: linear-gradient(135deg, var(--rausch) 0%, var(--arches) 100%);
}

/* --------------------------------------------------------------------------
   Za kým to jde
   -------------------------------------------------------------------------- */

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

.owner-card {
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--glass-strong);
    transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s;
}
.owner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.owner-card__head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.owner-card__head div { min-width: 0; display: flex; flex-direction: column; }
.owner-card__head strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; }
.owner-card__head span:not(.avatar) { color: var(--foggy); font-size: .78rem; font-weight: 600; }

.mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mini-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #3d3d3d;
    font-size: .87rem;
    line-height: 1.4;
    flex-wrap: wrap;
    font-weight: 500;
}
.mini-list__mark { color: var(--rausch); font-weight: 800; }
.mini-list__title { min-width: 0; flex: 1 1 140px; }
.mini-list li.is-done { color: var(--foggy); text-decoration: line-through; }
.mini-list li.is-done .mini-list__mark { color: var(--babu); }

.mini-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: .66rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.4;
}
.mini-chip--program   { background: var(--rausch-soft); color: var(--rausch-deep); }
.mini-chip--shop      { background: var(--babu-soft); color: #00776d; }
.mini-chip--departure { background: var(--arches-soft); color: #c94a17; }

/* --------------------------------------------------------------------------
   Seznam věcí
   -------------------------------------------------------------------------- */

.category-block + .category-block {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 0, 0, .08);
}

.category-block h3 {
    margin: 0 0 14px;
    font-size: .74rem;
    color: var(--foggy);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 800;
}

.packlist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.packitem {
    position: relative;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--radius);
    background: var(--glass-strong);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    transition: border-color .2s, box-shadow .2s, background .3s;
}
.packitem:hover { border-color: rgba(0, 0, 0, .16); box-shadow: var(--shadow-sm); }
.packitem--done { background: rgba(230, 246, 244, .8); border-color: rgba(0, 166, 153, .3); }

.packitem__top {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-right: 40px;
}

.toggle-form { margin: 0; flex: 0 0 auto; }

.check-toggle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #c4c4c4;
    background: #fff;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: .9rem;
    line-height: 1;
    padding: 0;
    transition: transform .16s cubic-bezier(.34, 1.56, .64, 1), border-color .18s, background .18s, box-shadow .18s;
}
.check-toggle:hover {
    border-color: var(--rausch);
    box-shadow: 0 0 0 4px rgba(255, 56, 92, .14);
    transform: scale(1.08);
}
.check-toggle--done {
    background: var(--babu);
    border-color: var(--babu);
    animation: pop .32s cubic-bezier(.34, 1.56, .64, 1);
}
.check-toggle--done:hover { box-shadow: 0 0 0 4px rgba(0, 166, 153, .18); }

@keyframes pop {
    0%   { transform: scale(.5); }
    65%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.checkline__content { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.checkline__title { color: var(--hof); font-weight: 700; font-size: 1rem; line-height: 1.3; letter-spacing: -.01em; }
.checkline__note { color: var(--foggy); font-size: .85rem; line-height: 1.4; }
.packitem--done .checkline__title { color: var(--foggy); text-decoration: line-through; }

.packitem__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.packitem__meta .owner-pill { margin-left: 0; }

.owner-pill {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: var(--hof);
    background: rgba(0, 0, 0, .05);
    border-radius: 999px;
    padding: 4px 13px 4px 5px;
    font-weight: 600;
}
.owner-pill .avatar {
    width: 24px;
    height: 24px;
    font-size: .7rem;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
}

.item-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: .76rem;
    font-weight: 700;
}
.item-tag--program   { background: var(--rausch-soft); color: var(--rausch-deep); }
.item-tag--shop      { background: var(--babu-soft); color: #00776d; }
.item-tag--departure { background: var(--arches-soft); color: #c94a17; }

/* --------------------------------------------------------------------------
   Navigační odkazy (Waze)
   -------------------------------------------------------------------------- */

.navlink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 13px 5px 11px;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(100deg, #33ccff 0%, #0aa3e0 100%);
    box-shadow: 0 2px 8px rgba(10, 163, 224, .35);
    transition: filter .18s, transform .12s, box-shadow .18s;
    white-space: nowrap;
}
.navlink:hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(10, 163, 224, .45); }
.navlink:active { transform: scale(.96); }

.navlink--hero {
    margin-top: 12px;
    padding: 8px 17px 8px 15px;
    font-size: .84rem;
}

.navlink--mini {
    margin-left: auto;
    padding: 3px 10px 3px 8px;
    font-size: .7rem;
    box-shadow: none;
}

.spotlight__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.spotlight__text em {
    font-style: normal;
    font-size: .78rem;
    font-weight: 500;
    color: var(--foggy);
    line-height: 1.35;
}
.spotlight__list li.is-done .spotlight__text em { text-decoration: none; }

.edit-panel { border-top: 1px solid rgba(0, 0, 0, .07); padding-top: 11px; }
.edit-panel summary {
    cursor: pointer;
    color: var(--foggy);
    font-size: .83rem;
    font-weight: 700;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .18s;
}
.edit-panel summary::-webkit-details-marker { display: none; }
.edit-panel summary:hover { color: var(--hof); }
.edit-panel[open] summary { color: var(--hof); margin-bottom: 12px; }
.edit-panel__body { display: flex; flex-direction: column; gap: 12px; animation: rise .28s ease both; }

.delete-form { position: absolute; right: 13px; top: 13px; margin: 0; }

.iconbtn {
    border: 0;
    background: rgba(0, 0, 0, .05);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--foggy);
    line-height: 1;
    transition: background .18s, color .18s, transform .18s;
}
.iconbtn:hover { background: rgba(0, 0, 0, .1); transform: scale(1.08); }
.iconbtn--danger:hover { background: var(--rausch); color: #fff; }

/* --------------------------------------------------------------------------
   Formuláře
   -------------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.packform__grid, .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span {
    font-size: .72rem;
    font-weight: 800;
    color: var(--foggy);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.field input, .field select {
    font: inherit;
    font-weight: 500;
    padding: 13px 15px;
    border: 1px solid #c9c9c9;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .9);
    color: var(--hof);
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.field--small input, .field--small select { padding: 11px 13px; font-size: .92rem; }
.field input::placeholder { color: #adadad; }
.field input:focus, .field select:focus {
    outline: none;
    background: #fff;
    border-color: var(--hof);
    box-shadow: 0 0 0 3px rgba(34, 34, 34, .1);
}
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23222222' stroke-width='1.9' stroke-linecap='round' d='M1.5 1.75l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 38px;
}

.packform__actions, .form__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn {
    font: inherit;
    font-weight: 700;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 13px 24px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -.01em;
    transition: transform .1s ease, filter .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary {
    background: linear-gradient(100deg, var(--rausch) 0%, var(--rausch-deep) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 56, 92, .3);
}
.btn--primary:hover { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(255, 56, 92, .38); }

/* --------------------------------------------------------------------------
   Útrata
   -------------------------------------------------------------------------- */

.expenses-card { display: flex; flex-direction: column; gap: 16px; }
.expenses-card h2 { margin-bottom: 0; }

.expense-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.expense-total {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: var(--radius);
    padding: 16px 18px;
    background: linear-gradient(100deg, var(--rausch) 0%, var(--arches) 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 56, 92, .28);
}
.expense-total span {
    color: rgba(255, 255, 255, .88);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.expense-total strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }

.expense-person {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: var(--radius);
    background: var(--glass-strong);
    padding: 12px 14px;
}
/* :not(.avatar) — jinak by šedá barva jména přebila bílé iniciály v avataru */
.expense-person > span:not(.avatar) { color: var(--foggy); font-size: .85rem; font-weight: 600; }
.expense-person strong { white-space: nowrap; font-weight: 800; letter-spacing: -.02em; }

.expense-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.expense-item {
    position: relative;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--radius);
    background: var(--glass-strong);
    padding: 14px 52px 14px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color .2s, box-shadow .2s;
}
.expense-item:hover { border-color: rgba(0, 0, 0, .16); box-shadow: var(--shadow-sm); }
.expense-item__main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.expense-item__main strong { line-height: 1.3; font-weight: 700; }
.expense-amount { font-size: 1.08rem; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.expense-delete { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); margin: 0; }
.expense-form { border-top: 1px solid rgba(0, 0, 0, .08); padding-top: 18px; }

/* --------------------------------------------------------------------------
   Vyrovnání
   -------------------------------------------------------------------------- */

.settle { display: flex; flex-direction: column; gap: 14px; }

.settle__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
}
.settle__head h2, .settle__head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.settle__head h3 { font-size: 1rem; }
.settle__per { color: var(--foggy); font-size: .83rem; font-weight: 600; white-space: nowrap; }
.settle__per strong { color: var(--hof); font-weight: 800; }

.settle__done {
    color: #00776d;
    font-weight: 700;
    margin: 0;
    padding: 14px 16px;
    background: var(--babu-soft);
    border-radius: var(--radius-sm);
    font-size: .93rem;
}

.settle-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.settle-item {
    display: flex;
    align-items: center;
    gap: 9px 12px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: var(--radius);
    background: var(--glass-strong);
    padding: 13px 15px;
    flex-wrap: wrap;
    transition: transform .2s cubic-bezier(.2, .7, .3, 1), box-shadow .2s;
}
.settle-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.settle-party { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.settle-party .avatar { width: 30px; height: 30px; font-size: .76rem; }
.settle-party__name { font-weight: 700; white-space: nowrap; }
.settle-arrow { color: var(--rausch); font-weight: 800; font-size: 1.05rem; line-height: 1; }
.settle-amount { margin-left: auto; color: var(--rausch); white-space: nowrap; font-size: 1.1rem; font-weight: 800; letter-spacing: -.03em; }

/* --------------------------------------------------------------------------
   Účastníci + patička
   -------------------------------------------------------------------------- */

.people { list-style: none; margin: 0 0 4px; padding: 0; }
.person { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.person:last-child { border-bottom: 0; }
.person strong { flex: 1; font-weight: 600; }

.details summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -.025em;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 9px;
}
.details summary::-webkit-details-marker { display: none; }
.details summary::after {
    content: "";
    margin-left: auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--foggy);
    border-bottom: 2px solid var(--foggy);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}
.details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.details[open] summary { margin-bottom: 16px; }

.foot {
    text-align: center;
    color: var(--foggy);
    font-size: .76rem;
    padding: 10px 0 0;
    line-height: 1.7;
}
.foot a { color: var(--foggy); }

/* --------------------------------------------------------------------------
   Responzivita
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    .owner-grid, .spotlights { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .head { min-height: 380px; }
}

@media (max-width: 440px) {
    .wrap { padding-left: 12px; padding-right: 12px; }
    .card { padding: 17px; }
    .head { min-height: 340px; padding: 13px; border-radius: 20px; }
    .head__panel { padding: 15px 16px; }
    .packform__grid, .row, .expense-summary { grid-template-columns: 1fr; }
    .expense-total { align-items: flex-start; flex-direction: column; gap: 4px; }
    .expense-item { align-items: flex-start; flex-direction: column; padding-right: 52px; }
    .owner-pill { margin-left: 0; }
    .settle-amount { flex-basis: 100%; text-align: right; }
}

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