:root {
    --tk-pink: #f9c5d1;
    --tk-blue: #bde0fe;
    --tk-yellow: #fde68a;
    --tk-green: #bbf7d0;
    --tk-purple: #e9d5ff;
}

.tk-page {
    font-family: "Comic Sans MS", "Nunito", "Poppins", sans-serif;
    touch-action: manipulation;
}

.tk-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background: #fffafc;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    border: 2px dashed #fbcfe8;
}

.tk-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 0 0 8px;
}

.tk-hero p {
    font-size: 1.05rem;
}

.tk-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tk-hero-badges span {
    background: var(--tk-green);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.tk-hero-illu {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tk-blob {
    width: 140px;
    height: 140px;
    border-radius: 40% 60% 50% 50%;
    background: var(--tk-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.tk-section h2 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin: 12px 0;
}

.tk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.tk-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: #111827;
    border: 2px solid transparent;
}

.tk-card:hover {
    border-color: #a5b4fc;
}

.tk-card h3 {
    margin: 8px 0 4px;
    font-size: 1.2rem;
}

.tk-card p {
    margin: 0;
    font-size: 1rem;
}

.tk-icon {
    font-size: 2rem;
}

.tk-card--pink { background: var(--tk-pink); }
.tk-card--blue { background: var(--tk-blue); }
.tk-card--yellow { background: var(--tk-yellow); }

.tk-nav-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tk-nav-icons a {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff;
    border: 2px solid #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.6rem;
}

.tk-nav-icons button {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
}

.tk-colorable {
    text-align: center;
    font-size: 1.4rem;
}

.tk-svg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.tk-svg-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.tk-svg-card img {
    width: 100%;
    height: auto;
}

.tk-svg-card p {
    margin: 8px 0 0;
    font-size: 0.95rem;
    color: #6b7280;
}

.tk-draw-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tk-draw-tools button,
.tk-draw-tools input[type="color"] {
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 0 12px;
    background: #fff;
    cursor: pointer;
}

.tk-canvas-wrap {
    background: #fff;
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    padding: 10px;
}

.tk-canvas-stage {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    touch-action: none;
}

.tk-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Letter grid */
.tk-letter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.tk-letter-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    text-align: left;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tk-letter-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tk-letter-char {
    font-size: 1.6rem;
}

.tk-letter-card .tk-letter-word {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.tk-letter-card.is-lower {
    background: #ecfeff;
    border-color: #a5f3fc;
}

.tk-letter-emoji {
    font-size: 1.6rem;
}

.tk-letter-card:nth-child(4n+1) { background: #fef3c7; }
.tk-letter-card:nth-child(4n+2) { background: #e0f2fe; }
.tk-letter-card:nth-child(4n+3) { background: #ede9fe; }
.tk-letter-card:nth-child(4n) { background: #dcfce7; }

.tk-letter-card.is-selected {
    outline: 3px solid #60a5fa;
}

@media (max-width: 768px) {
    .tk-hero {
        padding: 16px;
    }

    .tk-card {
        padding: 14px;
    }
}
