/* ===== 見出しデザイン =====
 * Wiki本文の h1 / h2 / h3 はプラグイン側で装飾しません。
 * Cocoonなど現在のテーマ側の見出しCSSをそのまま適用します。
 */


/* ===== エビデンス／安全性：Wiki独自見出し =====
 * この2箇所だけはCocoon等のテーマ見出し装飾を解除し、
 * Wiki独自のシンプルな見出しにします。
 */
.imw-evidence-box > h2,
.imw-safety-box > h2 {
    display: block !important;
    margin: 0 0 14px !important;
    padding: 0 0 8px !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid #a2a9b1 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #202122 !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    position: relative !important;
}

.imw-evidence-box > h2::before,
.imw-evidence-box > h2::after,
.imw-safety-box > h2::before,
.imw-safety-box > h2::after {
    content: none !important;
    display: none !important;
}

.imw-main {
    width: 100%;
    margin: 0;
    padding: 32px 16px 56px;
    color: #202122;
    background: #f8f9fa;
    box-sizing: border-box;
}

.imw-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #a2a9b1;
    box-sizing: border-box;
}

.imw-portal-header p {
    margin: 10px 0 0;
    line-height: 1.8;
}

.imw-search-panel {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
}

.imw-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto;
    gap: 8px;
}

.imw-search-form input,
.imw-search-form select,
.imw-search-form button {
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #72777d;
    border-radius: 2px;
    font: inherit;
    box-sizing: border-box;
}

.imw-search-form button {
    padding-inline: 22px;
    background: #3366cc;
    color: #fff;
    border-color: #3366cc;
    cursor: pointer;
    font-weight: 700;
}

.imw-kana-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    font-size: .95rem;
}

.imw-kana-nav a,
.imw-shell a,
.imw-entry a {
    color: #3366cc;
    text-decoration: none;
}

.imw-shell a:hover,
.imw-entry a:hover {
    text-decoration: underline;
}

.imw-section,
.imw-entry-section {
    margin-top: 30px;
}

.imw-entry-content p,
.imw-entry-content li,
.imw-entry-section p,
.imw-entry-section li {
    line-height: 1.85;
}

.imw-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.imw-category-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #c8ccd1;
    background: #fff;
}

.imw-category-card span {
    color: #54595d;
    white-space: nowrap;
}

.imw-update-list,
.imw-result-list,
.imw-related-list {
    margin: 0;
    padding-left: 1.3em;
}

.imw-update-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    margin: 7px 0;
}

.imw-update-list time {
    color: #72777d;
    font-size: .9rem;
}

.imw-index-grid {
    columns: 3 240px;
    column-gap: 28px;
}

.imw-index-group {
    break-inside: avoid;
    margin-bottom: 22px;
}

.imw-index-group ul {
    margin: 0;
    padding-left: 1.4em;
}

.imw-result-list {
    list-style: none;
    padding: 0;
}

.imw-result-list li {
    padding: 14px 0;
    border-bottom: 1px solid #eaecf0;
}

.imw-result-list p {
    margin: 0;
    color: #54595d;
    line-height: 1.7;
}

.imw-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.imw-pagination a,
.imw-pagination span {
    display: inline-block;
    min-width: 36px;
    padding: 7px 10px;
    text-align: center;
    border: 1px solid #a2a9b1;
    background: #fff;
}

.imw-pagination .current {
    background: #eaecf0;
    font-weight: 700;
}

.imw-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 20px;
    color: #54595d;
    font-size: .9rem;
}

.imw-entry-meta {
    margin: 14px 0 0;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
}

.imw-entry-meta > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    border-top: 1px solid #eaecf0;
}

.imw-entry-meta > div:first-child {
    border-top: 0;
}

.imw-entry-meta dt,
.imw-entry-meta dd {
    margin: 0;
    padding: 9px 12px;
}

.imw-entry-meta dt {
    background: #eaecf0;
    font-weight: 700;
}

.imw-entry-status {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    color: #72777d;
    font-size: .88rem;
}

.imw-summary-box,
.imw-evidence-box,
.imw-safety-box,
.imw-disclaimer {
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid #a2a9b1;
    background: #f8f9fa;
}

.imw-summary-box {
    border-left: 5px solid #72777d;
}

.imw-summary-box p,
.imw-disclaimer p {
    margin: 0;
    line-height: 1.8;
}

.imw-entry-content {
    margin-top: 28px;
}

.imw-entry-content > p:first-child {
    margin-top: 0;
}

.imw-evidence-box {
    border-left: 5px solid #3366cc;
}

