body {
    background: #f7f7fa;
    font-family: 'Segoe UI', 'Hiragino Sans', 'Meiryo', sans-serif;
    color: #222;
    margin: 0;
    padding: 0;
}

header {
    background: linear-gradient(90deg, #0b4bc2 0%, #6fc4a1 100%);
    padding: 16px 0;
    box-shadow: 0 2px 6px rgba(40, 60, 120, 0.04);
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-radius: 0 0 24px 24px;
}

h1 {
    color: #fff;
    padding: 0;
    margin: 0;
    text-align: center;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 1.3em;
}

/* --- ヘッダーメニュー --- */
#header_menu {
    top: 0;
    right: 0;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.8rem;
    padding-right: 2em;
    border-top: 1px solid #3f6ecb;
}

#header_menu .nickname {
    border-radius: 6px;
    padding: 4px 8px;
    background-color: #437ce5;
    color: #fff;
}

#header_menu ul {
    display: flex;
    gap: 1em;
    margin: 0;
    list-style: none;
    color: white;
    background-color: #2177cd;
    border-radius: 6px;
    padding: 4px 8px;
}

#header_menu li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

#header_menu a {
    color: #fff;
    text-decoration: none;
    font-weight: normal;
}

.app-version {
    margin-top: 4px;
    color: #6b7280;
    font-size: 0.7rem;
    text-align: center;
}

/* --- フッター --- */
#footer {
    width: 100%;
    background: #f8fafc;
    padding: 20px 0 16px 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(40, 60, 120, 0.04);
    position: relative;
    margin-top: 5em;
}

#footer .copyright {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 10px;
}

/* --- フォーム・入力 --- */
.form {
    background: #fff;
    margin: 8px auto 8px auto;
    padding: 12px 18px 8px 18px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    max-width: 800px; /* 追加: フォームの最大幅を指定 */
    text-align: left;
}

label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.form textarea {
    width: 100%;
    box-sizing: border-box; /* 追加: パディング・ボーダーを含めて100%に */
    border: 1.5px solid #b3c6ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    line-height: 1.5rem;
    margin-top: 8px;
    margin-bottom: 4px;
    background: #fafdff;
    transition: border 0.2s;
}

.form textarea:focus {
    border: 2px solid #4f8cff;
    outline: none;
    background: #f0f8ff;
}

button[type="submit"] {
    background: linear-gradient(90deg, #4f8cff 0%, #6ee7b7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
    transition: background 0.2s, transform 0.1s;
}

button[type="submit"]:hover {
    background: linear-gradient(90deg, #6ee7b7 0%, #4f8cff 100%);
    transform: translateY(-2px) scale(1.03);
}

.form input[type="number"],
.form input[type="text"],
.form input[type="email"],
.form input[type="password"] {
    width: 100%;
    box-sizing: border-box; /* 追加: パディング・ボーダーを含めて100%に */
    border: 1.5px solid #b3c6ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 16px;
    background: #fafdff;
    transition: border 0.2s;
}
.form input[type="text"]:focus,
.form input[type="email"]:focus,
.form input[type="password"]:focus {
    border: 2px solid #4f8cff;
    outline: none;
    background: #f0f8ff;
}
.form select {
    width: 100%;
    box-sizing: border-box; /* 追加: パディング・ボーダーを含めて100%に */
    border: 1.5px solid #b3c6ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 16px;
    background: #fafdff;
    transition: border 0.2s;
}
.form select:focus {
    border: 2px solid #4f8cff;
    outline: none;
    background: #f0f8ff;
}

/* --- セクションタイトル --- */
h2 {
    color: #4f8cff;
    margin-top: 40px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* --- 校正結果・リスト --- */
#result-block {
    margin-top: 24px;
}

.result-container {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(79,140,255,0.07);
    margin: 8px auto 0 auto;
    padding: 8px 12px;
    text-align: left;
}

.result-container ul {
    padding-left: 0;
    list-style: none;
}

.result-container li {
    margin-bottom: 8px;
    padding: 14px 14px;
    background: #f0f4ff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(79,140,255,0.04);
}

.result-container li strong {
    color: #2563eb;
    font-size: 1.08rem;
}

.info-message {
    color: #2563eb !important;
    font-weight: normal;
    font-size: 1.05rem;
    background-color: #f4f7fd;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.error-message {
    color: #ef4444 !important;
    font-weight: 700;
    font-size: 1.05rem;
}

.error-detail {
    color: #374151 !important;
    font-size: 0.8rem;
    text-align: left;
    padding: 8px;
}

.error-line-info {
    cursor: pointer;
    border-bottom: 1px dotted #8888ef;
    margin-bottom: 0.3em;
}

.no-error {
    color: #10b981;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    display: block;
    margin: 18px 0;
}

a {
    color: #4f8cff;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
}

a:hover {
    text-decoration: underline;
    color: #2563eb;
}

/* --- ボタン --- */
#proofread-buttons {
    text-align: center;
    gap: 1.5em;
}
#proofread-buttons button {
    margin-left: 8px;
    margin-right: 8px;
}
.btn-size-m {
    width: 10rem;
}
.btn-size-s {
    width: 4rem;
}

