/* assets/css/style.css — Randkownik
 * Ciepły, przejrzysty motyw. Mobile-first (projektowane pod iPhone 17/Pro).
 * Sekcje: zmienne · topbar · layout · tabbar · karty · formularze · przyciski
 *         · alerty · login · checklista · dashboard · randki · galeria
 *         · uploader · polish (mikro-interakcje, animacje, reduced-motion).
 */

:root {
    /* Pastelowa, romantyczna paleta — miłość, delikatność, smooth */
    --c-bg:        #fff5f8;   /* mgiełka różu */
    --c-surface:   #ffffff;
    --c-surface-2: #fdecf3;   /* bardzo jasny róż */
    --c-text:      #5a4a55;   /* miękki śliwkowy grafit */
    --c-muted:     #b09aa6;   /* przygaszony liliowo-różowy */
    --c-primary:   #f4a3c0;   /* pastelowy róż */
    --c-primary-d: #e07aa6;   /* głębszy róż (tekst/akcenty aktywne) */
    --c-accent:    #c9b6e4;   /* pastelowa lawenda */
    --c-accent-2:  #ffc9b0;   /* pastelowa brzoskwinia */
    --c-success:   #a6d7bd;   /* pastelowa mięta */
    --c-danger:    #f2a6b6;   /* pudrowa czerwień */
    --c-border:    #f6dde8;   /* róż na obramówki */

    /* Gradient „miłosny" — róż → lawenda (przyciski, akcenty) */
    --grad-love: linear-gradient(135deg, #f4a3c0 0%, #c9b6e4 100%);

    --radius:    18px;
    --radius-sm: 12px;
    --shadow:    0 8px 24px rgba(224, 122, 166, 0.16);
    --shadow-sm: 0 3px 12px rgba(224, 122, 166, 0.12);

    /* Czcionki */
    --font-ui:    'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-brand: 'Dancing Script', 'Quicksand', cursive;

    /* Bezpieczne marginesy iPhone (notch / Dynamic Island / pasek dolny) */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --tabbar-h: 64px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ui);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: 100%;
}

a { color: var(--c-primary-d); text-decoration: none; }

h1, h2, h3 { letter-spacing: -0.01em; }

/* ------------------------------------------------------------------ */
/*  Topbar                                                            */
/* ------------------------------------------------------------------ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(var(--safe-top) + 12px) 18px 12px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
}
.topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--c-primary-d);
}
.topbar__heart { width: 26px; height: 26px; }
.topbar__user  { font-size: 0.9rem; color: var(--c-muted); font-weight: 600; }

/* ------------------------------------------------------------------ */
/*  Layout treści                                                     */
/* ------------------------------------------------------------------ */
.content {
    max-width: 640px;
    margin: 0 auto;
    padding: 18px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}

h1 { font-size: 1.5rem; margin: 4px 0 16px; }
h2 { font-size: 1.15rem; margin: 20px 0 12px; }

/* ------------------------------------------------------------------ */
/*  Dolna nawigacja (tabbar) — kciukowy zasięg na telefonie           */
/* ------------------------------------------------------------------ */
.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -4px 16px rgba(160, 110, 90, 0.08);
}
.tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--c-muted);
    font-size: 0.68rem;
}
.tabbar__icon  { font-size: 1.3rem; line-height: 1; }
.tabbar__item.is-active { color: var(--c-primary-d); }
.tabbar__item--add .tabbar__icon {
    background: var(--c-primary);
    color: #fff;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    margin-top: -14px;
}
.tabbar__item--add .tabbar__label { color: var(--c-primary-d); }

/* ------------------------------------------------------------------ */
/*  Karty                                                             */
/* ------------------------------------------------------------------ */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    margin-bottom: 14px;
}

/* ------------------------------------------------------------------ */
/*  Formularze                                                        */
/* ------------------------------------------------------------------ */
.form { display: flex; flex-direction: column; }
.form__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-muted);
    margin: 12px 0 6px;
}
.form__input,
.form__textarea,
.form__select {
    width: 100%;
    font-size: 1rem;      /* ≥16px → iOS nie zoomuje przy focusie */
    padding: 13px 14px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    -webkit-appearance: none;
    appearance: none;
}
.form__textarea { min-height: 96px; resize: vertical; }
.form__input:focus,
.form__textarea:focus,
.form__select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.18);
}

