/* ==============================
   システム/GM発言
============================== */

.chat-post.is-system-post {
    border-color: #2f6fd6;
}

.chat-post.is-system-post .chat-post__body,
.chat-post.is-system-post .chat-post__content {
    color: #005fcc;
}

.chat-post.is-system-post .chat-post__name,
.chat-post.is-system-post .chat-post__header strong {
    color: #004a99;
}


/* ==============================
   GM専用ページ
============================== */

.gm-status-card {
    box-sizing: border-box;
    width: 100%;
    padding: 16px;
    border: 1px solid #999;
    border-radius: 6px;
    background: #fff;
}

.gm-status-card__body {
    width: 100%;
}

.gm-status-card__title {
    margin: 0;
    padding: 0;
    border-bottom: none;
    font-size: 24px;
    line-height: 1.4;
}

.gm-status-card__divider {
    width: 100%;
    height: 1px;
    margin: 10px 0;
    background: #999;
}

.gm-status-card__text {
    margin: 0 0 12px;
    line-height: 1.7;
}

.gm-status-card__form {
    margin: 0;
}

.chat-post__eno-link--disabled {
    color: #666;
    text-decoration: none;
    cursor: default;
}


/* ==============================
   GMアナウンス管理
============================== */

.gm-announcement-delete-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
    margin-bottom: 12px;
}


/* ==============================
   GM専用ページ：リンクボタン
============================== */

.gm-dashboard-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 14px;
    border: 1px solid #777;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-weight: bold;
    text-decoration: none;
}

.gm-dashboard-link-button:hover {
    background: #eee;
    text-decoration: none;
}


/* ==============================
   GM専用ページ：エリア公開設定
============================== */

.gm-area-public-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.gm-area-public-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid rgba(120, 120, 120, 0.45);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.gm-area-public-item input {
    width: auto;
    max-width: none;
    margin: 0;
}

.gm-area-public-item__name {
    font-weight: bold;
}

.gm-area-public-item__note {
    margin-left: auto;
    color: #777;
    font-size: 12px;
}



/* ==============================
   GM専用ページ：AP手動配布
============================== */

.gm-ap-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.gm-ap-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(120, 120, 120, 0.45);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
}

.gm-ap-summary__row dt {
    margin: 0;
    color: #444;
    font-weight: bold;
}

.gm-ap-summary__row dd {
    margin: 0;
    font-weight: bold;
}

.gm-ap-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.gm-ap-form__label {
    font-weight: bold;
}

.gm-ap-form__input {
    width: 90px;
    max-width: 90px;
}

.gm-ap-reset-form {
    margin-top: 10px;
}

.gm-ap-reset-button {
    border-color: #9c3838;
    background: #fff4f4;
    color: #6f0000;
    font-weight: bold;
}

.gm-ap-reset-button:hover:not(:disabled) {
    background: #ffe5e5;
}

.gm-ap-reset-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ==============================
   GM専用ページ：全員を導く
============================== */

.gm-status-card--guide-all {
    border-color: rgba(150, 80, 80, 0.65);
}

.gm-guidance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.gm-guidance-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(120, 120, 120, 0.45);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
}

.gm-guidance-summary__row dt {
    margin: 0;
    color: #444;
    font-weight: bold;
}

.gm-guidance-summary__row dd {
    margin: 0;
    font-weight: bold;
}

.gm-guide-all-button {
    border-color: #9c3838;
    background: #fff4f4;
    color: #6f0000;
    font-weight: bold;
}

.gm-guide-all-button:hover:not(:disabled) {
    background: #ffe5e5;
}

.gm-guide-all-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* ==============================
   GM専用ページ：報告Webhook設定
============================== */

.gm-webhook-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.gm-webhook-form__label {
    font-weight: bold;
}

.gm-webhook-form__input {
    width: 100%;
    max-width: 800px;
}

.gm-webhook-form__help {
    margin: 0;
    color: #555;
    font-size: 13px;
}

.gm-webhook-form__errors {
    color: #a00000;
}

.gm-webhook-form__errors ul {
    margin: 0;
    padding-left: 20px;
}

/* ==============================
   GM専用ページ：AP自動配布
============================== */

.gm-ap-scheduler-status {
    margin: 10px 0;
    padding: 9px 11px;
    border: 1px solid rgba(100, 120, 140, 0.45);
    border-radius: 6px;
    background: rgba(240, 247, 255, 0.78);
    line-height: 1.6;
}

.gm-ap-scheduler-note {
    margin: 0 0 14px;
    color: #665522;
    font-size: 13px;
    line-height: 1.6;
}

.gm-ap-schedule-list {
    display: grid;
    gap: 10px;
}

