/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: rgba(22, 27, 34, 0.85);
    --bg-card-hover: rgba(30, 38, 48, 0.95);
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(212, 175, 55, 0.6);
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dim: rgba(212, 175, 55, 0.15);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-orange: #f0883e;
    --accent-purple: #bc8cff;
    --step-active: #d4af37;
    --step-done: #3fb950;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 0 24px rgba(212, 175, 55, 0.15);
    --font: 'Inter', 'Noto Sans JP', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(88, 166, 255, 0.04) 0%, transparent 50%);
}

/* ===== HEADER ===== */
.app-header {
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.95) 0%, rgba(22, 27, 34, 0.95) 100%);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(212, 175, 55, 0.1);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-gold);
    flex-shrink: 0;
}

.app-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.app-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== STEP INDICATOR ===== */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    backdrop-filter: blur(8px);
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    position: relative;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.step-item.active .step-badge {
    border-color: var(--gold);
    background: var(--gold-dim);
    color: var(--gold);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.step-item.active .step-label {
    color: var(--gold);
    font-weight: 600;
}

.step-item.done .step-badge {
    border-color: var(--accent-green);
    background: rgba(63, 185, 80, 0.1);
    color: var(--accent-green);
}

.step-item.done .step-label {
    color: var(--accent-green);
}

.step-connector {
    width: 2rem;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: var(--shadow-gold);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title span {
    color: var(--gold);
    font-size: 1.1rem;
}

/* ===== SECTION ===== */
.section {
    display: none;
}

.section.active {
    display: block;
}

.step-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.step-section-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #0d1117;
    flex-shrink: 0;
}

.step-section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.step-section-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* ===== GRID ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ===== FORM ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    font-size: 0.85rem;
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* ===== STAFF TABS (Step2) ===== */
.staff-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.staff-tab {
    padding: 0.35rem 0.875rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.staff-tab:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.staff-tab.active {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 700;
}

.staff-panel {
    display: none;
}

.staff-panel.active {
    display: block;
}

/* ===== STAFF INFO BADGE ===== */
.staff-info-badge {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-gold {
    background: var(--gold-dim);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold);
}

.badge-blue {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    color: var(--accent-blue);
}

.badge-green {
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--accent-green);
}

.badge-red {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--accent-red);
}

.badge-purple {
    background: rgba(188, 140, 255, 0.1);
    border: 1px solid rgba(188, 140, 255, 0.3);
    color: var(--accent-purple);
}