/* ------------------------------------------------------------------ */
/*  Przyciski                                                         */
/* ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
    color: var(--c-text);
    cursor: pointer;
    min-height: 48px;     /* wygodny cel dotykowy */
    transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--grad-love); color: #fff; }
.btn--primary:active { filter: brightness(0.96); }
.btn--block { width: 100%; margin-top: 20px; }
.btn--ghost { background: transparent; border: 1px solid var(--c-border); }
.btn--danger { background: transparent; color: var(--c-danger); border: 1px solid var(--c-danger); }

/* ------------------------------------------------------------------ */
/*  Alerty                                                            */
/* ------------------------------------------------------------------ */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    margin-bottom: 14px;
}
.alert--error   { background: #fbe4e0; color: #b0483c; }
.alert--success { background: #e3f2e8; color: #3f7a54; }

/* ------------------------------------------------------------------ */
/*  Strona logowania                                                  */
/* ------------------------------------------------------------------ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
    background: linear-gradient(160deg, #fff5f8 0%, #f3e6f7 55%, #eae2f6 100%);
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--c-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    text-align: center;
}
.login-card__logo { line-height: 1; }
.login-card__heart { width: 72px; height: 72px; }
.login-card__title {
    margin: 8px 0 4px;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 2.6rem;
    color: var(--c-primary-d);
}
.login-card__subtitle { margin: 0 0 8px; color: var(--c-muted); font-size: 0.95rem; }
.login-card .form { text-align: left; }

/* ------------------------------------------------------------------ */
/*  Elementy wspólne                                                  */
/* ------------------------------------------------------------------ */
.muted { color: var(--c-muted); }
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--c-primary);
    border-radius: 11px;
    vertical-align: middle;
}
.pill--done { background: var(--c-success); }

/* ------------------------------------------------------------------ */
/*  Checklista pomysłów                                               */
/* ------------------------------------------------------------------ */
.idea-add__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.idea-add__row .form__input { flex: 1; }
.idea-add__row .btn { flex: 0 0 auto; padding-inline: 18px; }
.idea-add .form__textarea { margin-top: 10px; min-height: 60px; }

.idea-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.idea-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 14px;
}

/* Ładny checkbox */
.idea-item__check {
    position: relative;
    flex: 0 0 auto;
    width: 26px; height: 26px;
    cursor: pointer;
}
.idea-item__check input {
    position: absolute;
    opacity: 0;
    width: 100%; height: 100%;
    margin: 0; cursor: pointer;
}
.idea-item__box {
    display: block;
    width: 26px; height: 26px;
    border: 2px solid var(--c-primary);
    border-radius: 8px;
    transition: background .15s ease, border-color .15s ease;
}
.idea-item__check input:checked + .idea-item__box {
    background: var(--c-success);
    border-color: var(--c-success);
}
.idea-item__check input:checked + .idea-item__box::after {
    content: "✓";
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.idea-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.idea-item__title { font-weight: 600; word-break: break-word; }
.idea-item__desc  { font-size: 0.86rem; color: var(--c-muted); word-break: break-word; }

.idea-item.is-done .idea-item__title {
    text-decoration: line-through;
    color: var(--c-muted);
}

.idea-item__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.idea-item__menu form { margin: 0; }
.idea-item__action {
    background: none;
    border: none;
    font-size: 1.05rem;
    padding: 6px;
    cursor: pointer;
    line-height: 1;
    border-radius: 8px;
}
.idea-item__action:active { background: var(--c-surface-2); }

.idea-item--editing { flex-direction: column; }
.idea-item__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.idea-list--done .idea-item { opacity: 0.75; }

/* ------------------------------------------------------------------ */
/*  Dashboard                                                         */
/* ------------------------------------------------------------------ */
.empty { text-align: center; }
.empty .btn { margin-top: 8px; }

.date-mini {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.date-mini__when  { font-size: 0.8rem; color: var(--c-primary-d); font-weight: 600; }
.date-mini__title { font-size: 1.05rem; font-weight: 600; color: var(--c-text); }

.mini-list { list-style: none; margin: 0 0 8px; padding: 0; }
.mini-list__item { padding: 6px 0; border-bottom: 1px solid var(--c-border); }
.mini-list__item:last-child { border-bottom: none; }

.link-more {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}
.link-back {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-muted);
}

/* ------------------------------------------------------------------ */
/*  Randki — nagłówek strony, karty listy                            */
/* ------------------------------------------------------------------ */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; }

