/* ==========================================
   ZÁKLADNÍ RESET A LAYOUT
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Georgia', serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    margin-top: 40px;
}

header h1 {
    color: #e94560;
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.subtitle {
    font-style: italic;
    color: #8f8f8f;
    margin-bottom: 30px;
}

button {
    background-color: #0f3460;
    color: white;
    border: 2px solid #e94560;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.5);
}

.hidden {
    display: none !important;
}

#loading {
    margin-top: 30px;
    font-size: 1.2rem;
    color: #fca311;
    font-style: italic;
}

/* ==========================================
   ROZCESTNÍK ORACOOLIO
   ========================================== */
.main-title {
    font-size: 3.5rem;
    background: linear-gradient(45deg, #e94560, #fca311);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.menu-item {
    background: #16213e;
    border: 2px solid #2a395e;
    padding: 30px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.menu-item:hover {
    transform: translateY(-10px);
    border-color: #e94560;
    box-shadow: 0 15px 30px rgba(233, 69, 96, 0.2);
}

.menu-item .menu-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(252, 163, 17, 0.3));
}

.menu-item h2 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.menu-item p {
    color: #8f8f8f;
    font-size: 0.9rem;
    line-height: 1.5;
}

.locked {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(80%);
}

.locked:hover {
    transform: none;
    border-color: #2a395e;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.status-badge {
    background: rgba(252, 163, 17, 0.1);
    color: #fca311;
    border: 1px solid #fca311;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-top: 15px;
    font-weight: bold;
}

/* ==========================================
   KLASICKÝ TAROT
   ========================================== */
#tarot-board {
    margin-top: 40px;
    background: #16213e;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.spread-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.position-title {
    color: #fca311;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.perspective {
    perspective: 1000px;
    width: 160px;
    height: 276px;
    margin: 0;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.is-flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.card-front {
    transform: rotateY(180deg);
}

.card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #1a1a2e;
}

.reversed-card {
    transform: rotate(180deg);
}

.reading-block {
    text-align: left;
    background-color: #1a1a2e;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #e94560;
    margin-bottom: 20px;
}

.reading-block h4 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.reading-block .meta-info {
    color: #fca311;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 15px;
}

.reading-block p {
    line-height: 1.6;
    color: #c0c0c0;
}

.ai-reading {
    background-color: rgba(233, 69, 96, 0.1);
    border: 1px solid #e94560;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.2);
}

.ai-reading h3 {
    color: #e94560;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

#ai-text-content {
    color: #fca311;
    font-size: 1.1rem;
    line-height: 1.8;
    font-style: italic;
}

.cursor-blink {
    border-right: 2px solid #e94560;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* ==========================================
   I-ŤING: CSS-ONLY SVITEK
   ========================================== */
#iching-section {
    background: radial-gradient(ellipse at top, #1c1008 0%, #0d0804 60%),
                url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4b483' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
    padding: 60px 20px 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

#iching-section::before,
#iching-section::after {
    content: '';
    display: block;
    width: min(500px, 90vw);
    height: 8px;
    background: linear-gradient(90deg, transparent 0%, #d4b483 15%, #8e6a2f 30%, #d4b483 50%, #8e6a2f 70%, #d4b483 85%, transparent 100%);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(212, 180, 131, 0.3);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
#iching-section::before { top: 30px; }
#iching-section::after  { bottom: 30px; }

#iching-app {
    background: linear-gradient(180deg, rgba(255,252,240,0) 0%, rgba(255,252,240,0.97) 5%, rgba(248,242,218,0.97) 50%, rgba(255,252,240,0.97) 95%, rgba(255,252,240,0) 100%);
    width: min(500px, 90vw);
    padding: 40px 40px 50px 40px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 0 0 1px rgba(212,180,131,0.5), 4px 0 8px -2px rgba(0,0,0,0.4), -4px 0 8px -2px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.7);
    border-left: 3px solid rgba(180,140,80,0.6);
    border-right: 3px solid rgba(180,140,80,0.6);
}

#iching-app::before,
#iching-app::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 20px;
    pointer-events: none;
}
#iching-app::before { left: 0; background: linear-gradient(90deg, rgba(0,0,0,0.15), transparent); border-radius: 4px 0 0 4px; }
#iching-app::after { right: 0; background: linear-gradient(270deg, rgba(0,0,0,0.15), transparent); border-radius: 0 4px 4px 0; }

