/* ==========================================================================
   Fiszki – motyw morski
   ========================================================================== */

   :root {
    --sidebar: #2c4c38;
    --sidebar-2: #3a5a40;
    --bg: #f4f7f5;
    --card: #ffffff;
    --text: #22332b;
    --muted: #7a8a82;
    --line: #e3eae6;
    --primary: #3a7d5d;
    --primary-dark: #2c5f46;
    /* SZTYWNE kolory przegródek Leitnera */
    --box1: #e74c3c; --box2: #e67e22; --box3: #f39c12; --box4: #f1c40f; --box5: #2ecc71;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(44, 76, 56, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout aplikacji ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    color: #eaf3ee;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo { font-size: 26px; font-weight: 800; letter-spacing: 1px; margin-bottom: 24px; padding-left: 8px; }

.sidebar-profile {
    display: flex; gap: 10px; align-items: center;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 10px;
    margin-bottom: 20px;
}

.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--box5); color: #12331f;
    font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.profile-name { font-weight: 600; font-size: 14px; }
.profile-mail { font-size: 11px; opacity: .7; word-break: break-all; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-link {
    color: #dcebe2;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    transition: background .15s;
}
.nav-link:hover { background: rgba(255,255,255,.10); text-decoration: none; }
.nav-link.active { background: rgba(255,255,255,.16); font-weight: 600; }
.nav-hint { display: block; font-size: 11px; opacity: .6; font-weight: 400; }
.nav-spacer { flex: 1; }
.nav-link.logout { opacity: .85; }

.sidebar-footer { font-size: 11px; opacity: .5; padding: 12px 8px 0; }

/* ---------- Obszar główny ---------- */
.main { flex: 1; padding: 32px 40px; max-width: 1200px; }

.page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; margin-bottom: 24px;
}
.page-header h1 { font-size: 28px; }
.subtitle { color: var(--muted); margin-top: 6px; font-size: 14px; }

.streak-badge {
    background: #fff7e6;
    border: 1px solid rgba(241,196,15,.4);
    color: #8a6d00;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600; font-size: 14px;
    white-space: nowrap;
}

/* ---------- Karty / panele ---------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; }

/* ---------- Lista zestawów ---------- */
.decks-panel { position: relative; padding-bottom: 84px; }

.deck-list {
    max-height: 420px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 10px;
    padding-right: 4px;
}

.deck-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text);
    transition: border-color .15s, transform .1s;
}
.deck-item:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }

.deck-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.deck-info small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.deck-meta { display: flex; gap: 6px; flex-shrink: 0; }