.proofread-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}
.proofread-btn:hover {
    background-color: #388e3c;
    transform: scale(1.05);
}

.proofread-btn:disabled {
    background-color: #a5a5a5;
    cursor: not-allowed;
}
.proofread-btn:disabled:hover {
    background-color: #a5a5a5;
    transform: none;
}

.proofread-btn-blue {
    background-color: #7d7da8;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.proofread-btn-blue:hover {
    background-color: #5c5c8a;
    transform: scale(1.05);
}
.proofread-btn-blue:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 125, 168, 0.5);
}
.proofread-btn-blue:disabled {
    background-color: #b0b0d0;
    cursor: not-allowed;
}

/* 下部の「このファイルを修正済みにマーク」ボタンは青色で表示する (Issue #98) */
#mark-fixed-block .proofread-btn-blue {
    background-color: #007BFF;
}

#mark-fixed-block .proofread-btn-blue:hover {
    background-color: #0056b3;
}

#mark-fixed-block .proofread-btn-blue:focus {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.4);
}

#mark-fixed-block .proofread-btn-blue:disabled {
    background-color: #8ec2f5;
}


/* --- 校正修正ブロック --- */
.fix-button {
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
}

.fix-button::before {
    content: "✔";
    font-size: 1rem;
    margin-right: 8px;
}

.fix-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.fix-button:active {
    background-color: #003f7f;
    transform: scale(0.95);
}

.fix-before {
    font-size: 0.9rem;
    color: #955;
}

.fix-after {
    font-size: 0.9rem;
    color: #353;
}

.fix_block {
    margin-top: 0.3em;
    padding-top: 0.5em;
    border-top: 1px dotted #ccc;
    color: #003f7f;
    text-align: left;
    width: 100%;
}

.fix_block > ul > li {
    padding: 0;
    margin: 0;
    margin-left: 2em;
    color: #888;
    list-style-type: disc;
    font-size: 0.8rem;
}

.fix-button-block {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.fix-button-cancel {
    background-color: rgba(230, 74, 74, 0.5);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
}

.fix-button-cancel::before {
    content: "✖";
    font-size: 1rem;
    margin-right: 8px;
}

.fix-button-cancel:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

.fix-button-cancel:active {
    background-color: #b91c1c;
    transform: scale(0.95);
}

.fix_block_no-fix {
    text-align: right;
    padding: 0;
    margin: 0;
}

/* 同じ指摘をまとめて却下する「...」メニュー */
.fix-menu-wrap {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.fix-menu-button {
    background-color: rgba(100, 116, 139, 0.85);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    /* 無視ボタン (アイコン 1rem 分の行の高さ) と高さをそろえる */
    line-height: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
}

.fix-menu-button:hover {
    background-color: #475569;
}

.fix-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 4px;
    min-width: 220px;
}

.fix-menu.open {
    display: block;
}

.fix-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #111827;
    border-radius: 6px;
    white-space: nowrap;
}

.fix-menu-item:hover {
    background: #eef3ff;
}

/* 修正履歴 */
.history-block {
    text-align: left;
    border-top: 1px solid #dbe3ee;
    padding: 16px;
}