#iching-section header { text-align: center; margin-bottom: 20px; }
#iching-section header h1 { color: #1a110a !important; font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 6px; font-weight: 900; text-shadow: 1px 1px 0 rgba(255,255,255,0.3); letter-spacing: 1px; }
#iching-section .subtitle { color: #5a3a22 !important; font-weight: 600; font-size: 0.95rem; margin-bottom: 0; font-style: italic; }

.iching-divider { width: 80%; height: 1px; background: linear-gradient(90deg, transparent, #8e2b20, transparent); margin: 18px auto; }

#hexagram-builder { display: flex; flex-direction: column-reverse; align-items: center; gap: 10px; margin: 0 auto 28px auto; width: 180px; min-height: 196px; }
.hex-line { width: 100%; height: 20px; display: flex; justify-content: space-between; animation: inkDraw 0.4s ease-out both; }
@keyframes inkDraw { from { opacity: 0; transform: scaleX(0.3) translateY(6px); } to { opacity: 1; transform: scaleX(1) translateY(0); } }
.line-segment { height: 100%; background: linear-gradient(180deg, #2a1a0a 0%, #1a0e04 100%); border-radius: 2px; box-shadow: 1px 2px 3px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.1); }
.yang-line .line-segment { width: 100%; }
.yin-line .line-segment  { width: 44%; }

.coins-container { display: flex; justify-content: center; gap: 16px; margin: 8px 0 20px 0; perspective: 800px; }
.coin { width: 70px; height: 70px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4)); }
.coin img { width: 100%; height: 100%; object-fit: contain; }
.tossing { animation: tossAnimation 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes tossAnimation { 0% { transform: translateY(0) rotateX(0) rotateY(0) scale(1); } 50% { transform: translateY(-150px) rotateX(1080deg) rotateY(720deg) scale(1.2); } 100% { transform: translateY(0) rotateX(2160deg) rotateY(1440deg) scale(1); } }

#toss-btn { background: linear-gradient(180deg, #a83427 0%, #7a2018 100%); color: #fff8f0; border: 2px solid #4a1510; border-bottom: 3px solid #3a0e08; margin-bottom: 24px; letter-spacing: 1px; box-shadow: 0 4px 12px rgba(120,30,20,0.4); font-size: 1rem; padding: 12px 28px; }
#toss-btn:hover { background: linear-gradient(180deg, #c03d2e 0%, #8e2b20 100%); box-shadow: 0 6px 18px rgba(142, 43, 32, 0.55); transform: translateY(-1px); }
#toss-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

#iching-reading-container { background: transparent; border: none; box-shadow: none; margin: 0 auto; max-width: 420px; text-align: center; }
#iching-reading-container h3 { color: #8e2b20; margin-bottom: 16px; font-size: 1.2rem; font-weight: bold; letter-spacing: 2px; }
#iching-text-content h4 { color: #1a110a; font-size: 1.4rem; margin-bottom: 12px; font-weight: 900; border-bottom: 2px solid #8e2b20; display: inline-block; padding-bottom: 5px; }
#iching-text-content p { color: #2b1b10; font-size: 1rem; line-height: 1.7; margin-bottom: 12px; font-weight: 500; text-align: left; }

@media (max-width: 480px) {
    #iching-section { padding: 50px 10px; }
    #iching-app { padding: 30px 20px 40px 20px; }
    #iching-section header h1 { font-size: 1.8rem; }
}

/* ==========================================
   SOLITAIRE: FULLSCREEN RESPONSIVE ENGINE
   ========================================== */
body:has(#solitaire-section:not(.hidden)) {
    padding: 0;
    align-items: stretch;
}
body:has(#solitaire-section:not(.hidden)) .app-container {
    max-width: 100vw;
    width: 100vw;
    margin-top: 0;
    text-align: left;
}

#solitaire-section {
    background-image: url('assets/solitaire_bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
    min-height: 100vh;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
}

#solitaire-section header {
    text-align: center;
    padding: 12px 20px 8px;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, transparent 100%);
    position: relative;
}

#solitaire-section header h1 { font-size: clamp(1.2rem, 3vw, 2rem); color: #e0e0e0; text-shadow: 0 2px 5px rgba(0,0,0,0.9); }
#solitaire-section header p { font-size: clamp(0.7rem, 1.5vw, 0.9rem); color: #8f8f8f; text-shadow: 0 2px 5px rgba(0,0,0,0.9); }

#solitaire-app {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(5px, 1.2vw, 14px);
    flex: 1;
}