.form__actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.form__actions .btn { flex: 1; }

/* Znaczniki statusu */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--c-surface-2);
    color: var(--c-muted);
}
.badge.is-planned   { background: #eaf1fb; color: #4a72b8; }
.badge.is-done      { background: #e3f2e8; color: #3f7a54; }
.badge.is-cancelled { background: #f5e6e4; color: #a86a62; }

.date-card { display: block; }
.date-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.date-card__when  { font-size: 0.82rem; font-weight: 600; color: var(--c-primary-d); }
.date-card__title { font-size: 1.12rem; font-weight: 700; color: var(--c-text); }
.date-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.date-card__tag {
    font-size: 0.78rem;
    color: var(--c-muted);
    background: var(--c-surface-2);
    padding: 3px 9px;
    border-radius: 12px;
}

/* ------------------------------------------------------------------ */
/*  Szczegóły randki                                                  */
/* ------------------------------------------------------------------ */
.detail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.detail__tools { display: flex; gap: 4px; }
.detail__tools form { margin: 0; }
.icon-btn {
    background: none;
    border: none;
    font-size: 1.15rem;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1;
}
.icon-btn:active { background: var(--c-surface-2); }

.detail__title { font-size: 1.5rem; margin: 4px 0 8px; }
.detail__when  { font-weight: 600; color: var(--c-primary-d); margin: 0 0 8px; }
.detail__idea  { color: var(--c-muted); margin: 0 0 12px; font-size: 0.92rem; }
.detail__desc  {
    background: var(--c-surface-2);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin: 8px 0 16px;
    white-space: normal;
    word-break: break-word;
}

/* Przełącznik statusu (chipy) */
.status-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.status-switch form { margin: 0; }
.chip {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    cursor: pointer;
    min-height: 40px;
}
.chip--active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}

/* ------------------------------------------------------------------ */
/*  Galeria                                                           */
/* ------------------------------------------------------------------ */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
}
.gallery__item {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--c-surface-2);
}
.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (min-width: 480px) {
    .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* Kafelek z przyciskiem usuwania */
.gallery__item { position: relative; }
.gallery__del {
    position: absolute;
    top: 4px; right: 4px;
    margin: 0;
}
.gallery__del-btn {
    width: 26px; height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(45, 30, 30, 0.6);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.gallery__del-btn:active { background: rgba(45, 30, 30, 0.85); }
.gallery__empty { margin-top: 4px; }

/* ------------------------------------------------------------------ */
/*  Uploader zdjęć                                                    */
/* ------------------------------------------------------------------ */
.uploader { margin-bottom: 14px; }
.uploader__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 22px 16px;
    border: 2px dashed var(--c-primary);
    border-radius: var(--radius);
    background: var(--c-surface-2);
    color: var(--c-primary-d);
    text-align: center;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.uploader__drop.is-over { background: #fbe0d6; border-color: var(--c-primary-d); }
.uploader__drop.is-loading { opacity: 0.6; pointer-events: none; }
.uploader__icon { font-size: 1.6rem; }
.uploader__text { font-weight: 700; }
.uploader__hint { font-size: 0.78rem; color: var(--c-muted); }

.uploader__status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--c-surface-2);
    color: var(--c-muted);
    text-align: center;
}
.uploader__status.is-ok    { background: #e3f2e8; color: #3f7a54; }
.uploader__status.is-error { background: #fbe4e0; color: #b0483c; }

/* ================================================================== */
/*  ETAP 5 — POLISH                                                    */
/*  Mikro-interakcje, wejścia elementów, dopracowanie pod iPhone.      */
/* ================================================================== */

/* --- Globalne dopieszczenie dotyku (iOS) --- */
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    overscroll-behavior-y: none;      /* brak „gumowego" odbicia całej strony */
    -webkit-text-size-adjust: 100%;
}
::selection { background: rgba(232, 146, 124, 0.28); }

/* Widoczny focus tylko przy nawigacji klawiaturą (nie psuje dotyku) */
:focus-visible {
    outline: 2px solid var(--c-primary-d);
    outline-offset: 2px;
}
.btn:focus-visible,
.chip:focus-visible { outline-offset: 3px; }

/* --- Topbar: subtelny „frosted glass" --- */
@supports (backdrop-filter: blur(10px)) {
    .topbar {
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: saturate(180%) blur(12px);
        -webkit-backdrop-filter: saturate(180%) blur(12px);
    }
}

/* --- Aktywny tab: kropka wskaźnika + wyraźniejsza ikona --- */
.tabbar__item { position: relative; transition: color .15s ease; }
.tabbar__item.is-active::before {
    content: "";
    position: absolute;
    top: 2px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--c-primary);
}
.tabbar__item:not(.tabbar__item--add):active { transform: scale(0.94); }
.tabbar__icon { transition: transform .15s ease; }
.tabbar__item.is-active .tabbar__icon { transform: translateY(-1px) scale(1.08); }

/* --- Karty i alerty: delikatne wejście --- */
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.card,
.idea-item,
.date-card { animation: rise .28s ease both; }

@keyframes pop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert { animation: pop .22s ease both; }

/* Delikatne „opóźnienie kaskadowe" dla list (pierwsze kilka elementów) */
.idea-list .idea-item:nth-child(2)  { animation-delay: .03s; }
.idea-list .idea-item:nth-child(3)  { animation-delay: .06s; }
.idea-list .idea-item:nth-child(4)  { animation-delay: .09s; }
.idea-list .idea-item:nth-child(5)  { animation-delay: .12s; }

/* --- Przyciski: mocniejsza reakcja na dotyk + cień primary --- */
.btn { transition: transform .06s ease, background .15s ease, box-shadow .15s ease; }
.btn--primary { box-shadow: 0 4px 14px rgba(232, 146, 124, 0.35); }
.btn--primary:active { box-shadow: 0 2px 8px rgba(232, 146, 124, 0.3); }
.btn:active { transform: translateY(1px) scale(0.985); }

/* --- Custom checkbox: mały „skok" przy zaznaczeniu --- */
@keyframes check-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}
.idea-item__check input:checked + .idea-item__box { animation: check-pop .25s ease; }

