/* =====================================================================
   bigg.cz — Unified Apps Design System (v1, 2026)
   Sdílený moderní vzhled pro všechny online nástroje /aplikace/
   Staví na globálních tokenech ze style.css (--primary, --radius*, --shadow*)
   Každá aplikace nastaví svou barvu přes --app-color (z DB app.color)
   ===================================================================== */

.app-detail {
    --app-color: var(--primary);
    --app-color-soft: color-mix(in srgb, var(--app-color) 12%, transparent);
    --app-color-line: color-mix(in srgb, var(--app-color) 28%, transparent);
    --app-grad: linear-gradient(135deg,
        var(--app-color) 0%,
        color-mix(in srgb, var(--app-color) 65%, #000 8%) 100%);
}

/* ---------- HERO HLAVIČKA ---------- */
.app-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 0 8px;
}
.app-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-lg);
    background: var(--app-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--app-color) 60%, transparent);
}
.app-icon-wrap i { font-size: 30px; color: #fff; }
.app-header h1 {
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.15;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.app-desc { color: var(--text-secondary); font-size: 15.5px; margin: 0; }

/* Důvěryhodnostní odznaky pod hlavičkou */
.app-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 0 4px;
}
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}
.app-badge i { color: var(--app-color); font-size: 12px; }

/* ---------- INTRO TEXT ---------- */
.app-intro {
    padding: 18px 0 4px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-secondary);
}
.app-intro p { margin: 0 0 0.9em; }
.app-intro strong { color: var(--text-primary); }
.app-intro a { color: var(--app-color); font-weight: 600; text-decoration: none; }
.app-intro a:hover { text-decoration: underline; }

/* ---------- TOOL AREA + PANELY ---------- */
.app-tool-area { padding: 22px 0; }

.app-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px;
}
.app-panel + .app-panel { margin-top: 20px; }
.app-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
}
.app-panel-head h2,
.app-panel-head h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.app-panel-head .ph-ico {
    width: 34px; height: 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--app-color-soft); color: var(--app-color); font-size: 15px;
}

/* Tool grid: vstupy vlevo / náhled vpravo (desktop) */
.app-tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}
@media (min-width: 880px) {
    .app-tool-grid.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

/* ---------- FORMULÁŘ / VSTUPY ---------- */
.app-form { width: 100%; }
.app-field { margin-bottom: 18px; }
.app-field > label,
.app-form label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-primary);
}
.app-input-wrap { position: relative; display: flex; align-items: center; }
.app-input-wrap .unit {
    position: absolute; right: 14px;
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    pointer-events: none;
}
.app-form input[type="text"],
.app-form input[type="number"],
.app-form input[type="date"],
.app-form input[type="time"],
.app-form input[type="url"],
.app-form input[type="email"],
.app-form select,
.app-form textarea {
    width: 100%;
    padding: 13px 15px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 16px; /* min 16px = zabrání auto-zoomu na iOS při fokusu */
    font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
    appearance: none;
}
.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus {
    outline: none;
    border-color: var(--app-color);
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--app-color) 18%, transparent);
}
.app-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 18px;
    padding-right: 40px;
}

/* =====================================================================
   JEDNOTNÉ VSTUPY pro VŠECHNY nástroje (i mimo .app-form – QR, kódy…)
   ===================================================================== */
.app-tool-area input[type="text"],
.app-tool-area input[type="url"],
.app-tool-area input[type="tel"],
.app-tool-area input[type="email"],
.app-tool-area input[type="number"],
.app-tool-area input[type="search"],
.app-tool-area input[type="password"],
.app-tool-area input[type="date"],
.app-tool-area input[type="time"],
.app-tool-area select,
.app-tool-area textarea {
    width: 100%;
    padding: 13px 15px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
    appearance: none;
}
.app-tool-area textarea { resize: vertical; min-height: 84px; }
.app-tool-area input[type="text"]:focus,
.app-tool-area input[type="url"]:focus,
.app-tool-area input[type="tel"]:focus,
.app-tool-area input[type="email"]:focus,
.app-tool-area input[type="number"]:focus,
.app-tool-area input[type="search"]:focus,
.app-tool-area input[type="password"]:focus,
.app-tool-area input[type="date"]:focus,
.app-tool-area input[type="time"]:focus,
.app-tool-area select:focus,
.app-tool-area textarea:focus {
    outline: none;
    border-color: var(--app-color);
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--app-color) 18%, transparent);
}
.app-tool-area select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