.solitaire-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(3px, 1vw, 10px);
    width: 100%;
    margin-bottom: clamp(4px, 1vw, 14px);
    align-items: start;
}

.spacer-slot { width: 100%; pointer-events: none; }

.card-slot {
    width: 100%;
    aspect-ratio: 1 / 1.45;
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    position: relative;
}

.tableau-pile {
    aspect-ratio: unset !important;
    min-height: clamp(60px, 12vw, 160px);
    position: relative;
    overflow: visible;
    padding-bottom: clamp(60px, 12vw, 160px);
    border: 2px dashed rgba(212, 175, 55, 0.4);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
}

/* OPRAVA TVARU: Karta si teď svůj poměr stran diktuje sama! */
.solitaire-card {
    width: 100%;
    height: auto; /* Změněno z 100%, aby výšku určoval aspect-ratio */
    aspect-ratio: 1 / 1.45; /* Magický poměr stran klasické karty */
    position: absolute;
    top: 0; left: 0;
    border-radius: 5px;
    background-color: #fdfbf7;
    box-shadow: -1px 2px 5px rgba(0,0,0,0.5);
    display: block;
    overflow: hidden;
    font-size: clamp(0.8rem, 1.6vw, 2rem);
    font-weight: bold;
    font-family: 'Georgia', serif;
    box-sizing: border-box;
    cursor: pointer; /* Změněno z grab, protože teď na karty hlavně ťukáme */
    border: 1px solid #dcd1c4;
    z-index: 10;
    transition: box-shadow 0.15s ease, transform 0.2s ease;
}

.solitaire-card:hover:not(.card-hidden) {
    box-shadow: -1px 3px 10px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.4);
}

.card-corner {
    position: absolute;
    font-size: clamp(1rem, 2vw, 1.9rem);
    line-height: 1.1;
    font-weight: bold;
}
.card-corner-tl { top: clamp(2px, 0.6vw, 7px); left: clamp(2px, 0.6vw, 7px); }
.card-corner-br { bottom: clamp(2px, 0.6vw, 7px); right: clamp(2px, 0.6vw, 7px); transform: rotate(180deg); }