/* --- Galeria: wejście kafelków + reakcja na dotyk --- */
.gallery__item {
    animation: rise .3s ease both;
    transition: transform .12s ease;
}
.gallery__item:active { transform: scale(0.97); }

/* --- Logo na logowaniu: subtelne „bicie serca" --- */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14%      { transform: scale(1.12); }
    28%      { transform: scale(1); }
    42%      { transform: scale(1.08); }
    56%      { transform: scale(1); }
}
.login-card__logo {
    display: inline-block;
    animation: heartbeat 2.6s ease-in-out infinite;
}
.login-card { animation: rise .35s ease both; }

/* --- Pusta lista / stany: trochę oddechu --- */
.empty { padding: 22px 16px; }
.empty .btn { margin-top: 12px; }

/* --- Nagłówki sekcji: akcent pod H1 --- */
h1 { position: relative; }

/* ------------------------------------------------------------------ */
/*  Szanuj ustawienie „ogranicz ruch" (iOS: Dostępność → Ruch)         */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ================================================================== */
/*  KALENDARZ RANDEK                                                   */
/* ================================================================== */
.cal { margin-bottom: 18px; }

.cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.cal__nav {
    width: 44px; height: 44px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--c-primary-d);
    background: var(--c-surface);
    border: 1.5px solid var(--c-border);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}
.cal__nav:active { transform: scale(0.94); }
.cal__title { text-align: center; }
.cal__month {
    display: block;
    font-family: var(--font-brand);
    font-size: 1.9rem;
    line-height: 1.1;
    color: var(--c-primary-d);
}
.cal__year { font-size: 0.85rem; color: var(--c-muted); font-weight: 600; }

.cal__today-link {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}
.cal__weekdays span {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--c-muted);
    text-transform: uppercase;
}

.cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

/* Dzień = zaokrąglony (15px) kwadrat z obramówką w kolorze głównym */
.cal__day {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1.5px solid var(--c-primary);
    border-radius: 15px;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
}
.cal__day:active { transform: scale(0.95); }
.cal__num { line-height: 1; }

/* Dni z sąsiednich miesięcy — ledwo widoczne, nieaktywne */
.cal__day.is-out {
    color: var(--c-muted);
    border-color: var(--c-border);
    background: transparent;
    opacity: 0.45;
    cursor: default;
}

