* {
    box-sizing: border-box;
}
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 15px;
    transition: background-color 0.2s ease;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ヘッダー・コントロールパネル */
header {
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
h1 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    color: #222;
}
.lead-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background-color: #f1f3f5;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.controls label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}
.btn-reset {
    padding: 5px 12px;
    background-color: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}
.btn-reset:hover {
    background-color: #333;
}

/* テーブルデザイン（ご提示のクラス .waku と .thin に対応） */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
}
table.color-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-size: 0.95rem;
}
.waku {
    border: 1px solid #cccccc;
    padding: 10px 12px;
    vertical-align: middle;
}
th.waku {
    background-color: #eeeeee;
    text-align: left;
    color: #222222;
}
th.waku h3 {
    margin: 0;
    font-size: 1.15rem;
    display: inline-block;
}
.thin {
    font-weight: normal;
    color: #555555;
    font-size: 0.85rem;
}
.sub-header th {
    background-color: #f7f7f7;
    font-size: 0.85rem;
    text-align: center;
    color: #444;
}

/* マウスカーソルを合わせたときの背景色・文字色変更効果 */
tr.color-row {
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
tr.color-row:hover {
    background-color: var(--row-bg) !important;
    color: var(--row-text) !important;
}
tr.color-row:hover small {
    color: var(--row-text) !important;
    opacity: 0.9;
}

/* 各セルの幅と配置 */
.swatch-cell {
    width: 50px;
    min-width: 40px;
}
.name-cell {
    min-width: 160px;
}
.name-cell small {
    color: #666666;
    font-size: 0.8rem;
}
.code-cell, .rgb-cell, .num-cell {
    font-family: Consolas, Monaco, "Courier New", monospace;
    text-align: center;
    white-space: nowrap;
}
.code-cell {
    font-weight: bold;
}

/* コピー通知トースト */
#toast {
    visibility: hidden;
    min-width: 240px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 12px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#toast.show {
    visibility: visible;
    animation: fadein 0.3s, fadeout 0.3s 1.7s;
}
@keyframes fadein {
    from { bottom: 10px; opacity: 0; }
    to { bottom: 30px; opacity: 1; }
}
@keyframes fadeout {
    from { bottom: 30px; opacity: 1; }
    to { bottom: 10px; opacity: 0; }
}

/* Tablet / Smartphone レスポンシブ調整 */
@media screen and (max-width: 768px) {
    body {
        padding: 8px;
    }
    .container {
        padding: 12px;
    }
    h1 {
        font-size: 1.25rem;
    }
    .waku {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
    th.waku h3 {
        font-size: 1rem;
    }
}