.badge-orange {
    background: rgba(240, 136, 62, 0.1);
    border: 1px solid rgba(240, 136, 62, 0.3);
    color: var(--accent-orange);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0d1117;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: rgba(248, 81, 73, 0.2);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.btn-nav-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ===== GENERATE BUTTON AREA ===== */
.generate-area {
    text-align: center;
    padding: 2rem;
    background: var(--gold-dim);
    border: 1px dashed rgba(212, 175, 55, 0.4);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.generate-area p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ===== SHIFT TABLE ===== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

thead th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 0.75rem 0.875rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-active);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

tbody tr:last-child {
    border-bottom: none;
}

td {
    padding: 0.6rem 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.td-date {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.td-day {
    font-size: 0.78rem;
    font-weight: 600;
}

.td-day.sat {
    color: var(--accent-blue);
}

.td-day.sun {
    color: var(--accent-red);
}

.td-day.hol {
    color: var(--accent-red);
}

.td-day.hol-mark {
    color: var(--accent-red);
}

.td-name {
    font-weight: 500;
}

.td-time {
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.staff-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 1px;
}

.row-gap td {
    padding: 0.25rem 0.875rem;
}

.date-header-row td {
    background: rgba(22, 27, 34, 0.6);
    font-weight: 700;
    border-top: 2px solid var(--border);
    padding: 0.5rem 0.875rem;
}

/* 人員不足 */
.shortage-row {
    background: rgba(248, 81, 73, 0.05) !important;
}

.shortage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    color: var(--accent-red);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== REPORT ===== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.report-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.report-card.ok {
    border-left: 3px solid var(--accent-green);
}

.report-card.warn {
    border-left: 3px solid var(--accent-orange);
}

.report-card.error {
    border-left: 3px solid var(--accent-red);
}

.report-card-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.report-hours {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.report-hours.ok {
    color: var(--accent-green);
}

.report-hours.warn {
    color: var(--accent-orange);
}

.report-hours.error {
    color: var(--accent-red);
}

.report-limit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.progress-fill.ok {
    background: var(--accent-green);
}

.progress-fill.warn {
    background: var(--accent-orange);
}

.progress-fill.error {
    background: var(--accent-red);
}

.violation-list {
    list-style: none;
}

.violation-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.violation-list li:last-child {
    border-bottom: none;
}

.violation-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.ok-icon {
    color: var(--accent-green);
}

.warn-icon {
    color: var(--accent-orange);
}

.err-icon {
    color: var(--accent-red);
}

/* ===== TOOLBAR ===== */
.output-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.output-toolbar .spacer {
    flex: 1;
}

/* ===== SUMMARY STAT ===== */
.summary-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ===== TOGGLE CHIP ===== */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 0.2rem;
}

.view-toggle button {
    padding: 0.3rem 0.875rem;
    border: none;
    border-radius: 2rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}

.view-toggle button.active {
    background: var(--gold);
    color: #0d1117;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== ALERT ===== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.25);
    color: #7db8f7;
}

.alert-warn {
    background: rgba(240, 136, 62, 0.08);
    border: 1px solid rgba(240, 136, 62, 0.25);
    color: var(--accent-orange);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SPINNER ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(13, 17, 23, 0.3);
    border-top-color: #0d1117;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== PRINT ===== */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .app-header,
    .step-indicator,
    .output-toolbar,
    .btn-nav-group,
    .generate-area {
        display: none !important;
    }

    .section {
        display: block !important;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
        background: #fff;
    }

    table {
        font-size: 11px;
    }

    thead th {
        background: #f5f5f5;
        color: #333;
    }

    td {
        color: #000;
    }

    .staff-chip {
        border: 1px solid #999;
        background: #f9f9f9;
        color: #000;
    }

    .shortage-badge {
        border: 1px solid #f00;
        color: #f00;
        background: #fff0f0;
    }

    .td-day.sat {
        color: #1a5cb5;
    }

    .td-day.sun,
    .td-day.hol {
        color: #c0392b;
    }
}

/* ===== MATRIX TABLE (横型シフト表) ===== */
.matrix-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.matrix-table {
    width: max-content;
    /* 横スクロール対応 */
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

/* ヘッダー全般 */
.matrix-table thead th {
    padding: 0.45rem 0.4rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    border: 1px solid var(--border);
    white-space: nowrap;
    color: var(--text-primary);
    background: rgba(212, 175, 55, 0.08);
}

/* 日付行 */
.matrix-row-date th {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
}

/* 曜日行 */
.matrix-row-dow th {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* 左端ラベル列（氏名・合計人数など） */
.matrix-label-cell {
    min-width: 90px;
    text-align: left !important;
    padding: 0.5rem 0.75rem !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    color: var(--text-secondary) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    position: sticky;
    left: 0;
    z-index: 2;
    border-right: 2px solid var(--border-active) !important;
}

/* スタッフ名セル */
.matrix-staff-name {
    min-width: 90px;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
    border-right: 2px solid var(--border-active);
}

/* 日付ヘッダーセル */
.matrix-date-cell {
    min-width: 72px;
    text-align: center;
}

/* 曜日セル */
.matrix-dow-cell {
    min-width: 72px;
    text-align: center;
}

/* シフト時間セル */
.matrix-shift-cell {
    text-align: center;
    padding: 0.45rem 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    font-size: 0.72rem;
    min-width: 72px;
}

/* 土日祝 背景色（ひな形の黄色に対応） */
.matrix-wknd {
    background: rgba(255, 200, 0, 0.07) !important;
}

.matrix-hol {
    background: rgba(255, 100, 80, 0.1) !important;
}

/* 曜日ラベルの土日色 */
.matrix-dow-cell.matrix-wknd {
    color: var(--accent-orange);
}

.matrix-dow-cell.matrix-hol {
    color: var(--accent-red);
}

.matrix-date-cell.matrix-wknd {
    color: var(--accent-orange);
}

.matrix-date-cell.matrix-hol {
    color: var(--accent-red);
}

/* 休みセル */
.matrix-off-cell {
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* 合計行 */
.matrix-total-row td {
    background: rgba(212, 175, 55, 0.07);
    font-weight: 700;
    text-align: center;
    border-top: 2px solid var(--border-active);
    border: 1px solid var(--border);
    padding: 0.45rem 0.3rem;
}

/* 不足行 */
.matrix-shortage-row td {
    background: rgba(248, 81, 73, 0.04);
    text-align: center;
    font-weight: 700;
    border: 1px solid var(--border);
    padding: 0.45rem 0.3rem;
}

/* 人員不足セル */
.matrix-shortage {
    background: rgba(248, 81, 73, 0.15) !important;
    color: var(--accent-red) !important;
}

/* 集計列（右端） */
.matrix-sum-cell {
    min-width: 56px;
    text-align: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.matrix-staff-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.matrix-staff-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* 印刷時 */
@media print {
    .matrix-table-wrapper {
        overflow: visible;
    }

    .matrix-table {
        font-size: 8px;
    }

    .matrix-wknd {
        background: #fffde7 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .matrix-hol {
        background: #fff0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .matrix-staff-name,
    .matrix-label-cell {
        position: static;
    }
}