/* Baseline pro VŠECHNA tlačítka v nástrojích – přes :where() (nízká
   specificita), takže .app-btn/.btn-calculate atd. ho snadno přebijí,
   ale žádné tlačítko nezůstane „systémové" */
:where(.app-tool-area) button {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    padding: 11px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
:where(.app-tool-area) button:hover {
    border-color: var(--app-color);
    color: var(--app-color);
}

/* =====================================================================
   AKČNÍ TLAČÍTKA v nástrojích (Kopírovat, Generovat znovu, …)
   Řádek vedle sebe místo full-width; sekundární = čisté outline tlačítko
   ===================================================================== */
.app-tool-area [class$="-actions"] {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px;
}
.app-tool-area [class$="-actions"] .btn-calculate,
.app-tool-area [class$="-actions"] .app-btn {
    width: auto; flex: 1 1 150px; min-width: 150px;
}
.app-tool-area [class*="-btn-secondary"] {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    border: 1px solid var(--border-color);
}
.app-tool-area [class*="-btn-secondary"]:hover {
    background: var(--bg-card) !important;
    border-color: var(--app-color);
    color: var(--app-color) !important;
    filter: none;
    transform: translateY(-1px);
}
.app-form .form-row,
.app-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Segmentovaný přepínač (např. pohlaví) */
.app-segment {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 5px;
}
.app-segment label {
    margin: 0;
    text-align: center;
    padding: 9px 8px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.app-segment input { position: absolute; opacity: 0; pointer-events: none; }
.app-segment input:checked + label,
.app-segment label.active {
    background: var(--app-grad);
    color: #fff;
    box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--app-color) 70%, transparent);
}

/* CTA tlačítko */
.app-btn,
.app-form .btn-calculate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 15px 28px;
    background: var(--app-grad);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .2s, filter .2s;
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--app-color) 75%, transparent);
}
.app-btn:hover,
.app-form .btn-calculate:hover { transform: translateY(-2px); filter: brightness(1.04); }
.app-btn:active { transform: translateY(0); }
.app-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: none;
    border: 1px solid var(--border-color);
}
.app-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.app-btn-row .app-btn { width: auto; flex: 1; min-width: 140px; }

/* ---------- VÝSLEDEK ---------- */
.app-result {
    margin-top: 22px;
    animation: appFadeUp .45s ease;
}
.app-result-hero {
    text-align: center;
    padding: 26px 20px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 50% 0%, var(--app-color-soft) 0%, transparent 60%),
        var(--bg-card);
    border: 1px solid var(--app-color-line);
}
.app-result-num {
    font-size: clamp(44px, 9vw, 64px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--app-color);
    font-variant-numeric: tabular-nums;
}
.app-result-unit { font-size: 18px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.app-result-cap { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

.app-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--app-color);
}
.app-pill.is-success { background: var(--success); }
.app-pill.is-warning { background: var(--warning); }
.app-pill.is-danger  { background: var(--danger); }

/* Měřící lišta (gauge) */
.app-gauge { margin: 22px 0 6px; }
.app-gauge-track {
    position: relative;
    height: 14px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg,#3b82f6 0%,#22c55e 28%,#eab308 55%,#f97316 75%,#ef4444 100%);
}
.app-gauge-knob {
    position: absolute; top: 50%;
    width: 22px; height: 22px;
    background: #fff;
    border: 3px solid var(--app-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-md);
    transition: left .6s cubic-bezier(.22,1,.36,1);
}
.app-gauge-scale {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--text-muted);
    margin-top: 8px;
}