.card-red   { color: #b22222; }
.card-black { color: #1a1612; }

/* OPRAVA: Zákaz opakování pozadí rubu */
.card-hidden {
    background-image: url('assets/solitaire_back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #8f794b;
    cursor: default;
}

#f-hearts::after  { content: "♥"; color: rgba(178,34,34,0.2);  font-size: clamp(1.5rem,3vw,3rem); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
#f-diamonds::after{ content: "♦"; color: rgba(178,34,34,0.2);  font-size: clamp(1.5rem,3vw,3rem); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
#f-clubs::after   { content: "♣"; color: rgba(26,22,18,0.2);   font-size: clamp(1.5rem,3vw,3rem); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }
#f-spades::after  { content: "♠"; color: rgba(26,22,18,0.2);   font-size: clamp(1.5rem,3vw,3rem); position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* ==========================================
   PASIÁNS: RESPONZIVNÍ MEDIA QUERIES (OPRAVENO)
   ========================================== */
#landscape-warning { display: none !important; }

/* OPRAVA: Pravidla jsou teď seřazena čistě od největšího k nejmenšímu bez !important */
@media screen and (max-width: 950px), screen and (max-height: 500px) {
    .solitaire-card {
        font-size: clamp(1rem, 4vw, 1.8rem); 
        line-height: 1.1; 
    }
}

/* Portrait phones (max 600px šířky) */
@media screen and (max-width: 600px) and (orientation: portrait) {
    #solitaire-section header { padding: 8px 10px 5px; }
    #solitaire-section header h1 { font-size: 1rem; }
    #solitaire-section header p  { font-size: 0.65rem; margin-bottom: 0; }
    #solitaire-app { padding: 4px 3px; display: block; }

    .solitaire-grid { gap: 2px; margin-bottom: 3px; align-items: start; }
    
    .solitaire-card { border-radius: 3px; }
    .card-corner { font-size: 0.75rem; line-height: 1; }
    .card-corner-tl { top: 2px; left: 2px; }
    .card-corner-br { bottom: 2px; right: 2px; }

    .tableau-pile { min-height: 50px; padding-bottom: 50px; }
    .card-slot { border-width: 1px; border-radius: 3px; }

    #f-hearts::after, #f-diamonds::after, #f-clubs::after,  #f-spades::after { font-size: 1rem; }

    #solitaire-section .back-btn {
        position: relative;
        top: auto; left: auto;
        display: inline-block;
        margin: 4px 0 4px 4px;
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* Landscape mobile (telefon nastranato, výška < 500px) */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #solitaire-section header { padding: 5px 20px 3px; }
    #solitaire-section header h1 { font-size: 0.95rem; }
    #solitaire-section header p  { display: none; }
    #solitaire-app { padding: 3px; }

    .solitaire-grid { gap: 3px; margin-bottom: 3px; }
    
    .card-corner { font-size: 0.85rem; }
    .card-corner-tl { top: 2px; left: 2px; }
    .card-corner-br { bottom: 2px; right: 2px; }

    .tableau-pile { min-height: 45px; padding-bottom: 45px; }

    #solitaire-section .back-btn {
        top: 5px; left: 5px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Desktop — větší karty */
@media screen and (min-width: 900px) {
    .card-corner { font-size: 1.95rem; }
    .solitaire-grid { gap: 10px; }
    #solitaire-app { padding: 12px 16px; }
}

/* ==========================================
   TLAČÍTKA ZPĚT
   ========================================== */
#iching-section > .back-btn {
    position: fixed;
    top: 15px; left: 15px;
    z-index: 9999;
    background: rgba(26, 17, 10, 0.85);
    color: #d4b483;
    border-color: #d4b483;
    backdrop-filter: blur(4px);
    padding: 7px 14px;
    font-size: 0.85rem;
}

#iching-section > .back-btn:hover {
    background: #d4b483;
    color: #1a110a;
    box-shadow: 0 0 12px rgba(212,180,131,0.4);
}

#solitaire-section > .back-btn {
    position: fixed;
    top: 15px; left: 15px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    color: #e0e0e0;
    border-color: rgba(212,175,55,0.6);
    backdrop-filter: blur(4px);
    padding: 7px 14px;
    font-size: 0.85rem;
    pointer-events: all;
}

#solitaire-section > .back-btn:hover {
    background: rgba(212,175,55,0.2);
    color: #fca311;
    border-color: #fca311;
    box-shadow: none;
}
/* ==========================================
   LÁZEŇSKÝ MÓD: VÝBĚR KARTY DOTYKEM
   ========================================== */
.selected-card {
    box-shadow: 0 0 20px 5px rgba(252, 163, 17, 0.8) !important; /* Magická zlatá záře */
    transform: translateY(-8px) !important; /* Karta mírně povyskočí */
    border: 2px solid #fca311 !important;
    z-index: 100 !important; /* Aby vyskočila nad ostatní karty */
    transition: all 0.2s ease;
}



/* ==========================================
   DASHBOARD: 5. DLAŽDICE — featured badge
   ========================================== */

