/* =========================================================
   Zima w Mieście — SP 356
   Paleta: noc zimowa (granat) → lód (błękit) → śnieg (biel)
   ========================================================= */
:root {
    --navy-900: #071a2e;
    --navy-800: #0d2b49;
    --navy-700: #13395c;
    --blue-600: #14679f;
    --blue-500: #1d84c6;
    --blue-400: #3aa6e0;
    --ice-300: #8ed6f2;
    --ice-200: #bfe9f9;
    --frost-50: #f3f9fd;
    --frost-100: #e6f2fa;
    --white: #ffffff;
    --ink: #122438;
    --ink-soft: #34506b;
    --muted: #61798f;
    --line: #d8e7f2;
    --accent: #d7263d;
    --accent-soft: #fdeaed;
    --green: #35915a;
    --orange: #dd7d1a;
    --violet: #6c5bd4;
    --shadow-sm: 0 1px 2px rgba(10, 39, 66, .06), 0 1px 3px rgba(10, 39, 66, .08);
    --shadow-md: 0 10px 30px -12px rgba(10, 39, 66, .25);
    --shadow-lg: 0 30px 60px -30px rgba(7, 26, 46, .45);
    --radius: 16px;
    --radius-sm: 10px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--frost-50);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--navy-800); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.t-right { text-align: right; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-600); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--accent); }
.inline-form { display: inline; }
code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .87em; background: var(--frost-100); color: var(--blue-600);
    padding: .12em .4em; border-radius: 5px;
}