/* Statistické karty */
.app-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.app-stat {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: transform .18s, box-shadow .18s;
}
.app-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.app-stat-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff;
    background: var(--stat-color, var(--app-color));
}
.app-stat-val { font-size: 19px; font-weight: 700; color: var(--text-primary); line-height: 1.1; font-variant-numeric: tabular-nums; }
.app-stat-lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

/* Tip / doporučení box */
.app-tip {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--app-color-soft);
    border: 1px solid var(--app-color-line);
}
.app-tip h4 { margin: 0 0 8px; font-size: 15px; color: var(--text-primary); display:flex; gap:8px; align-items:center; }
.app-tip h4 i { color: var(--app-color); }
.app-tip ul { margin: 0; padding-left: 20px; }
.app-tip li { margin: 5px 0; font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }

/* ---------- INFO SEKCE / TABULKY ---------- */
.app-info { padding: 30px 0 6px; }
.app-info h2 { font-size: 22px; margin: 0 0 14px; letter-spacing: -0.01em; }
.app-info h3 { font-size: 18px; margin: 22px 0 10px; }
.app-info p { line-height: 1.75; color: var(--text-secondary); margin: 0 0 1em; }
.app-info a { color: var(--app-color); font-weight: 600; text-decoration: none; }
.app-info a:hover { text-decoration: underline; }

.app-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-color); }
.app-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.app-table th {
    background: var(--bg-tertiary);
    text-align: left;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.app-table td { padding: 11px 14px; border-top: 1px solid var(--border-color); color: var(--text-secondary); }
.app-table tr:nth-child(even) td,
.app-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-tertiary) 50%, transparent); }
.app-formula {
    display: inline-block;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 15px;
    color: var(--text-primary);
    margin: 8px 0;
}

/* ---------- AFFILIATE PRODUKTY ---------- */
.app-aff { margin-top: 26px; }
.app-aff-head { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.app-aff-head h3 { margin: 0; font-size: 19px; }
.app-aff-head .tag {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--app-color); background: var(--app-color-soft);
    padding: 3px 9px; border-radius: var(--radius-full);
}
.aff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 600px) { .aff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .aff-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.aff-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none !important;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.aff-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--app-color-line);
}
.aff-card .aff-media {
    aspect-ratio: 16 / 10;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.aff-card .aff-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.aff-card:hover .aff-media img { transform: scale(1.05); }
.aff-card .aff-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.aff-card .aff-name { font-size: 15.5px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.aff-card .aff-meta { font-size: 13px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.aff-card .aff-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.aff-card .aff-price { font-size: 17px; font-weight: 800; color: var(--app-color); }
.aff-card .aff-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13.5px; font-weight: 700; color: #fff;
    background: var(--app-grad);
    padding: 8px 14px; border-radius: var(--radius-full);
}
.aff-card .aff-ribbon {
    position: absolute; top: 12px; left: 12px;
    font-size: 11px; font-weight: 700;
    background: var(--app-color); color: #fff;
    padding: 4px 10px; border-radius: var(--radius-full);
    box-shadow: var(--shadow);
}
.aff-disclaim { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* Feature affiliate karta (obrázek + text + promo) – sdílená napříč aplikacemi */
.pomelo-feature {
    display: grid; grid-template-columns: 1fr; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden; text-decoration: none !important;
    transition: transform .2s, box-shadow .2s, border-color .2s; margin-bottom: 16px;
}
.pomelo-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--app-color-line); }
.pomelo-media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-tertiary); }
.pomelo-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pomelo-feature:hover .pomelo-media img { transform: scale(1.04); }
.pomelo-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; }
.pomelo-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 4px; }
.pomelo-promo { font-size: 13.5px; font-weight: 600; color: var(--text-primary); background: var(--app-color-soft); padding: 7px 12px; border-radius: var(--radius); }
.pomelo-promo i, .pomelo-promo b { color: var(--app-color); }
@media (min-width: 620px) {
    .pomelo-feature { grid-template-columns: 240px 1fr; }
    .pomelo-media { aspect-ratio: auto; height: 100%; min-height: 180px; }
}