.history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.history-heading h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.15rem;
}

.history-count {
    color: #64748b;
    font-size: 0.85rem;
    white-space: nowrap;
}

#history-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#history-list > li {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.history-card-top {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 28px;
}

.history-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.history-status.is-fixed { background: #dcfce7; color: #166534; }
.history-status.is-dismissed { background: #fef3c7; color: #92400e; }
.history-status.is-undone { background: #e2e8f0; color: #475569; }

.history-date {
    color: #64748b;
    font-size: 0.8rem;
}

.history-card-top .history-menu-wrap { margin-left: auto; }

.history-item-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 9px;
    margin-top: 7px;
}

.history-item-title strong { font-size: 0.98rem; }

.history-location {
    color: #64748b;
    font-size: 0.82rem;
    white-space: nowrap;
}

.history-change {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.history-change-part { display: grid; gap: 2px; min-width: 0; }
.history-change-label { color: #64748b; font-size: 0.72rem; font-weight: 700; }
.history-change .fix-before,
.history-change .fix-after { font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-change-arrow { color: #94a3b8; font-weight: 700; }

/* 修正履歴の「...」メニュー (Issue #102): 履歴カードに合わせて小さくする */
.history-menu-wrap .fix-menu-button {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1rem;
}

.history-menu-wrap .fix-menu {
    min-width: 120px;
}

/* 修正履歴から取り消した行 */
.history-undone {
    opacity: 0.6;
}

.history-undone .history-status { background: #dcfce7; color: #166534; }

.history-undone .history-undo-status {
    margin-left: 8px;
    color: #166534;
    font-weight: bold;
}

.history-undo-status {
    margin-left: 8px;
    font-size: 13px;
}

.history-undo-note {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #4b5563;
}

@media (max-width: 560px) {
    .history-block { padding: 12px; }
    #history-list > li { padding: 10px; }
    .history-card-top { flex-wrap: wrap; }
    .history-card-top .history-menu-wrap { margin-left: auto; }
    .history-change { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .history-change-arrow { display: none; }
}

/* 決定済みの項目: ボタンの場所に決定内容と「やり直す」を表示する (Issue #93) */
.result-container li.decided {
    background: #f3f4f6;
    opacity: 0.75;
}

.result-container li.decided .error-detail,
.result-container li.decided .fix_block > ul,
.result-container li.decided .fix-button-block > button,
.result-container li.decided .fix-button-block > .fix-menu-wrap,
.result-container li.decided .fix_block_no-fix > button,
.result-container li.decided .fix_block_no-fix > .fix-menu-wrap {
    display: none;
}

.fix-decision-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.fix-decision {
    font-size: 0.9rem;
    color: #374151;
}

.fix-button-undo {
    background-color: #fff;
    color: #2563eb;
    border: 1px solid #2563eb;
    border-radius: 5px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
}

.fix-button-undo:hover {
    background-color: #eef3ff;
    transform: scale(1.05);
}

.fix-button-undo:active {
    transform: scale(0.95);
}

/* --- ハイライト・校正結果 --- */
.line-highlight {
    background-color: #fffbcc;
    border: 2px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    padding: 0.4em 0.8em;
    border-radius: 8px;
    margin-bottom: 0.3em;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.line-highlight:hover {
    background-color: #fef3c7;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.line-highlight:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.2);
}

.block_item {
    margin-bottom: 16px;
    padding: 12px;
    background: #ffffff;
    color: black;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(79,140,255,0.05);
}
.block_item form h3 {
    margin: 0 0 8px 0;
    color: #2563eb;
    font-size: 1.2rem;
    text-align: center;
    border-bottom: dotted 1px #d1d5db;
    padding-bottom: 4px;
    margin-bottom: 1em;
}
.description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 12px;
}
.block_item form input[type="text"],
.block_item form input[type="email"],
.block_item form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    background: #f9fafb;
    transition: border-color 0.2s, background-color 0.2s;
}
.block_item form input[type="text"]:focus,
.block_item form input[type="email"]:focus,
.block_item form input[type="password"]:focus {
    border-color: #2563eb;
    background-color: #f0f4ff;
    outline: none;
}
.block_item form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    background: #f9fafb;
    transition: border-color 0.2s, background-color 0.2s;
}
.block_item form input[type="file"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    background: #f9fafb;
    transition: border-color 0.2s, background-color 0.2s;
}
form .note {
    font-size: 0.8rem;
    color: #505863;
    margin-bottom: 12px;
    text-align: right;
}
.login_info {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 8px;
    padding: 1em;
    background-color: #eee;
    border-radius: 8px;
    margin-bottom: 1em;
}

.project-item {
    background: #d0deff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(79,140,255,0.05);
    margin-bottom: 16px;
}

.project-item .memo {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.project-item h4 {
    margin: 0 0 8px 0;
    color: #5d73a4;
    font-size: 1.2rem;
    border-bottom: dotted 1px #173055;
}

a.s_button {
    display: inline-block;
    background-color: #4f8cff;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}
a.s_button:hover {
    background-color: #3b6ecb;
    transform: translateY(-2px);
}
a.s_button:active {
    background-color: #2a4f9f;
    transform: translateY(0);
}

.dialog-content {
    padding: 1em;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    /* コンテンツを中央に表示 */
    margin: 0 auto;
}

.dialog-content h3 {
    color: #4f8cff;
    font-size: 1.5rem;
    margin-bottom: 16px;
    text-align: center;
    border-bottom: 1px dashed #d1d5db;
}

/* お知らせの閉じるボタン (Issue #113) */
.announcement-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #555;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
}

.announcement-close-btn:hover {
    background-color: #c8c8c8;
    color: #222;
}

.announcement-close-btn:focus-visible {
    background-color: #c8c8c8;
    color: #222;
    outline: 2px solid #2c3e50;
    outline-offset: 1px;
}

.tab-component.announcements-section {
    text-align: left;
}

.dialog-content h1,
.form-container h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.form-container {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.form-container label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.form-container input[type="password"],
.form-container input[type="text"],
.form-container input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #b3c6ff;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    margin-top: 8px;
    margin-bottom: 16px;
    background: #fafdff;
    transition: border 0.2s;
}

.form-container input[type="password"]:focus,
.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus {
    border: 2px solid #4f8cff;
    outline: none;
    background: #f0f8ff;
}

.form-container button[type="submit"] {
    background: linear-gradient(90deg, #4f8cff 0%, #6ee7b7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79,140,255,0.10);
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.form-container button[type="submit"]:hover {
    background: linear-gradient(90deg, #6ee7b7 0%, #4f8cff 100%);
    transform: translateY(-2px) scale(1.03);
}


span.marked {
    background-color: #fffbcc;    
    padding: 0.2em 0.5em;
    border-radius: 4px;
    margin-bottom: 0.1em;
    display: inline-block;
}

.saved_file {
    background: #afc0ef;
}

.proofread-status {
    background-color: #96cffa;
    color: rgb(11, 40, 110);
    padding: 4px;
    border-radius: 4px;
}

.help-container {
    background: #f0f4ff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(79,140,255,0.1);
    margin-top: 24px;
}

.help-container h3 {
    color: #4f8cff;
    font-size: 1.2rem;
    margin-bottom: 16px;
    text-align: left;
    border-top: 1px dashed #d1d5db;
    border-bottom: 1px dashed #d1d5db;
    border-left: 6px solid #59a5f1;
    padding-left: 12px;
}

.tab-component {
    text-align: center;
    margin-top: 16px;
}

#download-text {
    width: 100%;
    box-sizing: border-box; /* 追加: パディング・ボーダーを含めて100%に */
    border-top: 1px solid #d1d5db;
    margin-top: 5em;
    display: block; /* 変更: inline-block → block */
    background-color: #f1f2f4;
    color: rgb(36, 41, 71);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: normal;
    transition: background-color 0.2s, transform 0.1s;
}

.warning {
    color: #ca461d;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 16px;
}

.button {
    display: inline-block;
    background-color: #4f8cff;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}
.button:hover {
    background-color: #3b6ecb;
    transform: translateY(-2px);
}
.button:active {
    background-color: #2a4f9f;
    transform: translateY(0);
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.file-list li {
    background: #e0e7ff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(79,140,255,0.05);
}
.file-list li a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}
.file-list li a:hover {
    text-decoration: underline;
    color: #1e40af;
}

table.project-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
table.project-info-table th,
table.project-info-table td {
    border: 1px solid #d1d5db;
    padding: 10px;
    background-color: #f9fafb;;
}
table.project-info-table th {
    background-color: #eaf0ff;
    color: #2563eb;
    font-weight: bold;
    text-align: right;;
    width: 6rem;
    font-size: 0.9rem;
}
table.project-info-table td {
    background-color: #f4f8ff;
    color: #374151;
    text-align: left;
    font-size: 0.9rem;
}
span.item_label {
    color: #112e6d;
}

span.diff_header {
    background-color: #f4fdc7;
    padding: 0.3em 0.6em;
    border-radius: 4px;
    margin-bottom: 0.1em;
    display: inline-block;
    text-decoration: underline;
    font-weight: bold;
}
span.diff_minus {
    background-color: #ffcccc;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    margin-bottom: 0.1em;
    display: inline-block;
}
span.diff_plus {
    background-color: #ccffcc;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    margin-bottom: 0.1em;
    display: inline-block;
}
div.text-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0px;
    padding: 4px;
    background-color: #f8fafc;
    margin-bottom: 1em;
    text-align: right;
    font-family: monospace;
}

/* ページネーション */
.pagination-container {
    margin: 20px 0;
    text-align: center;
}

.pagination-info {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 2px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0b4bc2;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.page-link:hover {
    background-color: #f0f7ff;
    border-color: #0b4bc2;
}

.page-current {
    display: inline-block;
    padding: 8px 12px;
    margin: 2px;
    background-color: #0b4bc2;
    color: #fff;
    border: 1px solid #0b4bc2;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

.page-ellipsis {
    display: inline-block;
    padding: 8px 4px;
    margin: 2px;
    color: #999;
    font-size: 0.9rem;
}

.login_error {
    font-size: 0.9rem;
    color: #ef4444;
    margin-top: 8px;
    padding: 1em;
    background-color: #ffe5e5;
    border-radius: 8px;
    margin-bottom: 1em;
}
table.usage {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
table.usage tr {
    border-bottom: 1px solid #d1d5db;
}
table.usage th {
    background-color: #eaf0ff;
    color: #2563eb;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    width: 8em;
}
table.usage td.r {
    text-align: right;
}

/* AI校正の項目バッジ (Issue #32) */
/* バッジの縦位置: vertical-align: middle は x-height 基準のため、漢字主体の本文の
   字面中心より沈んで見える。基線から 0.15em 持ち上げて中心をそろえる (Issue #103)。
   line-height: 1 と inline-flex は絵文字フォントによる高さの膨らみ・ズレを防ぐ。 */
.ai-vote-badge,
.ai-rule-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5em;
    padding: 0.1em 0.6em;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: 0.15em;
    white-space: nowrap;
}

.ai-vote-badge {
    color: #1d4ed8;
    background: #dbeafe;
    border: 1px solid #93c5fd;
}

.ai-vote-badge-all {
    color: #1e40af;
    background: #bfdbfe;
    border: 1px solid #60a5fa;
}

.ai-rule-badge {
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.proofread-note {
    margin: 0 0 0.8em;
    padding: 0.5em 0.8em;
    color: #6b7280;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 同じ指摘をまとめた項目の出現箇所ダイアログ */
#occurrence-dialog {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    border: none;
    border-radius: 12px;
    padding: 1em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
#occurrence-dialog::backdrop {
    background: rgba(0,0,0,0.4);
}
#occurrence-dialog h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    word-break: break-all;
}
.occurrence-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 55vh;
    overflow-y: auto;
}
.occurrence-list li {
    padding: 4px 6px;
    border-bottom: 1px dashed #d1d5db;
    cursor: pointer;
}
.occurrence-list li:hover {
    background: #eef3ff;
}
.occurrence-close {
    text-align: right;
    margin-top: 8px;
}