/* Dni przeszłe — bardziej szare */
.cal__day.is-past {
    color: var(--c-muted);
    background: #faf3f6;
    border-color: rgba(244, 163, 192, 0.4);
}

/* Dziś — mocniejszy odcień koloru dni */
.cal__day.is-today {
    color: #fff;
    background: var(--grad-love);
    border-color: var(--c-primary-d);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Wybrany dzień — pierścień akcentu */
.cal__day.is-selected {
    box-shadow: 0 0 0 3px var(--c-accent);
}

/* Kropka pod numerem gdy tego dnia jest randka */
.cal__dot {
    position: absolute;
    bottom: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--c-primary-d);
}
.cal__day.is-today .cal__dot { background: #fff; }
.cal__day.is-past  .cal__dot { background: var(--c-muted); }

/* --- Panel dnia --- */
.day-panel {
    animation: rise .25s ease both;
    margin-bottom: 12px;
}
.day-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.day-panel__title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--c-primary-d);
}

.day-list { display: flex; flex-direction: column; gap: 10px; }

/* Wiersz randki na liście dnia */
.date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 10px 12px;
    color: var(--c-text);
}
.date-row:active { transform: scale(0.99); }

.date-icon {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-surface-2);
}
.date-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.date-icon--heart { background: var(--c-surface-2); }
.date-icon__heart { width: 28px; height: 28px; }

.date-row__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.date-row__title { font-weight: 700; word-break: break-word; }
.date-row__time  { font-size: 0.8rem; color: var(--c-muted); }
.date-row__chev  { color: var(--c-primary); font-size: 1.4rem; flex: 0 0 auto; }

/* ================================================================== */
/*  KARTA RANDKI — zdjęcie główne, meta, galeria (rozszerzenia)        */
/* ================================================================== */
.detail__hero {
    margin: 4px 0 14px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--c-surface-2);
    box-shadow: var(--shadow-sm);
}
.detail__hero img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}
.detail__hero--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    background: var(--grad-love);
    opacity: 0.5;
}
.detail__hero-heart { width: 64px; height: 64px; }

.detail__meta {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.detail__meta li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--c-text);
}
.detail__meta-ico { flex: 0 0 auto; width: 22px; text-align: center; }

/* Zdjęcie główne — gwiazdka i przycisk „ustaw jako główne" */
.gallery__item.is-main {
    outline: 3px solid var(--c-primary);
    outline-offset: -3px;
}
.gallery__main-badge {
    position: absolute;
    top: 4px; left: 4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--grad-love);
    color: #fff;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.gallery__setmain {
    position: absolute;
    left: 4px; right: 4px; bottom: 4px;
    margin: 0;
}
.gallery__setmain-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 5px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--c-primary-d);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(2px);
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
}
.gallery__item:hover .gallery__setmain-btn,
.gallery__item:active .gallery__setmain-btn { opacity: 1; }
/* Na telefonie (bez hovera) pokaż przycisk zawsze */
@media (hover: none) {
    .gallery__setmain-btn { opacity: 1; }
}

/* ================================================================== */
/*  POMYSŁY — data + „Stwórz randkę"                                   */
/* ================================================================== */
.idea-item__date {
    font-size: 0.8rem;
    color: var(--c-primary-d);
    font-weight: 600;
}
.idea-item__create {
    align-self: flex-start;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: var(--grad-love);
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}
.idea-item__create:active { transform: scale(0.97); }

/* Inline dropzone w kreatorze randki (lżejszy niż na karcie) */
.uploader__drop--inline {
    padding: 16px;
    margin-bottom: 4px;
}

/* ================================================================== */
/*  LIGHTBOX — podgląd zdjęcia jako nakładka                          */
/* ================================================================== */
body.has-lightbox { overflow: hidden; }

/* Ukryty stan MUSI wygrać z display:flex poniżej (inaczej nakładka wisi zawsze). */
.lightbox[hidden] { display: none !important; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px);
    background: rgba(60, 40, 55, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: lb-fade .18s ease both;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: lb-zoom .2s ease both;
}
@keyframes lb-zoom { from { transform: scale(0.94); } to { transform: scale(1); } }

.lightbox__close {
    position: absolute;
    top: calc(var(--safe-top) + 12px);
    right: 14px;
    width: 42px; height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--c-text);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.lightbox__close:active { transform: scale(0.92); }