/* Promo karta bez obrázku (finance apod.) – ikona + text + CTA */
.app-promo {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 22px; margin-bottom: 14px;
    background: var(--bg-card);
    border: 1px solid var(--app-color-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none !important;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.app-promo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.app-promo-ico {
    width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; background: var(--app-grad);
}
.app-promo-body { flex: 1; min-width: 0; }
.app-promo-title { display: block; font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.app-promo-text { display: block; font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.app-promo-cta {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 700; color: #fff; background: var(--app-grad);
    padding: 11px 18px; border-radius: var(--radius-full); white-space: nowrap;
}
@media (max-width: 580px) {
    .app-promo { flex-direction: column; text-align: center; }
    .app-promo-cta { width: 100%; justify-content: center; }
}

/* Jednoduchá textová varianta affiliate (zpětná kompat.) */
.aff-card.text-only { padding: 16px 18px; }
.aff-card.text-only strong { font-size: 15px; color: var(--app-color); }
.aff-card.text-only span { font-size: 13px; color: var(--text-secondary); }

/* ---------- CALLOUT / vnitřní prolinky ---------- */
.app-callout {
    background: var(--app-color-soft);
    border-left: 4px solid var(--app-color);
    padding: 18px 22px;
    border-radius: var(--radius);
    margin: 18px 0;
}
.app-callout h3 { margin: 0 0 10px; font-size: 17px; }
.app-callout p { margin: .55em 0; line-height: 1.7; }
.app-callout a { color: var(--app-color); font-weight: 600; }

/* ---------- FAQ AKORDEON ---------- */
.app-faq { padding: 30px 0 10px; }
.app-faq > h2 { font-size: 22px; margin: 0 0 18px; }
.app-faq details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: var(--bg-card);
    overflow: hidden;
    transition: box-shadow .2s;
}
.app-faq details[open] { box-shadow: var(--shadow-sm); }
.app-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15.5px;
    color: var(--text-primary);
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.app-faq summary::-webkit-details-marker { display: none; }
.app-faq summary::after {
    content: "\f067"; /* plus */
    font-family: "Font Awesome 6 Free"; font-weight: 900;
    font-size: 13px; color: var(--app-color);
    transition: transform .2s; flex-shrink: 0;
}
.app-faq details[open] summary::after { content: "\f068"; /* minus */ }
.app-faq .faq-a { padding: 0 20px 18px; color: var(--text-secondary); line-height: 1.7; font-size: 14.5px; }
.app-faq .faq-a p { margin: 0 0 .7em; }
/* Zpětná kompatibilita: starý FAQ formát (h3/p) */
.app-faq h3 { font-size: 16px; margin: 18px 0 6px; color: var(--text-primary); }

/* ---------- DOPORUČENÍ pod výsledkem ---------- */
.app-recommendations {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 22px;
}

/* ---------- ANIMACE ---------- */
@keyframes appFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .app-result, .app-gauge-knob, .aff-card, .app-stat, .app-btn { transition: none !important; animation: none !important; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .app-header { flex-direction: column; text-align: center; padding-top: 20px; }
    .app-badges { justify-content: center; }
    .app-panel { padding: 20px; }
    .app-form .form-row, .app-field-row { grid-template-columns: 1fr; }
}

/* =====================================================================
   PŘEHLED APLIKACÍ (listing /aplikace/)
   ===================================================================== */
.apps-hero { text-align: center; padding: 46px 20px 30px; }
.apps-hero h1 {
    font-size: clamp(30px, 5vw, 40px);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.apps-hero p { color: var(--text-secondary); font-size: 17px; max-width: 620px; margin: 0 auto; }
.apps-section { margin-bottom: 40px; }
.apps-section-title { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 0 0 18px; }
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}
.app-card {
    display: flex; flex-direction: column;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    --ac-color: var(--primary);
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--ac-color) 35%, transparent); }
.ac-icon {
    width: 50px; height: 50px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #fff; margin-bottom: 14px;
    background: linear-gradient(135deg, var(--ac-color), color-mix(in srgb, var(--ac-color) 60%, #000 8%));
    box-shadow: 0 8px 18px -8px var(--ac-color);
}
.ac-title { font-size: 16.5px; margin: 0 0 6px; color: var(--text-primary); }
.ac-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 14px; flex: 1; }
.ac-link { font-size: 13.5px; font-weight: 700; color: var(--ac-color); display: inline-flex; align-items: center; gap: 7px; }
.app-card:hover .ac-link i { transform: translateX(3px); }
.ac-link i { transition: transform .2s; }

/* =====================================================================
   ZPĚTNÁ KOMPATIBILITA — třídy z původních (zatím nemigrovaných) šablon
   ===================================================================== */
.app-placeholder { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.app-placeholder i { font-size: 48px; margin-bottom: 16px; display: block; }
.app-affiliate {
    margin-top: 22px; padding: 0;
    background: transparent; border: none;
}
.app-affiliate h3 {
    margin: 0 0 14px; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 9px; color: var(--text-primary);
}
/* Polished textové link-karty (titulek + popis, bez obrázku) */
.app-affiliate .aff-grid { gap: 14px; }
.app-affiliate .aff-card {
    display: flex; flex-direction: column; gap: 5px;
    padding: 16px 42px 16px 52px; position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: visible;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.app-affiliate .aff-card::before {
    content: "\f0eb"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; left: 14px; top: 16px;
    width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--app-color); background: var(--app-color-soft);
}
.app-affiliate .aff-card::after {
    content: "\f061"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: var(--app-color); opacity: .45;
    transition: transform .18s, opacity .18s;
}
.app-affiliate .aff-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--app-color-line);
}
.app-affiliate .aff-card:hover::after { opacity: 1; transform: translateY(-50%) translateX(4px); }
.app-affiliate .aff-card strong { font-size: 15px; color: var(--text-primary); line-height: 1.3; }
.app-affiliate .aff-card span { font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; }
.app-result-value { font-size: 36px; font-weight: 800; color: var(--app-color); margin: 8px 0; font-variant-numeric: tabular-nums; }
.app-result-label { font-size: 14px; color: var(--text-muted); }
.app-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 16px; }
.app-result-item { text-align: center; padding: 14px; background: var(--bg-tertiary); border-radius: var(--radius); }
.app-result-item .value { font-size: 20px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.app-result-item .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.app-form .form-group { margin-bottom: 16px; }

/* =====================================================================
   AUTO-PANEL pro jednoduché aplikace (form jako přímý potomek wrapperu)
   Dá formuláři i výsledku kartu bez nutnosti editovat každou šablonu.
   ===================================================================== */
.app-tool-area > [class^="app-"] > form.app-form,
.app-tool-area > [class^="app-"] > .app-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px;
    max-width: 100%;
}
.app-tool-area > [class^="app-"] > form.app-form .btn-calculate,
.app-tool-area > [class^="app-"] > .app-form .btn-calculate { margin-top: 6px; }

/* Karta okolo výsledku jen tam, kde má klasickou strukturu (ne BMI hero) */
.app-result:has(> .app-result-value) {
    background: var(--bg-card);
    border: 1px solid var(--app-color-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px;
    text-align: center;
}
.app-result:has(> .app-result-value) .app-result-grid { text-align: left; }
