﻿.tongue-map {
    width: 100%;
}

.tongue-map-section {
    padding: 16px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent);
}

.tongue-map-header {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- VOWELS ---------- */

.tongue-vowel-table {
    --tongue-line: color-mix(in srgb, var(--mud-palette-text-primary) 32%, transparent);
    --tongue-cell-empty-bg: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
    --tongue-cell-filled-bg: color-mix(in srgb, var(--mud-palette-primary) 32%, var(--mud-palette-surface));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    padding: 1px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--tongue-line);
}

/* ---------- AXIS ---------- */

.tongue-axis-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    margin: 4px 0 8px;
    padding: 0 4px;
}

.tongue-axis-label {
    color: var(--mud-palette-tertiary);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.tongue-axis-front {
    text-align: left;
}

.tongue-axis-center {
    text-align: center;
}

.tongue-axis-back {
    text-align: right;
}

/* ---------- CONSONANT TABLE ---------- */

.tongue-consonant-table {
    --tongue-row-height: 96px;
    --tongue-line: color-mix(in srgb, var(--mud-palette-text-primary) 32%, transparent);
    --tongue-cell-empty-bg: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
    --tongue-cell-filled-bg: color-mix(in srgb, var(--mud-palette-primary) 32%, var(--mud-palette-surface));
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--tongue-line);
}

.tongue-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    min-height: var(--tongue-row-height);
}

/* ---------- CELLS ---------- */

.tongue-cell {
    min-width: 0;
    min-height: var(--tongue-row-height, 104px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.tongue-cell-empty {
    background: var(--tongue-cell-empty-bg);
}

.tongue-cell-filled {
    background: var(--tongue-cell-filled-bg);
}

/* ---------- ACTUAL TILE ---------- */

.tongue-button {
    width: 100%;
    height: 100%;
    min-height: inherit;
    padding: 0;
    border-radius: 12px;
}

.tongue-tile-content {
    width: 100%;
    height: 100%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tongue-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(140px, 85%);
    max-height: 68px;
    object-fit: contain;
}

.tongue-label {
    color: var(--mud-palette-text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}