/* Zvýrazněná dlaždice pro Karolky II */
.menu-item-featured {
    border-color: rgba(201, 168, 76, 0.5);
    background: linear-gradient(160deg, #16213e 60%, #1e2a10 100%);
}
.menu-item-featured:hover {
    border-color: #c9a84c;
    box-shadow: 0 15px 30px rgba(201, 168, 76, 0.2);
}

/* Zelený "Nové" badge */
.status-badge-new {
    background: rgba(100, 180, 80, 0.12);
    color: #7ec86e;
    border-color: #7ec86e;
}

/* ==========================================
   KAROLKY II — DOUBLE KLONDIKE
   Full-screen sekce, stejný pattern jako #solitaire-section.
   Přebije .app-container přes body:has().
   ========================================== */

/* ── Full-width override ──
   app-container se skrývá přes JS (showApp/backToDashboard),
   takže body:has() override není potřeba.
   Karolky sekce je position:fixed, takže vyplní celou obrazovku. */

#karolky-section {
    background-image: url('assets/solitaire_bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: scroll;
    /* KLÍČOVÉ: fixed + inset:0 zaručí celou obrazovku bez ohledu na body flex */
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 500;
}

/* Tmavý felt-cloth overlay pod obrázkem */
#karolky-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(20,50,30,0.55) 0%, rgba(5,10,8,0.7) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ── Tlačítko zpět ── */
#karolky-section > .back-btn {
    position: fixed;
    top: 15px; left: 15px;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    color: #e0e0e0;
    border-color: rgba(201,175,55,0.6);
    backdrop-filter: blur(4px);
    padding: 7px 14px;
    font-size: 0.85rem;
    pointer-events: all;
}
#karolky-section > .back-btn:hover {
    background: rgba(201,175,55,0.2);
    color: #c9a84c;
    border-color: #c9a84c;
    box-shadow: none;
}

/* ── Header ── */
#kp-header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 12px 150px 10px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    flex-shrink: 0;
}

#kp-header h1 {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #e8c97a, #c9a84c, #8a6820);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

#kp-hud {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kp-pill {
    background: rgba(201,168,76,0.1);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: clamp(0.6rem, 1.4vw, 0.78rem);
    color: #c9a84c;
    font-family: Georgia, serif;
    letter-spacing: 1px;
}

#kp-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}
.kp-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    border: 1px solid #7a6230;
    background: #2a2010;
    transition: all 0.4s;
}
.kp-dot-active {
    background: #c9a84c;
    border-color: #e8c97a;
    box-shadow: 0 0 6px #c9a84c;
}
.kp-dot-done {
    background: #3a3010;
    border-color: #4a4020;
}

.kp-new-btn {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid rgba(201,168,76,0.4);
    color: #c9a84c;
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 4px;
    letter-spacing: 1px;
    font-family: Georgia, serif;
    cursor: pointer;
}
.kp-new-btn:hover {
    background: rgba(201,168,76,0.12);
    box-shadow: none;
}

/* ── Info bar (tap výběr) ── */
#kp-infobar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 16px;
    background: rgba(0,0,0,0.65);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    min-height: 32px;
    flex-shrink: 0;
    transition: opacity 0.25s;
}
#kp-infobar.kp-infobar-hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    min-height: 0;
    padding: 0;
    border: none;
    overflow: hidden;
}

.kp-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
#kp-info-txt {
    font-family: Georgia, serif;
    font-size: clamp(0.65rem, 1.6vw, 0.85rem);
    letter-spacing: 1px;
    color: #e8c97a;
}
#kp-info-sub {
    font-size: clamp(0.55rem, 1.3vw, 0.72rem);
    color: #a09070;
    font-style: italic;
}
.kp-info-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kp-info-hint {
    font-size: clamp(0.55rem,1.3vw,0.68rem);
    color: rgba(201,168,76,0.5);
    font-family: Georgia, serif;
}
.kp-cancel-btn {
    background: transparent;
    border: 1px solid rgba(201,168,76,0.3);
    color: #7a6230;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 0.62rem;
}
.kp-cancel-btn:hover {
    color: #c9a84c;
    background: rgba(201,168,76,0.08);
    box-shadow: none;
}

