:root {
    --border-color: #d0d7de;
    --header-bg: #f6f8fa;
    --row-alt-bg: #fcfcfc;
    --text-color: #24292f;
}

.datagrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: clip;
    color: var(--text-color);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans JP", sans-serif;
    font-size: 14px;
    max-width: 360px;
    /* 最大幅は現状維持 */
    margin-left: 20px;
    /* 左端から少し余白 */
    margin-top: 20px;
    text-align: center;
    /* セルの文字を中央寄せ */
}

.datagrid .cell.header {
    font-weight: 600;
    background: var(--header-bg);
}

.datagrid .cell {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    overflow-wrap: anywhere;
}

.datagrid .cell:nth-child(3n) {
    border-right: none;
}

.datagrid .cell:nth-last-child(-n + 3) {
    border-bottom: none;
}

.datagrid .cell.data:nth-child(n + 4) {
    background: white;
}

.datagrid .cell.data:nth-child(n + 4):nth-child(6n + 4),
.datagrid .cell.data:nth-child(n + 4):nth-child(6n + 5),
.datagrid .cell.data:nth-child(n + 4):nth-child(6n + 6) {
    background: var(--row-alt-bg);
}

button {
    margin-top: 10px;
    margin-left: 20px;
}