.itc-quiz-app {
    background: #f5f7fa;
    color: #1f2937;
    font-family: "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
    margin: 0 auto;
}

.itc-quiz-app * {
    box-sizing: border-box;
}

.itc-auth {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 24, 39, 0.72);
}

.itc-auth[hidden] {
    display: none;
}

.itc-auth-card {
    width: min(100%, 448px);
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.itc-auth-card h2 {
    margin: 0;
    font-size: 22px;
}

.itc-auth-card p {
    margin: 10px 0 0;
    color: #4b5563;
}

.itc-auth-card form {
    margin-top: 20px;
}

.itc-auth-card label span {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.itc-auth-card input,
.itc-filters select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
}

.itc-auth-card button,
.itc-filters button,
.itc-start button,
.itc-next {
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.itc-auth-card button {
    width: 100%;
    margin-top: 18px;
    padding: 12px 16px;
}

.itc-auth-error {
    color: #dc2626 !important;
}

.itc-header {
    padding: 20px 16px;
    background: #1d4ed8;
    color: #fff;
    text-align: center;
}

.itc-header h1 {
    margin: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1.35;
}

.itc-header p {
    margin: 6px 0 0;
    color: #dbeafe;
}

.itc-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.itc-source-links a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.itc-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 980px;
    margin: 18px auto 0;
}

.itc-filters button {
    min-height: 42px;
    background: #fff;
    color: #1d4ed8;
}

.itc-progress {
    margin-top: 14px;
    font-size: 14px;
}

.itc-main {
    padding: 16px;
}

.itc-question-container {
    max-width: 1080px;
    min-height: 260px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.itc-start {
    padding: 48px 0;
    text-align: center;
}

.itc-start-title {
    font-size: 20px;
}

.itc-start button,
.itc-next {
    margin-top: 24px;
    padding: 12px 24px;
}

.itc-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
}

.itc-meta {
    margin-bottom: 18px;
    color: #4b5563;
}

.itc-question {
    margin-bottom: 24px;
    white-space: pre-line;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.7;
}

.itc-options {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.itc-option {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    text-align: left;
    line-height: 1.6;
    transition: background-color 0.2s ease;
}

.itc-option:hover {
    background: #eff6ff;
}

.itc-option.correct {
    border-color: #34d399;
    background: #d1fae5;
}

.itc-option.incorrect {
    border-color: #f87171;
    background: #fee2e2;
}

.itc-option:disabled {
    cursor: default;
    opacity: 0.75;
}

.itc-result {
    border-radius: 8px;
    padding: 12px;
    white-space: pre-line;
}

.itc-result.correct {
    background: #d1fae5;
    color: #065f46;
}

.itc-result.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

.itc-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.itc-summary-card {
    padding: 18px;
    border-radius: 8px;
    background: #f3f4f6;
    text-align: center;
}

.itc-summary-card strong {
    display: block;
    font-size: 32px;
    color: #1d4ed8;
}

.itc-table-wrap {
    overflow-x: auto;
}

.itc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.itc-table th,
.itc-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
}

.itc-table th {
    background: #f3f4f6;
}

.itc-footer {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #4b5563;
    text-align: center;
}

@media (max-width: 760px) {
    .itc-filters {
        grid-template-columns: 1fr;
    }

    .itc-header h1 {
        font-size: 22px;
    }

    .itc-question-container {
        padding: 18px;
    }
}