.pill {
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--muted);
    white-space: nowrap;
}
.pill-due { background: #fdecea; border-color: rgba(231,76,60,.35); color: #c0392b; font-weight: 600; }

.fab {
    position: absolute; right: 20px; bottom: 20px;
    width: 54px; height: 54px;
    border-radius: 50%; border: none;
    background: var(--primary); color: #fff;
    font-size: 28px; line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(58,125,93,.4);
    transition: background .15s, transform .1s;
}
.fab:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ---------- Panel statystyk ---------- */
.stats-panel { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.stats-panel h2 { align-self: flex-start; font-size: 18px; }

.legend { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.legend li strong { margin-left: auto; color: var(--text); }
.legend .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.streak-big {
    font-size: 16px; background: var(--bg);
    border-radius: var(--radius);
    padding: 12px 18px; width: 100%; text-align: center;
}

/* ---------- Przyciski ---------- */
.btn {
    display: inline-block; border: none;
    border-radius: 999px;
    padding: 11px 22px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none !important;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* ---------- Formularze ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form input, .form textarea, .form select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px; font-family: inherit;
    background: #fff; color: var(--text);
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
}

/* ---------- Komunikaty flash ---------- */
.flash { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 12px; border: 1px solid transparent; }
.flash-success { background: #e8f8ef; border-color: rgba(46,204,113,.35); color: #1e7d46; }
.flash-error   { background: #fdecea; border-color: rgba(231,76,60,.35);  color: #b03a2e; }
.flash-warning { background: #fff7e6; border-color: rgba(241,196,15,.4);  color: #8a6d00; }

/* ---------- Strony auth ---------- */
.auth-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #2c4c38, #3a7d5d);
    padding: 20px;
}
.auth-wrapper { width: 100%; max-width: 420px; }
.auth-card { padding: 36px; }
.auth-logo { font-size: 28px; font-weight: 800; color: var(--sidebar); text-align: center; margin-bottom: 20px; }
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .subtitle { text-align: center; margin-bottom: 20px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; }

/* ---------- Pusty stan ---------- */
.empty-state {
    text-align: center; padding: 40px 16px; color: var(--muted);
    display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.empty-icon { font-size: 48px; }

/* ---------- Tooltipy (onboarding) ---------- */
.tooltip {
    position: relative;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: help;
}
.tooltip:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 130%; right: -10px;
    width: 250px;
    background: var(--sidebar);
    color: #fff;
    font-size: 12px; font-weight: 400;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* ---------- RWD ---------- */
@media (max-width: 960px) {
    .app { flex-direction: column; }
    .sidebar {
        width: 100%; height: auto; position: static;
        flex-direction: row; flex-wrap: wrap; align-items: center;
        gap: 10px; padding: 12px 16px;
    }
    .sidebar-logo { margin: 0; }
    .sidebar-profile { margin: 0; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; flex-basis: 100%; }
    .nav-hint { display: none; }
    .nav-spacer { display: none; }
    .sidebar-footer { display: none; }
    .main { padding: 20px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
/* ==========================================================================
   Etap 2 – CRUD, tagi, wyszukiwarka
   ========================================================================== */

/* Pasek wyszukiwania nad treścią */
.topbar { margin-bottom: 20px; }
.search-form input {
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 11px 18px;
    font-size: 14px;
    font-family: inherit;
    background: var(--card);
}
.search-form input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

/* Formularze */
.form-card { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

.btn-danger { background: #fdecea; color: #c0392b; border: 1px solid rgba(231,76,60,.35); }
.btn-danger:hover { background: var(--box1); color: #fff; }

.inline-form { display: inline; }

/* Pasek narzędzi w widoku zestawu */
.toolbar-card {
    margin-bottom: 16px;
    display: flex; flex-wrap: wrap; gap: 14px;
    align-items: center; justify-content: space-between;
}
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.import-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-form input[type="file"] { font-size: 13px; color: var(--muted); }

/* Chipy filtrów tagów */
.tag-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
    font-size: 13px; padding: 6px 14px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted);
    transition: border-color .15s;
}
.chip:hover { border-color: var(--primary); text-decoration: none; }
.chip-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* Lista fiszek */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.card-item {
    display: flex; justify-content: space-between; gap: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--box1);
    padding: 16px 18px;
}
.card-item-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card-front { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-back { color: var(--text); font-size: 15px; }
.card-example { color: var(--muted); font-style: italic; font-size: 13px; }
.card-synonyms { color: var(--muted); font-size: 12px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mini-tag {
    font-size: 11px; background: var(--bg);
    border-radius: 999px; padding: 2px 8px;
    color: var(--primary-dark);
}
.card-item-side {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 8px; flex-shrink: 0;
}
.box-badge {
    color: #fff; font-size: 12px; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.card-actions { display: flex; gap: 4px; align-items: center; }
.card-actions form { display: inline; }
.icon-btn {
    background: none; border: none; cursor: pointer;
    font-size: 15px; padding: 4px;
    border-radius: 8px;
    text-decoration: none !important;
}
.icon-btn:hover { background: var(--bg); }

.header-pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* Wyszukiwarka */
.search-card { max-width: 900px; }
.search-big { display: flex; gap: 10px; margin-bottom: 18px; }
.search-big input {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 15px;
    font-family: inherit;
}
.search-big input:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.results-count { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* Strona błędu 404 */
.error-page { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.error-icon { font-size: 56px; }
.error-page h1 { font-size: 40px; color: var(--sidebar); }
.error-page p { color: var(--muted); margin-bottom: 8px; }

/* ==========================================================================
   Etap 3 – sesje nauki
   ========================================================================== */

   .hidden { display: none !important; }

   .learn-card { max-width: 760px; margin: 0 auto; text-align: center; padding: 28px; }
   
   /* Pasek postępu */
   .progress-wrap { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
   #progressBar {
       height: 100%; width: 0;
       background: linear-gradient(90deg, var(--primary), var(--box5));
       border-radius: 999px;
       transition: width .3s ease;
   }
   .progress-label {
       display: flex; justify-content: center; align-items: center; gap: 8px;
       margin-top: 8px; font-size: 13px; color: var(--muted);
   }
   
   /* Odznaka przegródki */
   .box-badge-lg {
       display: inline-block;
       color: #fff; font-weight: 700; font-size: 13px;
       padding: 5px 14px; border-radius: 999px;
       margin-bottom: 12px;
       text-shadow: 0 1px 2px rgba(0,0,0,.25);
       background: var(--box1);
   }
   
   /* Fiszka 3D (flip) */
   .flashcard { position: relative; width: 100%; height: 300px; perspective: 1400px; margin: 8px 0 20px; }
   .flashcard-face {
       position: absolute; inset: 0;
       display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
       border-radius: var(--radius);
       padding: 28px;
       backface-visibility: hidden;
       -webkit-backface-visibility: hidden;
       transition: transform .5s ease;
   }
   .flashcard-front { background: linear-gradient(160deg, #ffffff, #eef6f1); border: 2px solid var(--line); }
   .flashcard-back  { background: linear-gradient(160deg, #eef6f1, #dcefe3); border: 2px solid var(--primary); transform: rotateY(180deg); }
   .flashcard.flipped .flashcard-front { transform: rotateY(180deg); }
   .flashcard.flipped .flashcard-back  { transform: rotateY(0deg); }
   
   .fc-word { font-size: 34px; font-weight: 800; color: var(--sidebar); }
   .fc-example { color: var(--muted); font-style: italic; font-size: 15px; }
   .fc-synonyms { color: var(--muted); font-size: 13px; }
   .fc-hint {
       background: #fff7e6;
       border: 1px solid rgba(241,196,15,.4);
       color: #8a6d00;
       padding: 8px 14px; border-radius: 10px; font-size: 14px;
   }
   
   /* Sterowanie sesją */
   .learn-controls { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
   .answer-btns { display: flex; gap: 12px; }
   .btn-lg { padding: 14px 30px; font-size: 16px; }
   .btn-sm { padding: 7px 14px; font-size: 13px; }
   .btn:disabled { opacity: .4; cursor: not-allowed; }
   
   .btn-answer { min-width: 150px; padding: 14px 22px; font-size: 16px; color: #fff; }
   .btn-yes { background: var(--box5); }
   .btn-yes:hover { background: #27ae60; }
   .btn-no { background: var(--box1); }
   .btn-no:hover { background: #c0392b; }
   
   /* Podsumowanie sesji */
   #summary h2 { text-align: center; margin-bottom: 16px; }
   .summary-score { font-size: 56px; font-weight: 800; color: var(--primary); }
   .summary-grade { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
   .summary-stats { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
   .summary-stats .stat {
       background: var(--bg); border-radius: var(--radius);
       padding: 12px 18px; min-width: 96px;
       display: flex; flex-direction: column; gap: 2px;
   }
   .summary-stats .stat strong { font-size: 20px; }
   .summary-stats .stat span { font-size: 12px; color: var(--muted); }
   .summary-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; text-align: left; }
   .result-row {
       display: flex; align-items: center; gap: 10px;
       border-radius: 10px; padding: 8px 12px; font-size: 14px;
   }
   .result-ok  { background: #e8f8ef; }
   .result-bad { background: #fdecea; }
   .result-front { font-weight: 700; }
   .result-arrow { color: var(--muted); }
   .result-box { margin-left: auto; }
   .summary-actions { justify-content: center; }
   
   /* Dashboard – nowe elementy pozycji zestawu */
   .deck-name { color: var(--text); }
   .deck-name:hover { color: var(--primary); text-decoration: none; }
   .pill-cta { background: #e8f8ef; border-color: rgba(46,204,113,.4); color: #1e7d46; font-weight: 600; }
   .pill-cta:hover { background: var(--box5); color: #fff; text-decoration: none; }

   /* ==========================================================================
   Etap 4 – quiz par i wpisywanie
   ========================================================================== */

/* Quiz – plansza i kafelki */
.quiz-topbar {
    display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
    margin-bottom: 18px; font-size: 14px; color: var(--muted);
}
.quiz-board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.quiz-col { display: flex; flex-direction: column; gap: 10px; }

.quiz-tile {
    border: 2px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 12px;
    font-size: 15px; font-weight: 600; font-family: inherit;
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, background .2s, transform .1s;
}
.quiz-tile:hover { border-color: var(--primary); }
.quiz-tile.selected {
    border-color: var(--primary);
    background: #eaf3ee;
    box-shadow: 0 0 0 3px rgba(58,125,93,.18);
}
.quiz-tile.solved {
    border-color: var(--box5);
    background: #e8f8ef;
    color: #1e7d46;
    cursor: default;
    opacity: .85;
}
.quiz-tile.bad {
    border-color: var(--box1);
    background: #fdecea;
    animation: shake .4s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-5px); }
    75%      { transform: translateX(5px); }
}
@media (max-width: 560px) {
    .quiz-board { grid-template-columns: 1fr; }
}

/* Wpisywanie */
.type-prompt { font-size: 30px; font-weight: 800; color: var(--sidebar); margin: 18px 0 6px; }
.type-input-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
#typeInput {
    min-width: 260px; max-width: 360px; flex: 1;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 16px; font-family: inherit;
    text-align: center;
}
#typeInput:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
#typeInput:disabled { background: var(--bg); }

.type-feedback { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius); font-size: 15px; }
.tf-correct { background: #e8f8ef; border: 1px solid rgba(46,204,113,.4); color: #1e7d46; }
.tf-typo    { background: #fff7e6; border: 1px solid rgba(241,196,15,.5); color: #8a6d00; }
.tf-wrong   { background: #fdecea; border: 1px solid rgba(231,76,60,.35); color: #b03a2e; }
.type-feedback .tf-word { font-weight: 800; }
.type-feedback .tf-example { display: block; margin-top: 6px; font-style: italic; opacity: .8; font-size: 13px; }

.result-note { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ==========================================================================
   Etap 5 – społeczność, statystyki, HoF, ustawienia
   ========================================================================== */

/* Górny pasek dla gości (strony publiczne) */
.public-topbar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(90deg, var(--sidebar), var(--sidebar-2));
}
.public-logo { color: #fff; font-size: 22px; font-weight: 800; text-decoration: none !important; }
.public-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.public-nav a:not(.btn) {
    color: #dcebe2; padding: 8px 10px; font-size: 14px; border-radius: 8px; text-decoration: none;
}
.public-nav a:not(.btn):hover { background: rgba(255,255,255,.12); }
.public-main { max-width: 1000px; margin: 0 auto; width: 100%; }

/* KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.kpi { text-align: center; padding: 20px; }
.kpi-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.kpi-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Statystyki – kolumny */
.stats-columns { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .stats-columns { grid-template-columns: 1fr; } }
.stats-columns h2 { font-size: 16px; margin-bottom: 12px; align-self: flex-start; }
#activityChart { max-width: 100%; height: auto; }

/* Hall of Fame */
.hof-table { width: 100%; border-collapse: collapse; }
.hof-table th, .hof-table td {
    padding: 12px 14px; text-align: left;
    border-bottom: 1px solid var(--line); font-size: 14px;
}
.hof-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.hof-table td.num, .hof-table th.num { text-align: right; font-weight: 700; }
.hof-table tbody tr:last-child td { border-bottom: none; }
.hof-table tr.me { background: #eaf3ee; }
.hof-rank { font-weight: 700; width: 56px; }

/* Karta udostępniania */
.share-card {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 16px; padding: 14px 18px;
}
.share-card input {
    flex: 1; min-width: 220px;
    border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 12px; font-size: 13px; font-family: inherit;
    color: var(--muted); background: var(--bg);
}
.share-label { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Lista społeczności bez limitu wysokości */
.community-list { max-height: none; }

/* Strefa niebezpieczna */
.danger-zone { border: 1px solid rgba(231,76,60,.35); }
.danger-zone h2 { color: #c0392b; font-size: 16px; margin-bottom: 8px; }
.danger-zone p { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

/* ==========================================================================
   Avatary
   ========================================================================== */

   .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

   /* Ustawienia – sekcja avatara */
   .avatar-settings { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
   .avatar-preview {
       width: 96px; height: 96px;
       border-radius: 50%;
       background: var(--bg);
       border: 3px solid var(--line);
       display: flex; align-items: center; justify-content: center;
       font-size: 34px; font-weight: 800; color: var(--muted);
       overflow: hidden;
       flex-shrink: 0;
   }
   .avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
   .avatar-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
   
   /* Hall of Fame – avatar w wierszu */
   .hof-user { display: flex; align-items: center; gap: 10px; }
   .hof-avatar {
       width: 32px; height: 32px;
       border-radius: 50%;
       object-fit: cover;
       flex-shrink: 0;
       background: var(--sidebar-2);
       color: #fff;
       display: inline-flex; align-items: center; justify-content: center;
       font-size: 14px; font-weight: 700;
   }

/* ==========================================================================
   Etap 6 – onboarding + szlify RWD
   ========================================================================== */

/* Onboarding na stronie rejestracji */
.onboarding-box {
    background: var(--bg);
    border-radius: 10px;
    padding: 14px 16px 14px 32px;
    font-size: 13px;
    color: var(--muted);
    margin-top: 18px;
    line-height: 1.7;
}
.onboarding-box strong { color: var(--text); }
.onboarding-box > strong { display: block; margin-bottom: 4px; }
.onboarding-box ol { margin: 0; padding-left: 4px; list-style-position: inside; }

/* Długie słówka nie mogą rozsadzać fiszki */
.fc-word { overflow-wrap: anywhere; text-align: center; }

/* Szlify mobilne */
@media (max-width: 640px) {
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header h1 { font-size: 22px; }
    .toolbar-card { flex-direction: column; align-items: stretch; }
    .deck-item { flex-direction: column; align-items: flex-start; }
    .deck-meta { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .card-item { flex-direction: column; }
    .card-item-side {
        flex-direction: row; align-items: center;
        justify-content: space-between; width: 100%;
    }
    .learn-card { padding: 18px; }
    .flashcard { height: 320px; }
    .fc-word { font-size: 26px; }
    .type-prompt { font-size: 24px; overflow-wrap: anywhere; }
    .share-card input { min-width: 0; flex-basis: 100%; }
    .search-big { flex-direction: column; }
    .public-topbar { padding: 12px 16px; }
    .main { padding: 16px; }
    .summary-stats .stat { min-width: 76px; padding: 10px 12px; }
}