/* ---------- przyciski ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer; text-align: center;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: #fff; box-shadow: 0 10px 24px -12px rgba(29, 132, 198, .9);
}
.btn--primary:hover { color: #fff; background: linear-gradient(135deg, var(--blue-400), var(--blue-500)); }
.btn--ghost {
    background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn--outline { background: #fff; color: var(--blue-600); border-color: var(--line); }
.btn--outline:hover { border-color: var(--blue-400); color: var(--blue-600); box-shadow: var(--shadow-sm); }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: .5rem .95rem; font-size: .85rem; }

/* ---------- nagłówek ---------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 231, 242, .8);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .85rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo {
    width: 46px; height: 46px; border-radius: 12px; background: #fff;
    display: grid; place-items: center; box-shadow: var(--shadow-sm); overflow: hidden; flex: none;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: .95rem; letter-spacing: -.01em; }
.brand-text span { font-size: .78rem; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav-link {
    padding: .55rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 550;
    color: var(--ink-soft); transition: background .18s ease, color .18s ease;
}
.nav-link:hover { background: var(--frost-100); color: var(--blue-600); }
.nav-link.is-active { background: var(--navy-800); color: #fff; }
.nav-link--admin { border: 1px solid var(--line); margin-left: .4rem; }

.nav-toggle {
    display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 11px 10px;
    flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy-800); border-radius: 2px; }
.nav-toggle:not(.visually-hidden) + .main-nav { }

/* ---------- komunikaty ---------- */
.flash-wrap { padding-top: 1rem; }
/* toasty (komunikaty) — zawsze widoczne, niezależnie od przewinięcia */
.toast-stack {
    position: fixed; top: 1rem; right: 1rem; z-index: 400; display: grid; gap: .5rem;
    max-width: min(92vw, 400px);
}
.toast {
    display: flex; align-items: flex-start; gap: .6rem; padding: .75rem .9rem;
    border-radius: 12px; background: #fff; border: 1px solid var(--line);
    box-shadow: 0 18px 40px -20px rgba(9, 38, 63, .55); font-size: .88rem; color: var(--ink);
    animation: toast-in .25s ease both;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
.toast--success { background: #eefaf1; border-color: #bfe6cb; color: #14683f; }
.toast--error { background: #fdeeee; border-color: #f2c2c2; color: #8c1d1d; }
.toast--info { background: #eef7fd; border-color: #bfe0f5; color: #0c4a72; }
.toast-icon {
    flex: 0 0 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center;
    font-size: .72rem; font-weight: 800; background: currentColor; color: #fff;
}
.toast-icon::after { content: attr(data-x); }
.toast span:nth-child(2) { flex: 1 1 auto; }
.toast-close {
    background: none; border: 0; font-size: 1.1rem; line-height: 1; cursor: pointer;
    color: inherit; opacity: .55; padding: 0 .1rem;
}
.toast-close:hover { opacity: 1; }

/* mini-lista projektów Canvy w panelu tablicy */
.canva-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .2rem 0 .6rem; }
.canva-mini { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .5rem; }
.canva-mini-item {
    display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.canva-mini-thumb {
    flex: 0 0 54px; width: 54px; height: 40px; border-radius: 6px; overflow: hidden;
    background: var(--frost-100, #eef7fd); display: grid; place-items: center;
}
.canva-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.canva-mini-body { flex: 1 1 auto; min-width: 0; display: grid; gap: .1rem; }
.canva-mini-body strong {
    font-size: .88rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.canva-mini-actions { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }
@media (max-width: 560px) {
    .canva-mini-item { flex-wrap: wrap; }
    .canva-mini-actions { width: 100%; justify-content: flex-end; }
}

/* podgląd tablicy w panelu */
.admin-preview {
    border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
    background: #fff; box-shadow: var(--shadow-sm);
}
.admin-preview iframe { display: block; width: 100%; height: 560px; border: 0; }

.alert {
    border-radius: var(--radius-sm); padding: .85rem 1.1rem; margin-bottom: .75rem;
    font-size: .93rem; border: 1px solid var(--line); background: #fff;
}
.alert--success { background: #eefaf1; border-color: #bfe6cb; color: #1f6b3a; }
.alert--error { background: var(--accent-soft); border-color: #f5c2c9; color: #9c1526; }
.alert--warning { background: #fff7e8; border-color: #f5dcae; color: #8a5a10; }
.alert--info { background: var(--frost-100); border-color: var(--ice-200); color: var(--navy-700); }

/* ---------- hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1200px 420px at 15% -10%, rgba(58, 166, 224, .35), transparent 60%),
        radial-gradient(900px 380px at 85% 0%, rgba(142, 214, 242, .25), transparent 55%),
        linear-gradient(165deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--blue-600) 130%);
    color: #fff;
    padding: 3.5rem 0 0;
}
.hero-snow {
    position: absolute; inset: 0; pointer-events: none; opacity: .55;
    background-image:
        radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 70% 20%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 40% 70%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 85% 60%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 10% 80%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 55% 45%, #fff 50%, transparent 51%);
    background-size: 420px 320px, 380px 300px, 460px 340px, 520px 380px, 400px 300px, 600px 420px;
    animation: snowfall 26s linear infinite;
}
@keyframes snowfall {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 60px 320px, -50px 300px, 40px 340px, -40px 380px, 30px 300px, -60px 420px; }
}
.hero-inner {
    position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 3rem;
    align-items: center; padding-bottom: 3rem;
}
.hero-copy { max-width: 44rem; }
.hero-badge {
    display: inline-block; padding: .35rem .9rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ice-200); margin-bottom: 1.1rem;
}
.hero-title {
    font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -.035em;
    color: #fff; margin-bottom: .6rem; text-wrap: balance;
}
.hero-lead {
    font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ice-200);
    max-width: 38rem; margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.4rem; }
.hero-note { font-size: .82rem; color: rgba(191, 233, 249, .8); margin: 0; }

.hero-card {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 22px; padding: 1.6rem; text-align: center;
    backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
}
.hero-card-logo {
    width: 130px; height: 130px; margin: 0 auto 1rem; background: #fff;
    border-radius: 20px; display: grid; place-items: center; overflow: hidden;
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6);
}
.hero-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.hero-card-title { font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: .2rem; }
.hero-card-sub { font-size: .8rem; color: rgba(191, 233, 249, .85); margin-bottom: 1rem; }
.hero-card-stats { display: flex; justify-content: center; gap: 1.6rem; margin: 0; }
.hero-card-stats dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(191, 233, 249, .75); }
.hero-card-stats dd { margin: .15rem 0 0; font-size: 1.5rem; font-weight: 750; color: #fff; }

.hero-banner { position: relative; padding-bottom: 0; }
.hero-banner img {
    width: 100%; border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .5);
}

/* ---------- pasek tablic ---------- */
.boards-strip { background: #fff; border-bottom: 1px solid var(--line); }
.boards-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 0; }
.boards-label { font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line);
    background: var(--frost-50); color: var(--ink-soft); font-size: .85rem; font-weight: 550;
    transition: all .18s ease;
}
.chip:hover { border-color: var(--blue-400); color: var(--blue-600); background: #fff; }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip--sm { font-size: .78rem; padding: .28rem .7rem; }
.chip-count {
    font-size: .72rem; font-weight: 700; background: rgba(18, 36, 56, .08);
    padding: .05rem .4rem; border-radius: 999px; min-width: 1.4rem; text-align: center;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, .22); }

/* ---------- sekcja / karty ---------- */
.section { padding: 3.5rem 0 4.5rem; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.section-head { margin-bottom: 1.75rem; max-width: 46rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .4rem; }
.section-head p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 1.1rem; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ice-300); }
.card--pinned { border-left: 4px solid var(--accent); }
.card-media { margin: -1.4rem -1.5rem 1.1rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-body { min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.card-meta time { font-size: .78rem; color: var(--muted); }
.card-title { font-size: 1.15rem; margin-bottom: .4rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--blue-600); }
.card-excerpt { color: var(--ink-soft); font-size: .93rem; margin-bottom: .9rem; }
.card-link { font-weight: 600; font-size: .88rem; }

.tag {
    display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 6px;
    font-size: .72rem; font-weight: 650; letter-spacing: .02em;
    background: var(--frost-100); color: var(--blue-600); text-transform: uppercase;
}
.tag--blue { background: #e4f1fb; color: var(--blue-600); }
.tag--green { background: #e7f6ec; color: var(--green); }
.tag--orange { background: #fdf1e3; color: var(--orange); }
.tag--red { background: var(--accent-soft); color: var(--accent); }
.tag--violet { background: #efedfd; color: var(--violet); }
.tag--pin { background: var(--accent); color: #fff; }

/* ---------- sidebar ---------- */
.sidebar { display: grid; gap: 1rem; position: sticky; top: 96px; }
.panel {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.35rem 1.4rem; box-shadow: var(--shadow-sm);
}
.panel--contact { background: linear-gradient(160deg, #fff, var(--frost-100)); }
.panel-title { font-size: .95rem; font-weight: 700; margin-bottom: .7rem; }
.panel-text { font-size: .88rem; color: var(--ink-soft); }
.panel-list { list-style: none; padding: 0; margin: 0; font-size: .87rem; color: var(--ink-soft); }
.panel-list li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.panel-list li:last-child { border-bottom: 0; }
.panel-list--links a { display: flex; align-items: center; gap: .55rem; color: var(--ink-soft); }
.panel-list--links a:hover { color: var(--blue-600); }
.panel-count { margin-left: auto; font-size: .75rem; color: var(--muted); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue-500); display: inline-block; flex: none; }
.dot--blue { background: var(--blue-500); }
.dot--green { background: var(--green); }
.dot--orange { background: var(--orange); }
.dot--red { background: var(--accent); }
.dot--violet { background: var(--violet); }

.empty-state {
    background: #fff; border: 1px dashed var(--ice-300); border-radius: var(--radius);
    padding: 3rem 1.5rem; text-align: center;
}
.empty-icon { font-size: 2.5rem; margin-bottom: .5rem; color: var(--ice-300); }
.empty-state--sm { padding: 1.8rem 1.2rem; }
.empty-state--sm h3 { margin-bottom: .4rem; }

/* Treść nigdy nie wychodzi poza karty/kolumny — długie adresy i wyrazy się łamią. */
.prose, .rich-content, .board-intro, .card-title, .card-excerpt,
.page-hero-lead, .panel-text, .table td, .admin-nav-link {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.prose p, .prose li, .rich-content p, .rich-content li { hyphens: auto; }

/* ---------- podstrony ---------- */
.page-hero {
    background: linear-gradient(160deg, var(--navy-800), var(--blue-600));
    color: #fff; padding: 3rem 0 2.6rem;
}
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .4rem; text-wrap: balance; }
.breadcrumb { font-size: .82rem; color: rgba(191, 233, 249, .85); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255, 255, 255, .9); }
.breadcrumb span { margin: 0 .35rem; opacity: .7; }
.page-hero .card-meta { margin-bottom: .7rem; }
.page-hero--error { text-align: center; }
.error-code { font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 850; line-height: 1; opacity: .35; margin: 0; }
.error-text { color: var(--ice-200); margin: 0 0 1.5rem; }

.prose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.prose {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 2.2rem; box-shadow: var(--shadow-sm);
    color: var(--ink-soft); font-size: .96rem;
}
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6rem; }
.prose p:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: .3rem; }
.prose strong { color: var(--ink); }
.prose-figure { margin: 0 0 1.5rem; border-radius: var(--radius-sm); overflow: hidden; }
.prose-updated { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.prose--compact { padding: 1.1rem 1.2rem; font-size: .9rem; }
.prose-aside { display: grid; gap: 1rem; }

/* ---------- stopka ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .78); padding: 3rem 0 1.5rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; margin-bottom: .9rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .35rem; }
.footer-muted { font-size: .85rem; color: rgba(255, 255, 255, .6); max-width: 32rem; }
.footer-heading { color: #fff; font-weight: 650; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer-list li { padding: .22rem 0; }
.footer-list--plain li { color: rgba(255, 255, 255, .65); }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
    padding-top: 1.25rem; font-size: .8rem; color: rgba(255, 255, 255, .55);
}
.footer-bottom p { margin: 0; }

/* =========================================================
   PANEL ADMINISTRACYJNY
   ========================================================= */
.admin-body { background: var(--frost-50); }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.admin-sidebar {
    background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
    padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
    position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: .7rem; color: #fff; padding: .3rem .4rem; }
.admin-brand img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.admin-brand strong { display: block; font-size: .95rem; letter-spacing: .02em; }
.admin-brand small { font-size: .7rem; color: var(--ice-300); text-transform: uppercase; letter-spacing: .12em; }
.admin-nav { display: grid; gap: .2rem; }
.admin-nav-link {
    display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; border-radius: 10px;
    color: rgba(255, 255, 255, .75); font-size: .9rem; font-weight: 500;
}
.admin-nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav-link.is-active { background: rgba(58, 166, 224, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(142, 214, 242, .35); }
.admin-nav-icon { width: 1.15rem; text-align: center; opacity: .9; }
.admin-sidebar-foot { margin-top: auto; }
.admin-link-muted { color: rgba(255, 255, 255, .5); font-size: .82rem; }
.admin-link-muted:hover { color: #fff; }

.admin-main { padding: 1.6rem 2rem 3rem; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.admin-overline { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .15rem; }
.admin-title { font-size: 1.6rem; margin: 0; }
.admin-user { display: flex; align-items: center; gap: .7rem; }
.admin-user-name { font-weight: 600; font-size: .9rem; }
.admin-user-role { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .5rem; }
.admin-content { display: grid; gap: 1.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.stat-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .35rem; }
.stat-value { font-size: 1.9rem; font-weight: 780; margin: 0; letter-spacing: -.03em; color: var(--navy-800); }
.stat-sub { font-size: .78rem; color: var(--muted); margin: .25rem 0 0; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.admin-grid--aside { grid-template-columns: minmax(0, 1fr) 340px; }
.admin-aside { display: grid; gap: 1rem; }
.form-sep { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0 .2rem; }
.card-panel {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 1.25rem 1.35rem; box-shadow: var(--shadow-sm);
    /* panel nie może rozpychać strony: szerokie tabele przewijają się w środku */
    min-width: 0; overflow-x: auto;
}
.admin-content, .admin-grid, .admin-grid > * { min-width: 0; }
.card-panel--narrow { max-width: 640px; }
.card-panel--wide { max-width: 980px; }
.card-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-panel-head h2 { font-size: 1.08rem; margin: 0; }
.subhead { font-size: .95rem; margin: 1.4rem 0 .7rem; }
.stack { display: grid; gap: 1rem; }

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th {
    text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: .7rem .6rem; border-bottom: 1px solid var(--frost-100); vertical-align: top; }
.table tbody tr:hover { background: #fbfdff; }
.table--compact td, .table--compact th { padding: .45rem .5rem; font-size: .84rem; }
.row-expand td { border-bottom: 1px solid var(--line); padding-top: 0; }
.row-expand details summary { cursor: pointer; font-size: .8rem; color: var(--blue-600); }
.pill {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 650;
    border: 1px solid transparent; background: var(--frost-100); color: var(--ink-soft);
}
.pill--ok { background: #e7f6ec; color: #23744a; border-color: #c6e8d3; }
.pill--draft { background: #f1f4f7; color: #5f7285; border-color: #e0e7ed; }
.pill--bad { background: var(--accent-soft); color: #a01a2b; border-color: #f4c6cd; }
button.pill { cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; margin-bottom: 1rem; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.quick {
    display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--frost-50); color: var(--ink); font-weight: 550; font-size: .9rem;
}
.quick:hover { border-color: var(--blue-400); background: #fff; color: var(--blue-600); }
.quick span { font-size: 1.1rem; }

.feed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.feed-list li { display: flex; gap: .65rem; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-400); margin-top: .5rem; flex: none; }
.feed-text { margin: 0; font-size: .87rem; }
.feed-sub { margin: .1rem 0 0; font-size: .8rem; color: var(--muted); }
.feed-time { margin: .1rem 0 0; font-size: .74rem; color: var(--muted); }

.kv { display: grid; gap: .6rem; margin: 0 0 1rem; }
.kv > div { display: flex; gap: 1rem; font-size: .9rem; }
.kv dt { min-width: 110px; color: var(--muted); margin: 0; }
.kv dd { margin: 0; }

/* ---------- formularze ---------- */
.form { display: grid; gap: .95rem; }
.form--inline { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.form--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; align-items: end; padding: .8rem 0 .4rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field--grow { flex: 1 1 220px; }
.field--inline { min-width: 150px; }
.field-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.field-hint { font-size: .75rem; color: var(--muted); }
.input {
    width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-size: .9rem; background: #fff; color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(58, 166, 224, .18); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.input--file { padding: .45rem; background: var(--frost-50); }
.field-row { display: flex; gap: .9rem; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; }
.checkbox { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--blue-500); }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; padding-top: .4rem; }
.form-actions--sticky { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(243, 249, 253, .4), var(--frost-50)); padding: 1rem 0; }
.current-image { display: flex; align-items: center; gap: .8rem; }
.current-image img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- logowanie ---------- */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
    background:
        radial-gradient(900px 400px at 10% 0%, rgba(58, 166, 224, .3), transparent 60%),
        linear-gradient(165deg, var(--navy-900), var(--navy-800) 60%, var(--blue-600));
}
.auth-card {
    width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 2rem 2rem 1.6rem;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.auth-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.auth-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: var(--frost-50); padding: 3px; }
.auth-brand strong { display: block; font-size: .92rem; }
.auth-brand span { font-size: .78rem; color: var(--muted); }
.auth-title { font-size: 1.4rem; margin-bottom: .3rem; }
.auth-sub { font-size: .87rem; color: var(--muted); margin-bottom: 1.3rem; }
.auth-footer { margin: 1.2rem 0 0; font-size: .85rem; text-align: center; }

/* ---------- responsywność ---------- */
@media (max-width: 1080px) {
    .section-grid, .prose-wrap { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .admin-grid, .admin-grid--aside { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero-card { max-width: 340px; }
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar { position: static; height: auto; flex-direction: column; }
    .admin-nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .admin-main { padding: 1.2rem 1rem 2.5rem; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 1rem 1.1rem;
        flex-direction: column; align-items: stretch; box-shadow: var(--shadow-md);
    }
    .main-nav.is-open { display: flex; }
    .nav-link { padding: .7rem .8rem; }
    .nav-link--admin { margin-left: 0; }
    .header-inner { position: relative; min-height: 66px; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .prose { padding: 1.4rem 1.2rem; }
    .section { padding: 2.5rem 0 3rem; }
    .hero { padding-top: 2.4rem; }
    .admin-topbar { flex-direction: column; }
}

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

/* atrybut hidden musi działać mimo display:flex w klasach */
[hidden] { display: none !important; }

/* ---------- Canva (panel) ---------- */
.canva-head { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.canva-head-main { display: flex; gap: 1rem; align-items: flex-start; }
.canva-logo {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-weight: 700; font-size: 1.5rem; color: #fff;
    background: linear-gradient(135deg, #00c4cc 0%, #7d2ae8 100%);
    box-shadow: 0 8px 20px rgba(125, 42, 232, .28);
}
.canva-head-status .badge { font-size: .74rem; }
.badge--ok { background: #e3f6ec; color: #17734a; }
.badge--warn { background: #fdecd8; color: #8a4b00; }
.badge--muted { background: #eef3f8; color: #516479; }

.canva-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.canva-actions-right { display: flex; align-items: center; gap: .6rem; }
.canva-search { display: flex; align-items: center; gap: .5rem; flex: 1 1 320px; max-width: 520px; }
.canva-search .input { flex: 1 1 auto; }

.canva-grid {
    display: grid; gap: 1rem; margin-top: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.canva-card {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: #fff; display: flex; flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.canva-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.canva-thumb { aspect-ratio: 4 / 3; background: #f1f6fb; display: grid; place-items: center; overflow: hidden; }
.canva-thumb img { width: 100%; height: 100%; object-fit: cover; }
.canva-thumb-empty { font-size: .78rem; color: #8598ab; }
.canva-card-title {
    font-size: .92rem; margin: .7rem .8rem .2rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.canva-card-meta { font-size: .76rem; color: var(--muted); margin: 0 .8rem .7rem; }
.canva-card-actions { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 .8rem .8rem; margin-top: auto; }
.canva-more { margin-top: 1.2rem; }

.canva-design-preview { display: flex; gap: 1rem; align-items: center; margin: 1rem 0 1.4rem; }
.canva-design-preview img { width: 190px; border-radius: 12px; border: 1px solid var(--line); }
.canva-design-preview h3 { margin: 0 0 .3rem; }

.canva-created { padding: .9rem 1rem; background: #f5f9fd; border-radius: 12px; margin: 1rem 0; }

.canva-hero-preview { display: flex; flex-direction: column; gap: .7rem; margin-top: .8rem; }
.canva-hero-preview img { width: 100%; max-width: 720px; border-radius: 12px; border: 1px solid var(--line); }

.canva-exports { display: grid; gap: .9rem; margin-top: 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.canva-export { margin: 0; }
.canva-export img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.canva-export figcaption { display: flex; flex-direction: column; font-size: .74rem; color: var(--muted); margin-top: .35rem; }
.canva-export figcaption strong { color: var(--ink); font-size: .8rem; }

/* okładki tablic */
.board-cover { margin: 0 0 1.4rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.board-cover img { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.board-cover-thumb { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }

/* lista kontrolna konfiguracji Canva */
.checklist { margin: 1rem 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; background: #f7fbfe; }
.checklist summary { cursor: pointer; font-weight: 600; font-size: .88rem; }
.checklist-steps { margin: .8rem 0 0; padding-left: 1.2rem; font-size: .86rem; line-height: 1.6; }
.checklist-steps li { margin-bottom: .5rem; }
.checklist-steps code { word-break: break-all; }

.canva-edit-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 .2rem; }

/* =========================================================
   Redesign strony głównej (2026-11-08)
   Baner z Canvy ma własną „ramę”, tekst siedzi w osobnym pasku
   pod nim — nic się nie nakłada i nic nie konkuruje z grafiką.
   ========================================================= */

/* --- 1. Masthead: baner jako główna grafika strony --- */
.masthead {
    background:
        radial-gradient(900px 320px at 50% -40%, rgba(58, 166, 224, .16), transparent 65%),
        linear-gradient(180deg, var(--frost-100) 0%, #fbfdff 100%);
    padding: 1.8rem 0 2rem;
    border-bottom: 1px solid var(--line);
}
.masthead-frame {
    margin: 0;
    padding: 8px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(216, 231, 242, .95);
    box-shadow: 0 26px 55px -30px rgba(7, 26, 46, .55);
}
.masthead-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* --- 3. Dopracowanie reszty strony --- */
.boards-strip {
    background: #fff;
    box-shadow: 0 10px 24px -22px rgba(7, 26, 46, .6);
    position: relative;
    z-index: 1;
}
.boards-inner { padding: 1rem 0; }
.chip { background: #fff; }
.chip:hover { transform: translateY(-1px); }

.section { padding: 3.6rem 0 4.6rem; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { letter-spacing: -.028em; }
.section-head p { font-size: .95rem; line-height: 1.65; }

.card { padding: 0; overflow: hidden; }
.card-body { padding: 1.3rem 1.45rem 1.45rem; }
.card-media { margin: 0; border-radius: 0; }
.card-media img { height: auto; aspect-ratio: 16 / 9; }
.card--pinned { border-left: 0; box-shadow: inset 4px 0 0 var(--accent), var(--shadow-sm); }
.card--pinned:hover { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-md); }
.card-title { font-size: 1.18rem; letter-spacing: -.015em; }

.sidebar { top: 100px; }
.panel-title { letter-spacing: -.01em; }

@media (max-width: 640px) {
    .masthead { padding: 1rem 0 1.3rem; }
    .masthead-frame { padding: 5px; border-radius: 18px; }
    .masthead-frame img { border-radius: 14px; }
    .card-body { padding: 1.1rem 1.15rem 1.25rem; }
}

/* --- 4. Karty ogłoszeń: układ redakcyjny (obraz + treść obok siebie) --- */
.card--pinned { box-shadow: inset 0 4px 0 var(--accent), var(--shadow-sm); }
.card--pinned:hover { box-shadow: inset 0 4px 0 var(--accent), var(--shadow-md); }

@media (min-width: 900px) {
    .cards .card:has(.card-media) {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: stretch;
    }
    .cards .card:has(.card-media) .card-media { height: 100%; }
    .cards .card:has(.card-media) .card-media img {
        height: 100%; min-height: 240px; aspect-ratio: auto; object-fit: cover;
    }
    .cards .card:has(.card-media) .card-body {
        padding: 1.55rem 1.75rem; display: flex; flex-direction: column;
    }
    .cards .card:has(.card-media) .card-title { font-size: 1.3rem; }
    .cards .card:has(.card-media) .card-link { margin-top: auto; }
    .cards .card:has(.card-media) .card-excerpt { max-width: 48ch; }
}

/* --- 5. Sekcja ogłoszeń: mocniejszy nagłówek --- */
.section-head h2 { position: relative; padding-left: 0; }
.section-head p { color: var(--ink-soft); }

/* --- 6. Etykieta sekcji --- */
.section-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    margin: 0 0 .55rem; font-size: .74rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--blue-500);
}
.section-eyebrow-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 0 3px rgba(29, 132, 198, .14);
}

/* ---------- strona tablicy ---------- */
.page-hero--board { padding-bottom: 2.2rem; }
.page-hero-lead {
    color: var(--ice-200); font-size: 1.02rem; max-width: 44rem; margin: .2rem 0 .8rem;
}
.page-hero-meta {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .78rem; color: rgba(191, 233, 249, .8); margin: 0;
    padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}
.section-eyebrow--light { color: var(--ice-200); margin-bottom: .65rem; }
.section-eyebrow--light .section-eyebrow-dot { box-shadow: 0 0 0 3px rgba(142, 214, 242, .18); }

.board-cover--wide { margin-top: 1.8rem; margin-bottom: -.6rem; }
.board-cover--wide img { max-height: 320px; }

.panel-list--links a.is-current { color: var(--blue-600); font-weight: 650; }

/* nawigacja: dużo zakładek musi się mieścić w jednej linii */
.main-nav { flex-wrap: wrap; justify-content: flex-end; }
.nav-link { white-space: nowrap; }

/* nawigacja z 5 zakładkami: ciaśniejsze odstępy na średnich ekranach */
@media (min-width: 761px) and (max-width: 1140px) {
    .header-inner { gap: 1rem; }
    .nav-link { padding: .5rem .62rem; font-size: .85rem; }
    .main-nav { gap: .15rem; }
    .brand-text span { display: none; }
}

/* ---------- edytor WYSIWYG (Quill) ---------- */
.rich-editor { border-radius: 12px; overflow: hidden; }
.rich-editor .ql-toolbar.ql-snow {
    border: 1px solid var(--line); border-bottom: 0;
    border-radius: 12px 12px 0 0; background: #f7fbfe; padding: 6px 8px;
    font-family: var(--font);
}
.rich-editor .ql-container.ql-snow {
    border: 1px solid var(--line); border-radius: 0 0 12px 12px;
    background: #fff; font-family: var(--font); font-size: .95rem;
}
.rich-editor .ql-editor { min-height: 240px; line-height: 1.65; color: var(--ink); }
.rich-editor .ql-editor.ql-blank::before { color: #93a6b8; font-style: normal; }
.rich-editor .ql-snow .ql-stroke { stroke: #3d566e; }
.rich-editor .ql-snow .ql-fill { fill: #3d566e; }
.rich-editor .ql-snow .ql-picker { color: #3d566e; }
.rich-editor .ql-editor h2 { font-size: 1.35rem; }
.rich-editor .ql-editor h3 { font-size: 1.15rem; }

/* czcionki dostępne w edytorze (klasy Quill) */
.ql-font-arial { font-family: Arial, Helvetica, sans-serif; }
.ql-font-georgia { font-family: Georgia, "Times New Roman", serif; }
.ql-font-verdana { font-family: Verdana, Geneva, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before { content: "Arial"; font-family: Arial, Helvetica, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before { content: "Georgia"; font-family: Georgia, serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="verdana"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="verdana"]::before { content: "Verdana"; font-family: Verdana, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { content: "Serif"; font-family: Georgia, serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { content: "Mono"; font-family: monospace; }
.rich-editor .ql-picker.ql-font .ql-picker-label::before { content: "Czcionka"; }
.rich-editor .ql-picker.ql-size .ql-picker-label::before { content: "Rozmiar"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { content: "Mały"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { content: "Duży"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { content: "Bardzo duży"; }

/* treść wyrenderowana na stronie */
.rich-content { color: var(--ink-soft); font-size: .96rem; }
.rich-content h2 { font-size: 1.35rem; margin: 1.4rem 0 .6rem; }
.rich-content h3 { font-size: 1.15rem; margin: 1.2rem 0 .5rem; }
.rich-content ul, .rich-content ol { padding-left: 1.25rem; }
.rich-content li { margin-bottom: .3rem; }
.rich-content blockquote {
    margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid var(--ice-300);
    background: var(--frost-50); border-radius: 0 10px 10px 0; color: var(--ink-soft);
}
.rich-content a { text-decoration: underline; }
.ql-size-small { font-size: .75em; }
.ql-size-large { font-size: 1.5em; }
.ql-size-huge { font-size: 2em; }
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

.layout-choice--buttons { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.layout-option--action {
    text-align: left; font: inherit; cursor: pointer; position: relative;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.layout-option--action:hover:not(:disabled) { border-color: var(--blue-600); transform: translateY(-2px); box-shadow: 0 12px 24px -18px rgba(12, 46, 84, .8); }
.layout-option--action:active:not(:disabled) { transform: translateY(0); }
.layout-option--action.is-active { border-color: #1f9d63; background: #f1fbf6; box-shadow: 0 0 0 2px rgba(31, 157, 99, .16); }
.layout-option--action.is-active strong { color: #14683f; }
.layout-option--action:disabled { opacity: .5; cursor: not-allowed; }
.layout-option--action:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.layout-option-mark {
    flex: 0 0 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center;
    font-size: .8rem; font-weight: 800; background: var(--frost-100, #eef7fd); color: var(--navy-700, #0c2e54);
    border: 1px solid var(--line);
}
.layout-option--action.is-active .layout-option-mark { background: #1f9d63; border-color: #1f9d63; color: #fff; }
.layout-choice--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.layout-choice--compact .layout-option { padding: .6rem .75rem; }
.layout-choice--compact .layout-option strong { font-size: .86rem; }
.layout-choice--compact .layout-option em { font-size: .76rem; }
.board-layout-field[hidden] { display: none; }
.board-context {
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem;
    margin-top: .45rem; padding: .5rem .7rem; font-size: .82rem; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #fbfdff;
}
.board-context strong { color: var(--ink); }

/* szybki start na pulpicie */
.quicksteps { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; font-size: .88rem; color: var(--ink-soft); line-height: 1.55; }
.quicksteps strong { color: var(--ink); }

.row-actions {
    display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: flex-end;
    min-width: 15rem;
}
.row-actions form { margin: 0; }
.btn--danger-outline { background: #fff; border: 1px solid #e0a5a5; color: #8c1d1d; }
.btn--danger-outline:hover { background: #fdeeee; border-color: #b55252; color: #8c1d1d; }

/* szybkie akcje administratora przy wpisie (na stronach publicznych) */
.card, .live-tile { position: relative; }
.entry-admin {
    position: absolute; top: .5rem; right: .5rem; z-index: 5;
    display: flex; gap: .3rem; align-items: center;
    opacity: 0; transform: translateY(-4px); transition: opacity .18s ease, transform .18s ease;
}
.card:hover .entry-admin, .live-tile:hover .entry-admin,
.entry-admin:focus-within { opacity: 1; transform: none; }
@media (hover: none) {
    .entry-admin { opacity: 1; transform: none; }
}
.entry-admin form { margin: 0; }
.entry-admin-btn {
    display: inline-flex; align-items: center; gap: .3rem; cursor: pointer;
    padding: .3rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700;
    border: 1px solid rgba(12, 46, 84, .18); background: rgba(255, 255, 255, .96);
    color: var(--navy-800, #0b2b4d); box-shadow: 0 6px 16px -10px rgba(9, 38, 63, .8);
    text-decoration: none;
}
.entry-admin-btn:hover { background: #fff; color: var(--blue-600); border-color: var(--blue-600); text-decoration: none; }
.entry-admin-btn--danger { color: #8c1d1d; border-color: rgba(140, 29, 29, .2); }
.entry-admin-btn--danger:hover { background: #fdeeee; color: #8c1d1d; border-color: #e0a5a5; }
.live-tile .entry-admin-btn { background: rgba(255, 255, 255, .92); }
@media (max-width: 560px) {
    .entry-admin-text { display: none; }
    .entry-admin-btn { padding: .34rem .5rem; }
}

/* pasek administratora na stronach publicznych (widoczny po zalogowaniu) */
.admin-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
    padding: .45rem 1rem; background: #0b2b4d; color: #fff; font-size: .82rem;
    position: sticky; top: 0; z-index: 60;
}
.admin-bar-label { letter-spacing: .1em; text-transform: uppercase; font-size: .68rem; color: rgba(191,233,249,.8); }
.admin-bar-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }
.admin-bar-btn {
    display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem;
    border-radius: 999px; border: 1px solid rgba(191,233,249,.35);
    color: #e2f4fc; background: rgba(255,255,255,.06); text-decoration: none; font-size: .8rem;
}
.admin-bar-btn:hover { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.admin-bar-btn--primary { background: #7fe0b0; border-color: #7fe0b0; color: #06223c; font-weight: 700; }
.admin-bar-btn--primary:hover { background: #9debc5; color: #06223c; }

/* ============ wbudowana interaktywna tablica (.live) ============ */
.live {
    position: relative; overflow: hidden; border-radius: var(--radius);
    background: linear-gradient(165deg, #0b2b4d 0%, #12456f 45%, #1b6ca8 100%);
    color: #fff; padding: 2rem 1.35rem 1.6rem;
    box-shadow: 0 30px 60px -40px rgba(9, 38, 63, .9);
    isolation: isolate;
}
@media (min-width: 720px) {
    .live { padding: 2.6rem 2.2rem 2rem; }
}

/* śnieg w tle */
.live-sky { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .75; }
.live-flake {
    position: absolute; top: -12%;
    width: 7px; height: 7px; border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, rgba(255,255,255,.35) 60%, transparent 70%);
    animation: live-fall 12s linear infinite;
}
.live-flake--1 { left: 8%;  animation-duration: 11s; animation-delay: -1s;  transform: scale(.9); }
.live-flake--2 { left: 24%; animation-duration: 15s; animation-delay: -6s;  width: 5px; height: 5px; }
.live-flake--3 { left: 41%; animation-duration: 9s;  animation-delay: -3s;  width: 9px; height: 9px; }
.live-flake--4 { left: 63%; animation-duration: 14s; animation-delay: -8s; }
.live-flake--5 { left: 78%; animation-duration: 10s; animation-delay: -4s;  width: 5px; height: 5px; }
.live-flake--6 { left: 91%; animation-duration: 16s; animation-delay: -11s; width: 8px; height: 8px; }
@keyframes live-fall {
    0%   { transform: translate3d(0, -10%, 0) scale(.85); opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translate3d(28px, 1150%, 0) scale(1.05); opacity: 0; }
}

.live-inner { position: relative; z-index: 1; }

.live-head { max-width: 52rem; }
.live-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
    color: rgba(191, 233, 249, .92); margin: 0 0 .55rem;
}
.live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #7fe0b0;
    box-shadow: 0 0 0 0 rgba(127, 224, 176, .7);
    animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(127, 224, 176, .55); }
    70%  { box-shadow: 0 0 0 10px rgba(127, 224, 176, 0); }
    100% { box-shadow: 0 0 0 0 rgba(127, 224, 176, 0); }
}
.live-title {
    font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.1; margin: 0 0 .5rem;
    color: #fff; text-wrap: balance;
}
.live-sub { margin: 0 0 1rem; color: rgba(226, 244, 252, .86); font-size: .95rem; }

.live-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
    margin: 0 0 1.35rem;
}
.live-search { flex: 1 1 220px; max-width: 300px; }
.live-search input {
    width: 100%; padding: .55rem .85rem; border-radius: 999px; border: 1px solid rgba(191,233,249,.35);
    background: rgba(255, 255, 255, .1); color: #fff; font-size: .88rem;
}
.live-search input::placeholder { color: rgba(226, 244, 252, .6); }
.live-search input:focus {
    outline: none; border-color: #7fe0b0; background: rgba(255, 255, 255, .16);
    box-shadow: 0 0 0 3px rgba(127, 224, 176, .22);
}
.live-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.live-chip {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    padding: .45rem .85rem; border-radius: 999px; font-size: .82rem;
    border: 1px solid rgba(191, 233, 249, .3); background: rgba(255, 255, 255, .06); color: #e2f4fc;
}
.live-chip span { font-size: .72rem; opacity: .7; }
.live-chip:hover { background: rgba(255, 255, 255, .14); }
.live-chip.is-active { background: #fff; color: var(--navy-800, #0b2b4d); border-color: #fff; font-weight: 700; }

.live-art { margin: 0 0 1.4rem; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); }
.live-art img { display: block; width: 100%; max-height: 340px; object-fit: cover; }

.live-grid {
    list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem;
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 700px) {
    .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.live-tile {
    animation: live-tile-in .55s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 65ms);
}
@keyframes live-tile-in {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.live-tile-link {
    display: flex; flex-direction: column; gap: .45rem; height: 100%;
    padding: 1rem 1.1rem 1.05rem; border-radius: 14px; color: #fff;
    background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(3px);
    transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.live-tile-link:hover,
.live-tile-link:focus-visible {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, .16);
    border-color: rgba(127, 224, 176, .8);
    box-shadow: 0 18px 34px -22px rgba(0, 0, 0, .85);
    text-decoration: none;
}
.live-tile-link:focus-visible { outline: 2px solid #7fe0b0; outline-offset: 2px; }

.live-tile.is-pinned .live-tile-link { border-color: rgba(127, 224, 176, .55); }

.live-tile-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.live-tile-top time { font-size: .74rem; letter-spacing: .06em; color: rgba(191, 233, 249, .9); }
.live-badge {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800;
    padding: .18rem .5rem; border-radius: 999px; color: #06223c; background: #7fe0b0;
}
.live-tile-title { font-size: 1.03rem; line-height: 1.3; color: #fff; }
.live-tile-text { font-size: .86rem; line-height: 1.5; color: rgba(226, 244, 252, .82); }
.live-tile-text p { margin: 0; }
.live-tile-cta {
    margin-top: auto; padding-top: .35rem; font-size: .8rem; font-weight: 700;
    color: #7fe0b0; display: inline-flex; align-items: center; gap: .35rem;
}
.live-tile-link:hover .live-tile-cta span { transform: translateX(3px); }
.live-tile-cta span { transition: transform .2s ease; }

.live-empty, .live-none {
    margin: 0; padding: 1.6rem; text-align: center; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .3);
    color: rgba(226, 244, 252, .9); font-size: .9rem;
}
.live-empty span { display: block; font-size: 1.8rem; margin-bottom: .35rem; opacity: .8; }
.live-tile[hidden], .live-none[hidden] { display: none; }

.live-foot {
    margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .18);
    color: rgba(226, 244, 252, .85); font-size: .9rem;
}
.live-foot a { color: #fff; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .live-flake, .live-dot, .live-tile { animation: none !important; }
    .live-tile-link, .live-tile-cta span { transition: none; }
    .live-tile-link:hover { transform: none; }
}

/* kompaktowy hero tablicy — jeszcze niższy (50% poprzedniej wysokości) */
.page-hero--board { padding: .45rem 0 .45rem; }
.page-hero--board .container { max-width: 1180px; }
.page-hero--board h1 { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.15; margin: 0; }
.page-hero--board .breadcrumb { margin: 0 0 .1rem; font-size: .66rem; line-height: 1.1; }
.page-hero--board .page-hero-lead {
    font-size: .74rem; line-height: 1.25; margin: .1rem 0 0; max-width: 68rem; color: rgba(191, 233, 249, .9);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.page-hero--board + .section, .page-hero--board + .container + .section { padding-top: 1rem; }

/* wybór wyglądu tablicy w panelu */
.layout-choice { display: grid; gap: .6rem; }
.layout-option {
    display: flex; gap: .7rem; align-items: flex-start; padding: .8rem .95rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer;
}
.layout-option:has(input:checked) { border-color: var(--blue-600); box-shadow: 0 0 0 2px rgba(27, 108, 168, .12); }
.layout-option input { margin-top: .25rem; flex: 0 0 auto; }
.layout-option strong { display: block; font-size: .93rem; color: var(--ink); }
.layout-option em { font-style: normal; font-size: .82rem; color: var(--muted); line-height: 1.45; }

/* interaktywna tablica (iframe) */
.board-interactive {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-md, 0 18px 40px -28px rgba(9, 38, 63, .55));
}
.board-interactive iframe {
    display: block; width: 100%; height: min(84vh, 1100px); min-height: 520px; border: 0; background: #fff;
}
.board-interactive-bar {
    display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
    padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--frost-50, #f7fbfd);
    font-size: .82rem; color: var(--muted);
}
.current-package { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: .5rem; }

/* instrukcja + podgląd interaktywnej tablicy w panelu */
.howto {
    background: var(--frost-100, #eef7fd); border: 1px solid var(--ice-200, #bfe9f9);
    border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin: .2rem 0 1.1rem;
}
.howto-title { margin: 0 0 .5rem; font-weight: 700; font-size: .9rem; color: var(--navy-700, #0c2e54); }
.howto-list { margin: 0; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }
.howto-list li { margin-bottom: .45rem; }
.howto-list li:last-child { margin-bottom: 0; }
.howto-list code { font-size: .82rem; }
.preview-pane { margin-top: .4rem; }
.preview-pane-title { font-size: .84rem; font-weight: 700; color: var(--ink); margin: 0 0 .5rem; }
.board-interactive--preview iframe { height: min(70vh, 760px); min-height: 420px; }

/* tablica prowadzona jako jedna grafika (Canva / plik) */
.section--canvas { padding-top: 1.6rem; }
.board-canvas {
    margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    max-width: var(--board-scale, 60%);
    padding: .6rem; box-shadow: var(--shadow-md, 0 18px 40px -28px rgba(9, 38, 63, .55));
}
.board-canvas video { display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 6px); background: #f4f8fb; }
/* nakładka: klikalne przyciski na grafice tablicy */
.board-canvas-media { position: relative; display: block; line-height: 0; }
.board-hotspot {
    position: absolute; display: inline-flex; align-items: center; justify-content: center;
    padding: .45rem .8rem; border-radius: 999px; text-decoration: none;
    background: rgba(11, 43, 77, .82); color: #fff; font-size: .82rem; font-weight: 700;
    line-height: 1.2; border: 1px solid rgba(127, 224, 176, .9);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .9);
    backdrop-filter: blur(2px);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.board-hotspot:hover, .board-hotspot:focus-visible {
    background: #1f9d63; color: #fff; text-decoration: none;
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .95);
}
.board-hotspot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.board-hotspot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-hotspot--bare {
    background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none;
    transform: none; transition: background .18s ease, border-color .18s ease;
}
.board-hotspot--bare:hover, .board-hotspot--bare:focus-visible {
    background: rgba(31, 157, 99, .16); border-color: rgba(31, 157, 99, .85);
    transform: none; box-shadow: none;
}
@media (max-width: 719px) {
    .board-hotspot { font-size: .7rem; padding: .35rem .6rem; }
}

/* wizualny edytor hotspotów: scena z grafiką + przeciągane prostokąty */
.hs-stage {
    position: relative; display: block; margin: .5rem 0 .6rem; max-width: 520px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
    background: #f5f9fc; touch-action: none; user-select: none;
}
.hs-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.hs-stage--empty { padding: 1.2rem; text-align: center; }
.hs-stage-empty { margin: 0; font-size: .84rem; color: var(--muted); }

.hs-box {
    position: absolute; border: 2px dashed rgba(31, 157, 99, .85);
    background: rgba(31, 157, 99, .14); border-radius: 4px; cursor: move;
}
.hs-box.is-selected { border-style: solid; background: rgba(31, 157, 99, .24); box-shadow: 0 0 0 2px rgba(31, 157, 99, .25); }
.hs-box-caption {
    position: absolute; left: 0; top: -1.35rem; white-space: nowrap; font-size: .68rem; font-weight: 700;
    color: #14683f; background: #eafaf1; border: 1px solid rgba(31, 157, 99, .4);
    border-radius: 999px; padding: .05rem .4rem; pointer-events: none;
}
.hs-box-handle {
    position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px;
    background: #1f9d63; border: 2px solid #fff; cursor: nwse-resize; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.hotspot-row.is-selected { background: #f1fbf6; border-radius: 8px; box-shadow: 0 0 0 2px rgba(31,157,99,.2); }
.hs-legend {
    display: flex; gap: .35rem; align-items: center; font-size: .7rem; color: var(--muted);
    margin: -.2rem 0 .5rem;
}
.hs-legend span { width: 68px; text-align: center; font-weight: 700; color: var(--ink-soft); }
.hs-legend em { font-style: normal; flex: 1 1 auto; }

/* edytor hotspotów w panelu */
.hotspot-rows { display: grid; gap: .4rem; margin: .3rem 0 .5rem; }
.hotspot-row {
    display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(150px, 2fr) 68px 68px 68px auto;
    gap: .35rem; align-items: center;
}
.hotspot-row .input--num { text-align: center; }
@media (max-width: 820px) {
    .hotspot-row { grid-template-columns: 1fr 1fr; }
    .hotspot-row > :nth-child(1), .hotspot-row > :nth-child(2) { grid-column: 1 / -1; }
}

.board-canvas img {
    display: block; width: 100%; height: auto; border-radius: calc(var(--radius) - 6px);
    background: #f4f8fb;
}
.board-canvas-note {
    margin: .9rem 0 0; font-size: .84rem; color: var(--muted); display: flex;
    flex-wrap: wrap; gap: .35rem 1rem; justify-content: space-between; align-items: baseline;
}
.board-canvas-others { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.board-canvas-others a { text-decoration: underline; }

@media (min-width: 900px) {
    .board-canvas { padding: .9rem; }
}
/* na telefonie grafika zawsze na całą szerokość — 60% byłoby nieczytelne */
@media (max-width: 719px) {
    .board-canvas { max-width: 100%; }
}

/* wstęp tablicy z edytora */
.board-intro {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.35rem 1.5rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm);
}
.board-intro > :first-child { margin-top: 0; }
.board-intro > :last-child { margin-bottom: 0; }

/* przy 6+ zakładkach wracamy do menu hamburgerowego już od 1024 px */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 1rem 1.1rem;
        flex-direction: column; align-items: stretch; box-shadow: var(--shadow-md);
    }
    .main-nav.is-open { display: flex; }
    .nav-link { padding: .7rem .8rem; white-space: normal; }
    .header-inner { position: relative; min-height: 66px; }
}

/* kompaktowy edytor inline (krótkie teksty, zajawki) */
.rich-editor--inline .ql-editor { min-height: 72px; }
.rich-editor--inline .ql-toolbar.ql-snow { padding: 4px 6px; }

/* ---------- zapisy na akcję (strona chroniona hasłem) ---------- */
.container--narrow { width: min(780px, 100% - 40px); margin-inline: auto; }

.signup-gate .form { max-width: 360px; }
.signup-gate .btn { justify-self: start; }

.signup-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin-bottom: 1.1rem; flex-wrap: wrap;
}

.field--full { grid-column: 1 / -1; }
.field--error .input { border-color: #d05a67; box-shadow: 0 0 0 3px rgba(208, 90, 103, .14); }
.field-hint--error { color: #a01a2b; font-weight: 600; }
.req { color: #a01a2b; }

.turnus-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .7rem; margin-top: .15rem;
}
.turnus-card {
    position: relative; display: grid; gap: .2rem; padding: .8rem .9rem;
    border: 1px solid var(--line); border-radius: 12px; background: #fff;
    cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.turnus-card:hover { border-color: var(--blue-400); transform: translateY(-1px); }
.turnus-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.turnus-card:has(input:checked) {
    border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(35, 114, 190, .16);
    background: linear-gradient(180deg, #f6fbff, #fff);
}
.turnus-card:has(input:focus-visible) { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.turnus-name { font-weight: 700; font-size: .92rem; color: var(--ink); }
.turnus-dates { font-size: .82rem; color: var(--muted); }

.btn--submit { justify-self: start; padding-inline: 1.8rem; }

.signup-embed {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow-sm);
}
/* Wysokość = pełna treść formularza (bez wewnętrznego paska przewijania).
   Na wąskich ekranach treść zawija się na więcej linii, stąd mnożnik 1.15. */
.signup-embed iframe { display: block; width: 100%; height: var(--embed-h, 1140px); border: 0; }

@media (max-width: 600px) {
    .signup-embed iframe { height: calc(var(--embed-h, 1140px) * 1.15); }
}

/* ---------- baner zgód na cookies ---------- */
body.cookie-lock { overflow: hidden; }

.cookie-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(7, 26, 46, .0), rgba(7, 26, 46, .18));
    animation: cookie-rise .35s ease-out both;
}
.cookie-bar-inner {
    width: min(1180px, 100%);
    margin-inline: auto;
    display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
    padding: 1.1rem 1.3rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.cookie-bar-text { flex: 1 1 420px; min-width: 0; }
.cookie-bar-title { font-size: 1.02rem; font-weight: 750; color: var(--ink); margin-bottom: .3rem; }
.cookie-bar-desc { font-size: .87rem; line-height: 1.55; color: var(--ink-soft); }
.cookie-bar-desc a { color: var(--blue-600); text-decoration: underline; }
.cookie-bar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.cookie-bar-actions .btn { white-space: nowrap; }

@keyframes cookie-rise {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* panel ustawień */
.cookie-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1rem; }
.cookie-modal[hidden] { display: none; }
.cookie-modal-backdrop { position: absolute; inset: 0; background: rgba(7, 26, 46, .55); backdrop-filter: blur(2px); }
.cookie-modal-dialog {
    position: relative; width: min(660px, 100%); max-height: min(88vh, 780px);
    display: flex; flex-direction: column;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.cookie-modal-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.3rem .9rem; border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--frost-50), #fff);
}
.cookie-modal-overline {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
    font-weight: 700; color: var(--blue-600); margin-bottom: .25rem;
}
.cookie-modal-title { font-size: 1.12rem; font-weight: 750; color: var(--ink); }
.cookie-modal-x {
    width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; color: var(--ink-soft); font-size: .95rem; cursor: pointer;
}
.cookie-modal-x:hover { border-color: var(--blue-400); color: var(--blue-600); }

.cookie-modal-body { padding: 1.1rem 1.3rem; overflow-y: auto; }
.cookie-modal-lead { font-size: .87rem; line-height: 1.6; color: var(--ink-soft); margin-bottom: 1rem; }
.cookie-modal-lead a { color: var(--blue-600); text-decoration: underline; }

.cookie-cats { display: grid; gap: .6rem; }
.cookie-cat {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: .85rem .95rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff;
}
.cookie-cat--locked { background: var(--frost-50); }
.cookie-cat-text { min-width: 0; }
.cookie-cat-name { font-weight: 700; font-size: .9rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cookie-cat-badge {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: .1rem .45rem; border-radius: 999px; background: #e7f6ec; color: #23744a; border: 1px solid #c6e8d3;
}
.cookie-cat-desc { font-size: .8rem; line-height: 1.55; color: var(--muted); margin-top: .3rem; }

/* przełącznik */
.switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
    position: absolute; inset: 0; border-radius: 999px; background: #cfdce7;
    transition: background .18s ease;
}
.switch-dot {
    position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(7, 26, 46, .3);
    transition: transform .18s ease;
}
.switch input:checked + .switch-track { background: var(--blue-500); }
.switch input:checked + .switch-track .switch-dot { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.switch input:disabled + .switch-track { background: #9fb6c9; opacity: .85; cursor: not-allowed; }

.cookie-modal-foot {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
    padding: .95rem 1.3rem; border-top: 1px solid var(--line); background: var(--frost-50);
}
.cookie-modal-status { font-size: .78rem; color: var(--muted); min-height: 1em; }
.cookie-modal-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.footer-legal { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.footer-cookie-link {
    background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
    color: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.footer-cookie-link:hover { color: var(--ice-200); }

@media (max-width: 720px) {
    .cookie-bar { padding: .6rem; }
    .cookie-bar-inner { padding: .95rem 1rem; gap: .9rem; border-radius: var(--radius-sm); }
    .cookie-bar-actions { width: 100%; }
    .cookie-bar-actions .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
    .cookie-modal { padding: 0; align-items: end; }
    .cookie-modal-dialog { max-height: 92vh; border-radius: var(--radius) var(--radius) 0 0; }
    .cookie-modal-actions .btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-bar { animation: none; }
    .switch-track, .switch-dot { transition: none; }
}