/* ── Herní plocha ── */
#kp-game {
    position: relative;
    z-index: 5;
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(5px, 1.2vw, 14px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Gridy */
.kp-grid {
    display: grid;
    gap: clamp(3px, 0.8vw, 9px);
    width: 100%;
    align-items: start;
    margin-bottom: clamp(4px, 1vw, 12px);
}
.kp-grid-11 { grid-template-columns: repeat(11, minmax(0,1fr)); }
.kp-grid-8  { grid-template-columns: repeat(8,  minmax(0,1fr)); }

.kp-spacer { pointer-events: none; }

/* ── Sloty ── */
.kp-slot {
    width: 100%;
    aspect-ratio: 1 / 1.45;
    border: 2px dashed rgba(201,168,76,0.25);
    border-radius: 6px;
    background: rgba(0,0,0,0.2);
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}
.kp-slot.kp-drag-over {
    border-color: #c9a84c !important;
    background: rgba(201,168,76,0.08) !important;
}

/* Foundation watermarks */
.kp-foundation::after {
    content: attr(data-sym);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: clamp(1rem, 2.5vw, 2.2rem);
    opacity: 0.18;
    pointer-events: none;
}
.kp-foundation[data-color="red"]::after   { color: #8b1a1a; }
.kp-foundation[data-color="black"]::after { color: #1a1512; }

/* Tableau sloty — proměnná výška */
.kp-tab {
    aspect-ratio: unset !important;
    min-height: clamp(55px, 11vw, 130px);
    position: relative;
    overflow: visible;
}

/* ── Karty ── */
.kp-card {
    width: 100%;
    height: 0;
    padding-bottom: 145%;      /* aspect-ratio 1:1.45 via padding trick */
    position: absolute;
    top: 0; left: 0;
    border-radius: 5px;
    background-color: #fdfaf3;
    border: 1px solid #c8bfa0;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.65);
    overflow: hidden;
    cursor: pointer;
    z-index: 10;
    transition: box-shadow 0.12s;
    user-select: none;
    -webkit-user-select: none;
}
.kp-card:not(.kp-back):hover {
    box-shadow: 1px 3px 12px rgba(0,0,0,0.75), 0 0 0 1px rgba(201,168,76,0.5);
}
.kp-card.kp-selected {
    outline: 3px solid #f0d060;
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgba(240,208,96,0.35), 0 4px 16px rgba(0,0,0,0.8);
    z-index: 500 !important;
}

/* Pips */
.kp-pip-tl, .kp-pip-br {
    position: absolute;
    font-size: clamp(0.7rem, 1.5vw, 1.35rem);
    line-height: 1.1;
    font-weight: 700;
    font-family: Georgia, serif;
    text-align: center;
}
.kp-pip-tl { top: clamp(2px, 0.6vw, 7px); left: clamp(2px, 0.6vw, 7px); }
.kp-pip-br { bottom: clamp(2px, 0.6vw, 7px); right: clamp(2px, 0.6vw, 7px); transform: rotate(180deg); }

.kp-red   { color: #9b1f1f; }
.kp-black { color: #1a1512; }

/* Rub karty — modrý diagonální vzor */
.kp-back {
    background: repeating-linear-gradient(
        45deg,
        #0c3d6b 0px, #0c3d6b 2px,
        #0a3260 2px, #0a3260 8px
    );
    border: 2px solid #1a5a9a;
    cursor: default;
}
.kp-back::before {
    content: '✦';
    position: absolute; top:50%; left:50%;
    transform: translate(-50%,-50%);
    font-size: clamp(0.9rem, 1.8vw, 1.5rem);
    color: rgba(201,168,76,0.4);
}
.kp-back::after {
    content: '';
    position: absolute; inset: 3px;
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 3px;
    pointer-events: none;
}

/* Stock slot — kurzor ruka */
.kp-stock-slot { cursor: pointer; }

/* ── Výsledkový overlay ── */
#kp-overlay {
    display: none;
    position: fixed; inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

#kp-overlay-box {
    background: linear-gradient(160deg, #12100a, #0d1a10);
    border: 1px solid #7a6230;
    border-radius: 12px;
    padding: 44px 55px;
    text-align: center;
    box-shadow: 0 0 60px rgba(0,0,0,0.6), 0 0 30px rgba(201,168,76,0.1);
    max-width: 400px;
    width: 90%;
}
#kp-ov-icon  { font-size: 2.8rem; margin-bottom: 10px; color: #e8c97a; }
#kp-ov-title { font-family: Georgia, serif; font-size: 2rem; font-weight: 900; letter-spacing: 4px; color: #e8c97a; margin-bottom: 14px; }
#kp-ov-msg   { color: #a09070; font-size: 1rem; line-height: 1.65; margin-bottom: 28px; font-style: italic; }

.kp-obtn {
    margin: 5px;
    padding: 10px 24px;
    border-radius: 5px;
    font-family: Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
}
.kp-obtn-gold {
    background: linear-gradient(180deg, #e8c97a, #8a6820);
    color: #1a1205;
    border: none;
}
.kp-obtn-gold:hover  { background: linear-gradient(180deg,#f0d896,#c9a84c); box-shadow: none; }
.kp-obtn-ghost {
    background: transparent;
    color: #7a6230;
    border: 1px solid #7a6230;
}
.kp-obtn-ghost:hover { color: #c9a84c; border-color: #c9a84c; background: rgba(201,168,76,0.08); box-shadow: none; }

/* ── Responsive ── */
@media screen and (max-width: 600px) and (orientation: portrait) {
    #kp-header { padding: 8px 90px 6px; }
    #kp-header h1 { font-size: 0.85rem; }
    .kp-grid-11 { grid-template-columns: repeat(10, minmax(0,1fr)); } /* waste + stock + 8 fnd */
    .kp-spacer  { display: none; }
    .kp-pip-tl, .kp-pip-br { font-size: clamp(0.5rem, 2.2vw, 0.8rem); }
}
@media screen and (max-width: 400px) and (orientation: portrait) {
    .kp-pip-tl, .kp-pip-br { font-size: 0.5rem; }
}
@media screen and (orientation: landscape) and (max-height: 480px) {
    #kp-header { padding: 5px 100px 4px; }
    #kp-header h1 { font-size: 0.85rem; letter-spacing: 2px; }
    #kp-hud .kp-pill { font-size: 0.6rem; padding: 1px 7px; }
    #kp-game { padding: 3px; }
    .kp-grid { gap: 3px; }
}
@media screen and (min-width: 900px) {
    .kp-pip-tl, .kp-pip-br { font-size: 1.2rem; }
    .kp-grid { gap: 9px; }
    #kp-game { padding: 12px 16px; }
}

/* ==========================================
   PATIČKA — EMBER GLOW EFEKT
   ========================================== */

#oracoolio-footer {
    /* Uvnitř #dashboard → přirozeně pod menu-gridem */
    width: 100%;
    padding: 28px 0 10px;
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid rgba(233, 69, 96, 0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.footer-sep {
    color: rgba(255,255,255,0.15);
    font-size: 0.9rem;
    user-select: none;
}

/* Základní stav všech odkazů — tlumený */
.footer-link {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: Georgia, serif;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 6px;
    transition:
        color 0.3s ease,
        text-shadow 0.3s ease,
        background 0.3s ease;
    cursor: pointer;
    user-select: none;
}

/* ── Ember PA — oranžová žhavá záře ── */
.footer-ember:hover {
    color: #ff6a1a;
    text-shadow:
        0 0 6px rgba(255, 106, 26, 0.9),
        0 0 14px rgba(255, 80, 0, 0.7),
        0 0 30px rgba(255, 50, 0, 0.4);
    background: rgba(255, 80, 0, 0.07);
}

/* ── Spotify — zelená záře ── */
.footer-spotify:hover {
    color: #1db954;
    text-shadow:
        0 0 6px rgba(29, 185, 84, 0.9),
        0 0 14px rgba(29, 185, 84, 0.6),
        0 0 28px rgba(29, 185, 84, 0.3);
    background: rgba(29, 185, 84, 0.07);
}

/* ── Doupě 2 — fialová gaming záře ── */
.footer-doupe:hover {
    color: #a855f7;
    text-shadow:
        0 0 6px rgba(168, 85, 247, 0.9),
        0 0 14px rgba(168, 85, 247, 0.6),
        0 0 28px rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.07);
}

/* ── Pivo — zlatá záře ── */
.footer-beer:hover {
    color: #f59e0b;
    text-shadow:
        0 0 6px rgba(245, 158, 11, 0.9),
        0 0 14px rgba(245, 158, 11, 0.6),
        0 0 28px rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.07);
}

/* Credit řádek */
.footer-credit {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.78rem;
    font-style: italic;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.footer-heart {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.footer-credit:hover .footer-heart {
    transform: scale(1.4);
    filter: drop-shadow(0 0 4px rgba(233, 69, 96, 0.8));
}

.footer-author {
    color: rgba(255, 255, 255, 0.35);
    transition: color 0.3s, text-shadow 0.3s;
}
.footer-credit:hover .footer-author {
    color: #e94560;
    text-shadow: 0 0 8px rgba(233, 69, 96, 0.6);
}

/* Patička není vidět v fullscreen hrách —
   je uvnitř #dashboard, takže se skryje automaticky s ním */