.imw-safety-box {
    border-left: 5px solid #b32424;
}

.imw-references ol {
    padding-left: 1.5em;
}

.imw-entry-taxonomy {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid #c8ccd1;
    color: #54595d;
    font-size: .92rem;
}

.imw-entry-taxonomy p {
    margin: 5px 0;
}

.imw-redlink {
    color: #b32424;
    text-decoration: underline dotted;
    cursor: help;
}

.imw-disclaimer {
    margin-top: 34px;
    color: #54595d;
    font-size: .9rem;
}

@media (max-width: 760px) {
    .imw-main {
        padding: 12px 0 32px;
    }

    .imw-shell {
        padding: 20px 16px;
        border-left: 0;
        border-right: 0;
    }

    .imw-search-form {
        grid-template-columns: 1fr;
    }

    .imw-category-grid {
        grid-template-columns: 1fr;
    }

    .imw-index-grid {
        columns: 1;
    }

    .imw-entry-meta > div {
        grid-template-columns: 95px minmax(0, 1fr);
    }

    .imw-update-list li {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* ===== 共同編集（v1.1.0）===== */
.imw-community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 20px;
}

.imw-action-button,
.imw-text-button,
.imw-submit-button {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
}

.imw-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    background: #fff;
    color: #202122 !important;
    text-decoration: none !important;
    font-weight: 600;
}

.imw-action-button:hover,
.imw-action-button.is-active {
    border-color: #3366cc;
    background: #f1f4fb;
    color: #3366cc !important;
}

.imw-action-button.imw-action-primary {
    border-color: #3366cc;
    background: #3366cc;
    color: #fff !important;
}

.imw-action-button.imw-action-primary:hover {
    background: #2a4f9e;
    color: #fff !important;
}

.imw-entry-actions {
    padding-bottom: 12px;
    border-bottom: 1px solid #eaecf0;
}

.imw-front-notice {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid #a2a9b1;
    border-left-width: 5px;
    background: #fff;
}

.imw-front-notice-success {
    border-left-color: #14866d;
}

.imw-front-notice-warning {
    border-left-color: #b8860b;
}

.imw-front-notice-error {
    border-left-color: #b32424;
}

.imw-community-page,
.imw-history-page,
.imw-history-preview {
    margin-top: 18px;
}

.imw-community-header p {
    margin-top: 8px;
    color: #54595d;
}

.imw-community-form {
    margin-top: 22px;
}

.imw-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.imw-form-field {
    margin: 0 0 18px;
}

.imw-form-field label,
.imw-form-field legend {
    display: block;
    margin-bottom: 6px;
}

.imw-form-field input[type="text"],
.imw-form-field input[type="search"],
.imw-form-field textarea,
.imw-community-form .wp-editor-wrap {
    width: 100%;
    box-sizing: border-box;
}

.imw-form-field input[type="text"],
.imw-form-field input[type="search"],
.imw-form-field textarea {
    padding: 10px 12px;
    border: 1px solid #a2a9b1;
    border-radius: 3px;
    background: #fff;
    color: #202122;
    font: inherit;
}

.imw-form-field textarea {
    resize: vertical;
    line-height: 1.7;
}

.imw-form-help {
    margin: 6px 0 0;
    color: #72777d;
    font-size: .88rem;
}

.imw-category-checkboxes {
    padding: 14px;
    border: 1px solid #c8ccd1;
}

.imw-category-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 5px 18px 5px 0;
    font-weight: 400;
}

.imw-edit-guideline {
    margin: 22px 0;
    padding: 14px 16px;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
}

.imw-edit-guideline p {
    margin: 6px 0 0;
    line-height: 1.7;
}

.imw-form-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.imw-submit-button {
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid #3366cc;
    border-radius: 4px;
    background: #3366cc;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.imw-submit-button:hover {
    background: #2a4f9e;
}

.imw-cancel-link {
    color: #54595d !important;
}

.imw-login-required {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
}

.imw-history-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    border-top: 1px solid #c8ccd1;
}

.imw-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #eaecf0;
}

.imw-history-main,
.imw-history-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.imw-history-user {
    font-weight: 700;
}

.imw-history-action {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #c8ccd1;
    border-radius: 999px;
    color: #54595d;
    font-size: .82rem;
}

.imw-history-links form {
    margin: 0;
}

.imw-text-button {
    padding: 0;
    border: 0;
    background: none;
    color: #3366cc;
    cursor: pointer;
    text-decoration: underline;
}

.imw-history-revert-form {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #c8ccd1;
}