.gm-ap-schedule-item {
    padding: 12px;
    border: 1px solid rgba(120, 120, 120, 0.45);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.8);
}

.gm-ap-schedule-item__status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 10px;
    font-size: 13px;
}

.gm-ap-schedule-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 3px 8px;
    border: 1px solid #777;
    border-radius: 999px;
    font-weight: bold;
}

.gm-ap-schedule-badge.is-enabled {
    border-color: #3f7b4b;
    background: #eef9f0;
    color: #245d30;
}

.gm-ap-schedule-badge.is-disabled {
    border-color: #888;
    background: #f2f2f2;
    color: #666;
}

.gm-ap-schedule-item__next,
.gm-ap-schedule-item__last {
    color: #444;
}

.gm-ap-schedule-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0;
}

.gm-ap-schedule-form label {
    font-weight: bold;
}

.gm-ap-schedule-form__time {
    width: 120px;
    max-width: 120px;
}

.gm-ap-schedule-form__amount {
    width: 90px;
    max-width: 90px;
}

.gm-ap-schedule-form__checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.gm-ap-schedule-form__enabled {
    width: auto;
    max-width: none;
    margin: 0;
}

.gm-ap-schedule-delete-form {
    margin: 9px 0 0;
}

.gm-ap-schedule-delete-button {
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #9c3838;
    border-radius: 5px;
    background: #fff4f4;
    color: #6f0000;
    font-weight: bold;
    cursor: pointer;
}

.gm-ap-schedule-delete-button:hover {
    background: #ffe5e5;
}

.gm-ap-schedule-empty {
    margin: 8px 0;
    color: #666;
}

.gm-ap-schedule-add,
.gm-ap-run-history {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(120, 120, 120, 0.35);
}

.gm-ap-schedule-add__title,
.gm-ap-run-history__title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
}

.gm-ap-run-history__table-wrap {
    width: 100%;
    overflow-x: auto;
}

.gm-ap-run-history__table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.gm-ap-run-history__table th,
.gm-ap-run-history__table td {
    padding: 8px 9px;
    border: 1px solid rgba(120, 120, 120, 0.4);
    text-align: left;
    vertical-align: top;
}

.gm-ap-run-history__table th {
    background: rgba(235, 235, 235, 0.85);
}

.gm-ap-run-status {
    font-weight: bold;
}

.gm-ap-run-status--success {
    color: #23652e;
}

.gm-ap-run-status--failed {
    color: #9a2020;
}

.gm-ap-run-status--running {
    color: #8a6700;
}

.gm-ap-run-error {
    margin-top: 4px;
    color: #8b1f1f;
    font-size: 12px;
    overflow-wrap: anywhere;
}


/* ==============================
   探索結果一括登録
============================== */

.gm-explore-bulk-form {
    display: grid;
    gap: 16px;
}

.gm-explore-bulk-targets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gm-explore-bulk-field {
    display: grid;
    gap: 6px;
}

.gm-explore-bulk-field > label {
    font-weight: bold;
}

.gm-explore-bulk-form__select,
.gm-explore-bulk-form__textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
}

.gm-explore-bulk-form__textarea {
    min-height: 420px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.gm-explore-bulk-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.gm-explore-bulk-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.gm-explore-bulk-option input {
    width: auto;
    max-width: none;
    margin: 0;
}

.gm-explore-bulk-help {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

.gm-explore-bulk-errors,
.gm-explore-bulk-form .errorlist {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(160, 55, 55, 0.5);
    border-radius: 6px;
    background: #fff3f3;
    color: #8c1111;
}

.gm-explore-bulk-form .errorlist {
    list-style-position: inside;
}

.gm-explore-bulk-actions {
    display: flex;
    justify-content: flex-end;
}

.gm-explore-bulk-preview {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(120, 120, 120, 0.45);
}

.gm-explore-bulk-preview__title {
    margin: 0;
    font-size: 20px;
}

.gm-explore-bulk-preview__list {
    display: grid;
    gap: 12px;
}

.gm-explore-bulk-preview__item {
    padding: 12px;
    border: 1px solid rgba(120, 120, 120, 0.45);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.78);
}

.gm-explore-bulk-preview__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.gm-explore-bulk-preview__body {
    line-height: 1.7;
    white-space: normal;
}

.gm-explore-bulk-warning {
    margin: 0 0 8px;
    padding: 7px 9px;
    border: 1px solid rgba(175, 125, 25, 0.55);
    border-radius: 5px;
    background: #fff8df;
    color: #704d00;
    font-size: 13px;
}

@media (max-width: 1000px) {
    .gm-explore-bulk-targets {
        grid-template-columns: 1fr;
    }
}
