.kww-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
}

@media screen and (min-width: 768px) {
    .kww-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.kww-card {
    min-width: 0;
    padding: 8px;
    overflow: hidden;
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #fff;
    border: 2px solid #0d730d;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kww-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.kww-flag {
    width: 36px;
    height: 36px;
    margin: 0 auto 4px;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 1 / 1;
}

.kww-flag img {
    display: block;
    width: 36px;
    height: 36px;
    max-width: none;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.kww-code {
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    font-size: 1em;
    font-weight: 700;
    color: #0d730d;
}

.kww-rate {
    margin-bottom: 2px;
    overflow-wrap: anywhere;
    font-size: 0.9em;
    color: #333;
}

.kww-unit {
    min-height: 1.2em;
    margin-bottom: 2px;
    font-size: 0.7em;
    color: #666;
}

.kww-change {
    font-size: 0.9em;
    font-weight: 700;
    white-space: nowrap;
}

.kww-change.positive {
    color: #0d730d;
}

.kww-change.negative {
    color: #d32f2f;
}

.kww-change.neutral {
    color: #666;
}

.kww-update-info,
.kww-empty {
    margin-top: 8px;
    font-size: 0.8em;
    line-height: 1.4;
    text-align: center;
    color: #666;
}

.kww-update-info span:not(:last-child)::after {
    content: " ";
}

@media (prefers-reduced-motion: reduce) {
    .kww-card {
        transition: none;
    }

    .kww-card:hover {
        transform: none;
    }
}