.imw-history-content {
    padding: 14px 0;
}

@media (max-width: 760px) {
    .imw-community-actions {
        gap: 6px;
    }

    .imw-action-button {
        min-height: 36px;
        padding: 6px 11px;
        font-size: .92rem;
    }

    .imw-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .imw-history-item {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

.imw-shell a.imw-redlink,
.imw-entry a.imw-redlink {
    color: #b32424;
    text-decoration: underline dotted;
    cursor: pointer;
}


/* ===== v1.4.1: カテゴリ一覧・五十音索引の専用固定ページ ===== */
.imw-directory-page .imw-directory-intro {
    margin: 0 0 1rem;
}

.imw-category-directory {
    display: grid;
    gap: 0;
    border-top: 1px solid rgba(127, 127, 127, .25);
}

.imw-category-directory-item {
    border-bottom: 1px solid rgba(127, 127, 127, .25);
    padding: .8rem 0;
}

.imw-category-directory-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.imw-category-directory-title > a {
    font-weight: 700;
}

.imw-category-directory-title > span {
    flex: 0 0 auto;
    font-size: .86em;
    opacity: .72;
}

.imw-category-directory-item > p {
    margin: .35rem 0 0;
    font-size: .92em;
    opacity: .86;
}

.imw-category-directory-children {
    margin: .55rem 0 0 1.1rem;
}

.imw-kana-nav-directory {
    margin: .8rem 0 1.1rem;
}

.imw-kana-nav-directory > span {
    opacity: .35;
    pointer-events: none;
}

/* ===== v1.5.0: ページ保護 ===== */
.imw-action-button.imw-action-disabled {
    border-color: #c8ccd1;
    background: #f8f9fa;
    color: #72777d !important;
    cursor: default;
    pointer-events: none;
}

.imw-protected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid #b32424;
    border-radius: 999px;
    color: #b32424;
    font-size: .82rem;
    font-weight: 700;
}

/* ===== v1.5.0: 最近の更新 ===== */
.imw-recent-changes-page {
    margin-top: 18px;
}

.imw-recent-changes-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    border-top: 1px solid #c8ccd1;
}

.imw-recent-change-item {
    padding: 13px 0;
    border-bottom: 1px solid #eaecf0;
}

.imw-recent-change-main,
.imw-recent-change-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 12px;
}

.imw-recent-change-title {
    font-weight: 700;
}

.imw-recent-change-action {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #c8ccd1;
    border-radius: 999px;
    color: #54595d;
    font-size: .82rem;
}

.imw-recent-change-meta {
    margin-top: 5px;
    color: #72777d;
    font-size: .9rem;
}

/* ===== v1.5.0: 編集差分 ===== */
.imw-history-diff {
    margin-top: 18px;
}

.imw-diff-field {
    margin-top: 26px;
}

.imw-diff-field > h2 {
    margin-bottom: 10px;
}

.imw-history-diff table.diff {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid #c8ccd1;
    background: #fff;
    font-size: .94rem;
}

.imw-history-diff table.diff td,
.imw-history-diff table.diff th {
    padding: 6px 8px;
    border-top: 1px solid #eaecf0;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.imw-history-diff .diff-deletedline {
    background: #ffe9e9;
}

.imw-history-diff .diff-addedline {
    background: #e6ffed;
}

.imw-history-diff .diff-deletedline del,
.imw-history-diff .diff-addedline ins {
    text-decoration: none;
    font-weight: 700;
}

.imw-history-diff .diff-deletedline del {
    background: #ffb8b8;
}

.imw-history-diff .diff-addedline ins {
    background: #acf2bd;
}

.imw-diff-fallback {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.imw-diff-fallback > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #c8ccd1;
    background: #f8f9fa;
}

.imw-diff-fallback pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .imw-recent-change-meta {
        gap: 5px 10px;
    }

    .imw-diff-fallback {
        grid-template-columns: 1fr;
    }

    .imw-history-diff table.diff {
        font-size: .86rem;
    }
}


/* ===== Wiki手動広告 ===== */
.imw-manual-ad {
    clear: both;
    width: 100%;
    margin: 28px 0 22px;
    text-align: center;
}

.imw-manual-ad + h2 {
    margin-top: 0;
}

@media screen and (max-width: 834px) {
    .imw-manual-ad {
        margin: 22px 0 18px;
    }
}


/* v1.5.3: 記事最下部の手動広告 */
.imw-manual-ad-bottom {
    margin-top: 34px;
    margin-bottom: 30px;
}

/* ===== Wiki専用アカウント / 登録・ログイン ===== */
.imw-auth-shell {
    max-width: 760px;
    margin: 0 auto;
}

.imw-auth-header {
    margin: 0 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #c8ccd1;
}

.imw-auth-header h1 {
    margin: 0 0 8px;
}

.imw-auth-header p {
    margin: 0;
    color: #54595d;
    line-height: 1.7;
}

.imw-auth-form {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid #c8ccd1;
    border-radius: 6px;
    background: #fff;
}

.imw-auth-form .imw-form-field {
    margin-bottom: 18px;
}

.imw-auth-form input[type="text"],
.imw-auth-form input[type="email"],
.imw-auth-form input[type="password"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin-top: 7px;
    padding: 9px 12px;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    background: #fff;
    color: #202122;
    font-size: 16px;
}

.imw-auth-form input:focus {
    border-color: #3366cc;
    outline: 2px solid rgba(51, 102, 204, .16);
    outline-offset: 0;
}

.imw-auth-info,
.imw-account-card {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #c8ccd1;
    border-radius: 5px;
    background: #f8f9fa;
}

.imw-auth-info ul {
    margin: 8px 0 0 1.25em;
}

.imw-auth-info li {
    margin: 4px 0;
    line-height: 1.65;
}

.imw-auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0;
    line-height: 1.7;
}

.imw-auth-check input {
    flex: 0 0 auto;
    margin-top: .35em;
}

/*
 * 同意欄は input + 本文 の2カラムに固定する。
 * 本文内のリンクをflexの直下に置くと、各リンクが別々のflex itemになり
 * モバイルで縦に潰れるため、本文全体をspanで1つにまとめる。
 */
.imw-auth-agreement {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    align-items: start !important;
    column-gap: 10px !important;
    margin: 18px 0 !important;
    line-height: 1.8 !important;
}

.imw-auth-agreement > input[type="checkbox"] {
    box-sizing: border-box !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
    margin: 3px 0 0 !important;
    padding: 0 !important;
    flex: none !important;
}

.imw-auth-agreement-text {
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: inherit;
    line-height: 1.8 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.imw-auth-agreement-text a {
    display: inline !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.imw-auth-links {
    margin: 16px 0 0;
    color: #54595d;
}

.imw-auth-links a {
    color: #3366cc;
}

.imw-auth-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.imw-account-card dl {
    margin: 0;
}

.imw-account-card dl > div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eaecf0;
}

.imw-account-card dl > div:last-child {
    border-bottom: 0;
}

.imw-account-card dt {
    font-weight: 700;
}

.imw-account-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.imw-auth-logout {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #eaecf0;
}

.imw-account-danger {
    margin-top: 28px;
    border: 1px solid #d8b4b4;
    border-radius: 6px;
    background: #fff;
}

.imw-account-danger > summary {
    padding: 14px 16px;
    color: #9b1c1c;
    cursor: pointer;
    font-weight: 700;
}

.imw-account-danger-body {
    padding: 2px 16px 18px;
    border-top: 1px solid #f0d8d8;
}

.imw-account-danger-body p {
    line-height: 1.75;
}

.imw-danger-button {
    min-height: 44px;
    padding: 9px 18px;
    border: 1px solid #b32424;
    border-radius: 4px;
    background: #b32424;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.imw-danger-button:hover {
    background: #8f1d1d;
}

@media (max-width: 760px) {
    .imw-auth-shell {
        width: 100%;
        max-width: 100%;
    }

    .imw-auth-form {
        margin: 16px 0;
        padding: 16px 14px;
    }

    .imw-auth-form .imw-form-field {
        margin-bottom: 16px;
    }

    .imw-auth-form .imw-form-field > label,
    .imw-auth-form .imw-form-field > label strong {
        font-size: 17px !important;
        line-height: 1.45 !important;
    }

    .imw-auth-form input[type="text"],
    .imw-auth-form input[type="email"],
    .imw-auth-form input[type="password"] {
        min-height: 48px;
        font-size: 16px !important;
    }

    .imw-auth-form .imw-form-help {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    .imw-auth-password-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .imw-auth-agreement {
        grid-template-columns: 22px minmax(0, 1fr) !important;
        column-gap: 10px !important;
        font-size: 15px !important;
    }

    .imw-auth-agreement > input[type="checkbox"] {
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        height: 20px !important;
        min-height: 20px !important;
    }

    .imw-form-submit .imw-submit-button,
    .imw-form-submit .imw-danger-button {
        width: 100%;
        min-height: 48px;
    }

    .imw-account-card dl > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* ===== v1.7.0: 注釈・要出典・要更新 ===== */
.imw-note-ref {
    margin: 0 2px;
    font-size: .78em;
    line-height: 1;
    vertical-align: super;
}

.imw-note-ref a,
.imw-note-backref {
    text-decoration: none;
}

.imw-footnotes {
    margin-top: 28px;
}

.imw-footnotes ol {
    padding-left: 1.7em;
}

.imw-footnotes li {
    margin: 0 0 8px;
    line-height: 1.75;
}

.imw-quality-marker {
    display: inline-block;
    margin: 0 .2em;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: .78em;
    font-weight: 700;
    line-height: 1.45;
    vertical-align: .08em;
    white-space: nowrap;
}

.imw-citation-needed {
    border: 1px solid #d9a72e;
    background: #fff8df;
    color: #745500;
}

.imw-update-needed {
    border: 1px solid #d48686;
    background: #fff0f0;
    color: #8c1d1d;
}

.imw-quality-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.imw-quality-badge-source {
    background: #fff4cf;
    color: #715200;
}

.imw-quality-badge-update {
    background: #fde8e8;
    color: #8f1f1f;
}

.imw-quality-notice {
    margin: 16px 0 22px;
    padding: 12px 14px;
    border-left: 4px solid #c84d4d;
    background: #fff5f5;
}

.imw-quality-notice strong {
    color: #8f1f1f;
}

.imw-quality-notice p {
    margin: 6px 0 0;
    line-height: 1.7;
}

.imw-quality-editor-box {
    padding: 14px;
    border: 1px solid #e6d69b;
    border-radius: 5px;
    background: #fffaf0;
}

.imw-quality-editor-box > label:not(.imw-quality-check) {
    display: block;
    margin-top: 12px;
}

.imw-quality-editor-box input[type="text"] {
    width: 100%;
}

.imw-quality-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.6;
}

.imw-reviewed-check {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eadfb9;
}

@media (max-width: 760px) {
    .imw-quality-marker {
        font-size: .76em;
    }

    .imw-quality-notice {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ===== v1.8.0: 編集者プロフィール ===== */
.imw-editor-link {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.imw-editor-profile-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 14px 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dfe3e8;
}

.imw-editor-profile-header h1 {
    margin: 2px 0 4px;
}

.imw-editor-profile-kicker,
.imw-editor-profile-since {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

.imw-editor-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 180px));
    gap: 12px;
    margin: 0 0 28px;
}

.imw-editor-stats > div {
    padding: 14px 16px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    background: #fff;
}

.imw-editor-stats strong,
.imw-editor-stats span {
    display: block;
}

.imw-editor-stats strong {
    font-size: 24px;
    line-height: 1.2;
}

.imw-editor-stats span {
    margin-top: 4px;
    color: #667085;
    font-size: 13px;
}

.imw-editor-profile-section {
    margin-top: 28px;
}

.imw-editor-profile-section > p {
    line-height: 1.85;
}

.imw-editor-profile-note,
.imw-editor-profile-disclaimer {
    color: #5f6670;
    font-size: 13px;
    line-height: 1.75;
}

.imw-editor-profile-note {
    padding: 10px 12px;
    border-left: 3px solid #c8cdd4;
    background: #f7f8fa;
}

.imw-editor-activity-list,
.imw-editor-created-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid #e5e7eb;
}

.imw-editor-activity-list li,
.imw-editor-created-list li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.imw-editor-activity-list time,
.imw-editor-created-list time {
    color: #667085;
    font-size: 13px;
}

.imw-editor-activity-list > li > span {
    padding: 1px 6px;
    border-radius: 3px;
    background: #f1f3f5;
    font-size: 12px;
}

.imw-editor-activity-small {
    font-size: 12px;
}

.imw-editor-created-list a {
    flex: 1 1 240px;
}

.imw-editor-profile-disclaimer {
    margin-top: 34px;
    padding: 13px 15px;
    border: 1px solid #dfe3e8;
    background: #fafbfc;
}

.imw-editor-profile-disclaimer p {
    margin: 5px 0 0;
}

.imw-profile-preview-link {
    margin: 0 0 14px;
}

.imw-profile-form textarea {
    width: 100%;
}

@media (max-width: 760px) {
    .imw-editor-profile-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .imw-editor-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .imw-editor-stats > div {
        padding: 12px;
    }

    .imw-editor-stats strong {
        font-size: 21px;
    }

    .imw-editor-activity-list li,
    .imw-editor-created-list li {
        align-items: flex-start;
    }
}
