/*
Theme Name: Ordeal
Description: ヒロインの受難 専用テーマ
Version: 1.0
*/

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ========================================
   サイト全体：暖色系トーン・Webフォント
   ======================================== */
body {
    background: #2a2520;
    color: #f5f0e8;
    font-family: 'Noto Sans JP', sans-serif;
}

/* サイトトップ・/about・/chat-about 表示時はダークモード選択でも明るいモードと同じ配色で表示 */
body.ordeal-top-page,
body.ordeal-force-light-view {
    background: #f7f2eb;
    color: #2a2520;
}
body.ordeal-top-page .ordeal-site-footer,
body.ordeal-force-light-view .ordeal-site-footer {
    border-top-color: #c9b896;
    background: #e8e0d5;
    color: #5c5248;
}
body.ordeal-top-page .ordeal-site-header,
body.ordeal-force-light-view .ordeal-site-header {
    background: #e8e0d5;
    border-bottom-color: #c9b896;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
body.ordeal-top-page .ordeal-custom-header-brand,
body.ordeal-top-page .ordeal-custom-header-brand:hover,
body.ordeal-top-page .ordeal-custom-header-brand:focus,
body.ordeal-force-light-view .ordeal-custom-header-brand,
body.ordeal-force-light-view .ordeal-custom-header-brand:hover,
body.ordeal-force-light-view .ordeal-custom-header-brand:focus {
    color: #2a2520;
}
body.ordeal-top-page .ordeal-custom-header-about,
body.ordeal-force-light-view .ordeal-custom-header-about {
    background: rgba(42, 37, 32, 0.12);
    color: #2a2520;
    border-color: #c9b896;
}
body.ordeal-top-page .ordeal-custom-header-about:hover,
body.ordeal-top-page .ordeal-custom-header-about:focus,
body.ordeal-force-light-view .ordeal-custom-header-about:hover,
body.ordeal-force-light-view .ordeal-custom-header-about:focus {
    background: rgba(42, 37, 32, 0.2);
    color: #1f1b18;
    border-color: #8b7355;
}
body.ordeal-top-page .ordeal-custom-header-imagechat,
body.ordeal-force-light-view .ordeal-custom-header-imagechat {
    background: linear-gradient(135deg, #ffe5b3, #ffc27d);
    color: #3a2414;
}
body.ordeal-top-page .ordeal-custom-header-imagechat:hover,
body.ordeal-top-page .ordeal-custom-header-imagechat:focus,
body.ordeal-force-light-view .ordeal-custom-header-imagechat:hover,
body.ordeal-force-light-view .ordeal-custom-header-imagechat:focus {
    background: linear-gradient(135deg, #ffeccc, #ffd08f);
}
body.ordeal-top-page .ordeal-custom-header-theme a,
body.ordeal-force-light-view .ordeal-custom-header-theme a {
    color: #5c5248;
}
/* /signin・/signin/2fa・/signup・/account は常に明るい表示のみ（ダーク切替を非表示） */
body.ordeal-auth-page .ordeal-custom-header-theme {
    display: none;
}
/* トップ・/about・chat-about：ヘッダー背景が明るいため「ログイン」「ログイン名」を濃い色で表示 */
body.ordeal-top-page .ordeal-custom-header-login,
body.ordeal-top-page .ordeal-custom-header-username,
body.ordeal-force-light-view .ordeal-custom-header-login,
body.ordeal-force-light-view .ordeal-custom-header-username {
    color: #2a2520;
    border-color: #c9b896;
}
body.ordeal-top-page .ordeal-custom-header-username:hover,
body.ordeal-top-page .ordeal-custom-header-username:focus,
body.ordeal-force-light-view .ordeal-custom-header-username:hover,
body.ordeal-force-light-view .ordeal-custom-header-username:focus {
    color: #1f1b18;
}
/* /about・/chat-about ではヘッダーにマイページ系ボタンなども出るため、明るい配色を付与 */
body.ordeal-force-light-view .ordeal-custom-header-welcome,
body.ordeal-force-light-view .ordeal-custom-header-mypage-btn,
body.ordeal-force-light-view .ordeal-custom-header-logout,
body.ordeal-force-light-view .ordeal-custom-header-chat-back,
body.ordeal-force-light-view .ordeal-custom-header-admin {
    color: #2a2520;
    border-color: #c9b896;
}
body.ordeal-force-light-view .ordeal-custom-header-welcome:hover,
body.ordeal-force-light-view .ordeal-custom-header-welcome:focus,
body.ordeal-force-light-view .ordeal-custom-header-mypage-btn:hover,
body.ordeal-force-light-view .ordeal-custom-header-mypage-btn:focus,
body.ordeal-force-light-view .ordeal-custom-header-logout:hover,
body.ordeal-force-light-view .ordeal-custom-header-logout:focus,
body.ordeal-force-light-view .ordeal-custom-header-chat-back:hover,
body.ordeal-force-light-view .ordeal-custom-header-chat-back:focus {
    color: #2a2520;
    background: rgba(201, 184, 150, 0.3);
    border-color: #8b7355;
}
body.ordeal-force-light-view .ordeal-custom-header-admin {
    color: #5c4510;
    background: rgba(201, 164, 80, 0.25);
    border-color: #a08020;
}
body.ordeal-force-light-view .ordeal-custom-header-admin:hover,
body.ordeal-force-light-view .ordeal-custom-header-admin:focus {
    color: #3d2e08;
    background: rgba(201, 164, 80, 0.4);
    border-color: #8b6914;
}
body.ordeal-force-light-view .ordeal-custom-header-username:hover,
body.ordeal-force-light-view .ordeal-custom-header-username:focus {
    color: #1f1b18;
}

/* ========================================
   サイトトップ（はじめての方へ）読みやすさ優先・十分なコントラスト
   ======================================== */
.ordeal-welcome-page {
    padding: 0 0 64px;
    box-sizing: border-box;
    background: #f7f2eb;
    color: #2a2520;
}

.ordeal-welcome-cover {
    width: 100%;
    height: 42vh;
    min-height: 220px;
    max-height: 460px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f7f2eb;
}

.ordeal-welcome-page:has(.ordeal-welcome-cover) .ordeal-welcome-inner {
    padding-top: 32px;
}

.ordeal-welcome-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

.ordeal-welcome-title {
    margin: 0 0 24px;
    font-size: clamp(1.8rem, 2vw + 1.5rem, 2.5rem);
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #2a2520;
}

.ordeal-welcome-section {
    position: relative;
    margin-bottom: 24px;
    padding: 24px 28px 26px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3d4c4;
    box-shadow: 0 14px 40px rgba(32, 24, 16, 0.18);
    color: #2a2520;
}

.ordeal-welcome-section h2 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a2b22;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ordeal-welcome-section p,
.ordeal-welcome-section ol {
    font-size: 1.02rem;
    line-height: 1.9;
    margin: 0;
    color: #3a2b22;
}

.ordeal-welcome-section p + p {
    margin-top: 12px;
}

.ordeal-donate-card {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 241, 225, 0.98));
    border-color: #d8c39a;
}

.ordeal-donate-amount {
    margin-top: 18px;
}

.ordeal-donate-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.ordeal-donate-preset-btn {
    border-radius: 999px;
    border: 1px solid #d0b27a;
    background: #fff8ec;
    padding: 6px 14px;
    font-size: 0.92rem;
    cursor: pointer;
    color: #4a3520;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease,
        transform 0.08s ease;
}

.ordeal-donate-preset-btn:hover,
.ordeal-donate-preset-btn:focus {
    background: #fff1d8;
    border-color: #c29a52;
    box-shadow: 0 0 0 2px rgba(194, 154, 82, 0.2);
    transform: translateY(-1px);
}

.ordeal-donate-preset-btn.is-selected {
    background: linear-gradient(135deg, #ffe4b3, #f3b263);
    border-color: #b47a2a;
    color: #3a2414;
    box-shadow: 0 6px 18px rgba(150, 96, 32, 0.4);
}

.ordeal-donate-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.ordeal-donate-custom label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #5a4330;
}

.ordeal-donate-input {
    flex: 1 1 140px;
    max-width: 220px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d0b27a;
    background: #fffdf7;
    font-size: 0.95rem;
    color: #2a2520;
}

.ordeal-donate-input:focus {
    outline: none;
    border-color: #c29a52;
    box-shadow: 0 0 0 2px rgba(194, 154, 82, 0.25);
}

.ordeal-donate-summary {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 252, 244, 0.9);
    border: 1px dashed rgba(201, 184, 150, 0.8);
}

.ordeal-donate-current {
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.ordeal-donate-current strong {
    color: #7a4c18;
}

.ordeal-donate-ltc {
    font-size: 0.9rem;
    color: #5e4b35;
}

.ordeal-donate-note {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #7a6b56;
}

.ordeal-donate-actions {
    margin-top: 18px;
    text-align: center;
}

.ordeal-donate-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #f2d38a, #d6a649);
    color: #3a2414;
    box-shadow: 0 10px 26px rgba(150, 100, 40, 0.45);
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease,
        opacity 0.15s ease;
}

.ordeal-donate-btn-primary:hover,
.ordeal-donate-btn-primary:focus {
    background: linear-gradient(135deg, #f6dc9d, #e0b257);
    box-shadow: 0 12px 30px rgba(150, 100, 40, 0.5);
    transform: translateY(-1px);
}

.ordeal-donate-btn-primary:disabled,
.ordeal-donate-btn-primary[disabled] {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.ordeal-donate-cautions {
    margin: 14px 0 0;
    padding-left: 1.2em;
    font-size: 0.8rem;
    color: #756553;
}

.ordeal-donate-cautions li + li {
    margin-top: 2px;
}

.ordeal-welcome-section-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
    gap: 20px 32px;
    align-items: center;
}

.ordeal-welcome-section-hero h2 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    opacity: 1;
    color: #b88040;
}

.ordeal-welcome-section-hero p {
    margin-top: 8px;
    color: #3a2b22;
}

.ordeal-welcome-cta {
    margin-top: 16px;
    text-align: right;
}

.ordeal-welcome-btn-imagechat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 12px 28px;
    font-size: 1.05rem;
    letter-spacing: 0.09em;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(160, 110, 40, 0.45);
    background: linear-gradient(135deg, #ffd89a, #f5a55f);
    color: #3a2414;
    border: 0;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
}

.ordeal-welcome-btn-imagechat::after {
    content: '→';
    font-size: 0.9em;
}

.ordeal-welcome-btn-imagechat:hover,
.ordeal-welcome-btn-imagechat:focus {
    background: linear-gradient(135deg, #ffe0aa, #ffb06c);
    color: #3a2414;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(160, 110, 40, 0.5);
}

@media (max-width: 640px) {
    .ordeal-welcome-btn-imagechat {
        white-space: normal;
        width: 100%;
    }
}

.ordeal-welcome-section-howto ol {
    padding-left: 1.5em;
    color: #f0ebe3;
}

.ordeal-welcome-section-howto li {
    margin-top: 8px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.ordeal-welcome-section-howto li:first-child {
    margin-top: 0;
}

/* 使い方・逆引きページ（/chat-guide/ /help/） */
.ordeal-about-manual-links {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 0;
}
.ordeal-about-manual-links li {
    margin-top: 10px;
}
.ordeal-about-manual-links li:first-child {
    margin-top: 0;
}

/* このサイトについて：会員比較表・プレミアム CTA */
.ordeal-welcome-section-premium .ordeal-premium-comparison-wrap {
    margin: 16px 0 20px;
    overflow-x: auto;
}
.ordeal-premium-comparison-table {
    min-width: 280px;
}
.ordeal-premium-comparison-table tbody th {
    font-weight: 600;
    text-align: left;
    background: #f5f0eb;
}
.ordeal-premium-cta {
    margin-top: 4px;
    padding: 14px 16px;
    background: #efe9e2;
    border-radius: 8px;
    border: 1px solid #e3d4c4;
}
.ordeal-premium-cta a {
    font-weight: 600;
}

.ordeal-guide-lead,
.ordeal-help-page .ordeal-guide-lead {
    margin: 0 0 24px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a4540;
}
.ordeal-guide-page .ordeal-welcome-section h2,
.ordeal-help-page .ordeal-help-entries .ordeal-welcome-section h2 {
    font-size: 1.15rem;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e3d4c4;
}
.ordeal-guide-page .ordeal-welcome-section h2:first-child,
.ordeal-help-page .ordeal-help-entries .ordeal-welcome-section h2:first-child {
    margin-top: 0;
}
.ordeal-guide-figure {
    margin: 20px 0;
    text-align: center;
}
.ordeal-guide-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e3d4c4;
    box-shadow: 0 4px 16px rgba(32, 24, 16, 0.1);
}
.ordeal-guide-figure figcaption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6a6560;
}
.ordeal-guide-img-placeholder {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f5f0eb;
    border: 1px dashed #c4b5a5;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #5c5248;
}
.ordeal-guide-img-placeholder code {
    font-size: 0.85em;
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}
.ordeal-guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}
.ordeal-guide-table th,
.ordeal-guide-table td {
    border: 1px solid #e3d4c4;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}
.ordeal-guide-table th {
    background: #f7f2eb;
    font-weight: 600;
    color: #2a2520;
}
.ordeal-guide-table td {
    background: #fff;
    color: #2a2520;
}
.ordeal-guide-table code {
    font-size: 0.9em;
    background: #f0ebe3;
    padding: 2px 6px;
    border-radius: 4px;
}
.ordeal-guide-back {
    margin-top: 32px;
    padding-top: 20px;
}
.ordeal-guide-back a {
    color: #7c6b5a;
    text-decoration: underline;
}

/* ヒロイン受難チャットとは？（/chat-about/）：ダーク・明るい両テーマで文字が読みやすい配色 */
.ordeal-chat-about-page {
    background: #f7f2eb;
    color: #2a2520;
}
.ordeal-chat-about-title {
    color: #2a2520;
}
.ordeal-chat-about-section {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e3d4c4;
    color: #2a2520;
}
.ordeal-chat-about-h2 {
    color: #3a2b22;
}
.ordeal-chat-about-text {
    color: #3a2b22;
}
.ordeal-chat-about-list {
    color: #3a2b22;
}
.ordeal-chat-about-list li {
    color: #3a2b22;
}
.ordeal-chat-about-links a {
    color: #5c7a9e;
    text-decoration: underline;
}
.ordeal-chat-about-links a:hover,
.ordeal-chat-about-links a:focus {
    color: #4a6590;
}
.ordeal-chat-about-table th,
.ordeal-chat-about-table td {
    color: #2a2520;
    border-color: #e3d4c4;
}
.ordeal-chat-about-table th {
    background: #f7f2eb;
}
.ordeal-chat-about-table td {
    background: #fff;
}
.ordeal-chat-about-premium-cta {
    background: #efe9e2;
    border: 1px solid #e3d4c4;
    color: #2a2520;
}
.ordeal-chat-about-premium-cta a {
    color: #5c7a9e;
}

/* キャンペーンプロモ（期間限定スペシャル・会員登録意欲向上用）枠内のみ */
.ordeal-chat-about-campaign {
    margin-top: 1.25em;
    padding: 1.35em 1.5em 1.25em;
    background: linear-gradient(145deg, #fff5f2 0%, #ffefe8 35%, #ffe8dc 70%, #ffdfce 100%);
    border: 2px solid #e8a090;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(220, 120, 90, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
}
.ordeal-chat-about-campaign-badge {
    display: inline-block;
    margin-bottom: 0.5em;
    padding: 0.25em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #e87a6a 0%, #d85a48 100%);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(180, 60, 40, 0.35);
}
.ordeal-chat-about-campaign-head {
    margin: 0 0 0.6em;
    font-size: 1.2em;
    font-weight: 700;
    color: #b84a38;
    letter-spacing: 0.02em;
}
.ordeal-chat-about-campaign-main {
    display: inline-block;
    margin-left: 0.35em;
    font-size: 1.45em;
    font-weight: 800;
}
.ordeal-chat-about-campaign-lead {
    margin: 0 0 0.75em;
    line-height: 1.65;
    color: #3a2822;
}
.ordeal-chat-about-campaign-lead strong {
    color: #c85a42;
    font-weight: 700;
}
.ordeal-chat-about-campaign-note {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.6;
    color: #6a5248;
}

.ordeal-chat-about-back a {
    color: #7c6b5a;
}
.ordeal-chat-about-page .ordeal-chat-about-cta-wrap {
    margin: 2em 0;
    text-align: center;
}

/* 明るいテーマ時も chat-about の文字を確実に濃く */
body.ordeal-theme-light .ordeal-chat-about-page {
    background: #f7f2eb;
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-chat-about-title,
body.ordeal-theme-light .ordeal-chat-about-h2 {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-chat-about-text,
body.ordeal-theme-light .ordeal-chat-about-list,
body.ordeal-theme-light .ordeal-chat-about-list li {
    color: #3a2b22;
}
body.ordeal-theme-light .ordeal-chat-about-section {
    background: #fff;
    border-color: #d5c9b8;
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-chat-about-links a {
    color: #4a6590;
}
body.ordeal-theme-light .ordeal-chat-about-table th,
body.ordeal-theme-light .ordeal-chat-about-table td {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-chat-about-premium-cta {
    background: #f0ebe3;
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-chat-about-campaign {
    background: linear-gradient(145deg, #fff8f6 0%, #ffefe8 40%, #ffe8de 80%, #ffe0d4 100%);
    border-color: #e09080;
}
body.ordeal-theme-light .ordeal-chat-about-campaign-badge {
    background: linear-gradient(135deg, #e87a6a 0%, #d85a48 100%);
}
body.ordeal-theme-light .ordeal-chat-about-campaign-head {
    color: #a83d30;
}
body.ordeal-theme-light .ordeal-chat-about-campaign-lead strong {
    color: #b84a38;
}
body.ordeal-theme-light .ordeal-chat-about-back a {
    color: #6b5c4a;
}

.ordeal-help-index {
    margin-bottom: 32px;
}
.ordeal-help-index h2 {
    margin-bottom: 12px;
}
.ordeal-help-index h3 {
    font-size: 1rem;
    margin: 16px 0 6px;
    color: #4a4540;
}
.ordeal-help-index h3:first-of-type {
    margin-top: 0;
}
.ordeal-help-index ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 8px;
}
.ordeal-help-index ul li {
    margin-top: 4px;
}
.ordeal-help-index a {
    color: #5c7a9e;
    text-decoration: underline;
}

@media (max-width: 800px) {
    .ordeal-welcome-section-hero {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .ordeal-welcome-page {
        padding-top: 24px;
    }
    .ordeal-welcome-inner {
        padding-inline: 16px;
    }
    .ordeal-welcome-section {
        border-radius: 14px;
        padding-inline: 18px;
    }
}

/* ========================================
   全ページ共通ナビゲーション（暖色）
   ======================================== */
.ordeal-site-header {
    background: #1f1b18;
    border-bottom: 1px solid #5c5248;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ordeal-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ordeal-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 12px 0;
    gap: 4px;
}

.ordeal-nav-item {
    margin: 0;
}

.ordeal-nav-item a {
    display: inline-block;
    padding: 10px 20px;
    color: #e8e0d5;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.ordeal-nav-item a.ordeal-nav-link {
    cursor: pointer;
    pointer-events: auto;
}

.ordeal-nav-item a:hover,
.ordeal-nav-item a:focus {
    background: #3d3530;
    color: #f5f0e8;
}

.ordeal-nav-item a:focus {
    outline: 1px solid #8b7355;
    outline-offset: 2px;
}

.ordeal-nav-right {
    margin-left: auto;
}

.ordeal-theme-toggle {
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.85em;
    opacity: 0.9;
}

.ordeal-theme-toggle a {
    color: inherit;
    text-decoration: underline;
}

/* 独自ヘッダ（ロゴ＋サイト名・ログアウト／ログイン名 or ログイン） */
.ordeal-custom-header .ordeal-custom-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ordeal-custom-header-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.ordeal-custom-header-welcome {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9em;
    color: #f0e8dc;
    background: rgba(139, 115, 85, 0.25);
    border: 1px solid #8b7355;
    border-radius: 4px;
    text-decoration: none;
}

.ordeal-custom-header-welcome:hover,
.ordeal-custom-header-welcome:focus {
    color: #fff;
    background: rgba(139, 115, 85, 0.45);
    border-color: #a89888;
}

/* トップ用：このサイトについて・イメージチャット（同じ形・同じ高さのピルボタン） */
.ordeal-custom-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 18px;
    font-size: 0.9em;
    line-height: 1.25;
    letter-spacing: 0.08em;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
}

.ordeal-custom-header-about {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ordeal-custom-header-about:hover,
.ordeal-custom-header-about:focus {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ordeal-custom-header-mypage-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9em;
    color: #a89888;
    background: transparent;
    border: 1px solid #5c5248;
    border-radius: 4px;
    text-decoration: none;
}

.ordeal-custom-header-mypage-btn:hover,
.ordeal-custom-header-mypage-btn:focus {
    color: #e8e0d5;
    background: rgba(61, 53, 48, 0.5);
    border-color: #6b5048;
}

.ordeal-custom-header-logout {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9em;
    color: #a89888;
    background: transparent;
    border: 1px solid #5c5248;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.ordeal-custom-header-logout:hover,
.ordeal-custom-header-logout:focus {
    color: #e8e0d5;
    background: rgba(61, 53, 48, 0.5);
    border-color: #6b5048;
}

.ordeal-custom-header-chat-back {
    color: #c9b896;
    text-decoration: underline;
}

.ordeal-custom-header-chat-back:hover,
.ordeal-custom-header-chat-back:focus {
    color: #f5f0e8;
}

/* 管理者・編集者専用（管理ページ・データアーカイブ）の特別色 */
.ordeal-custom-header-admin {
    display: inline-block;
    margin-left: 10px;
    padding: 6px 12px;
    font-size: 0.9em;
    color: #e8dcc0;
    background: rgba(139, 105, 52, 0.35);
    border: 1px solid #8b6914;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.ordeal-custom-header-admin:hover,
.ordeal-custom-header-admin:focus {
    color: #f5f0e0;
    background: rgba(139, 105, 52, 0.5);
    border-color: #a08020;
}

.ordeal-custom-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #e8e0d5;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
}

.ordeal-custom-header-brand:hover,
.ordeal-custom-header-brand:focus {
    color: #f5f0e8;
}

.ordeal-custom-header-logo {
    display: block;
    max-height: 40px;
    width: auto;
    height: auto;
    vertical-align: middle;
}

.ordeal-custom-header-site-name {
    white-space: nowrap;
}

.ordeal-premium-header-badge {
    display: inline-block;
    margin-left: 4px;
    height: 32px;
    width: auto;
    vertical-align: middle;
}

.ordeal-premium-badge-large {
    display: inline-block;
    margin-left: 8px;
    height: 100px;
    width: auto;
    vertical-align: middle;
}

.ordeal-premium-badge-table {
    display: inline-block;
    margin-left: 4px;
    height: 28px;
    width: auto;
    vertical-align: middle;
}

.ordeal-custom-header-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.ordeal-custom-header-imagechat {
    background: linear-gradient(135deg, #ffd89a, #f5a55f);
    color: #3a2414;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(160, 110, 40, 0.5);
}

.ordeal-custom-header-imagechat:hover,
.ordeal-custom-header-imagechat:focus {
    background: linear-gradient(135deg, #ffe0aa, #ffb06c);
    color: #3a2414;
    box-shadow: 0 10px 26px rgba(160, 110, 40, 0.6);
    transform: translateY(-1px);
}

.ordeal-custom-header-theme {
    font-size: 0.85em;
    opacity: 0.9;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
}

.ordeal-custom-header-theme a {
    color: inherit;
    text-decoration: underline;
}

.ordeal-custom-header-theme a:hover {
    opacity: 1;
}

.ordeal-custom-header-login {
    margin: 0;
    font-size: 0.95em;
    color: #a89888;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.ordeal-custom-header-username {
    color: #e8e0d5;
    font-weight: 500;
    text-decoration: none;
}

.ordeal-custom-header-username:hover,
.ordeal-custom-header-username:focus {
    text-decoration: underline;
}

.ordeal-site-footer {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid #5c5248;
    background: #1f1b18;
    color: #a89888;
    font-size: 0.9em;
}

.ordeal-footer-copy {
    margin: 0;
}

.ordeal-footer-copy a {
    color: inherit;
    text-decoration: none;
}

.ordeal-about-account-note {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding: 1.25em 1.5em;
    border-radius: 8px;
    background: #fff4f6;
    border: 1px solid #f2c7d4;
    box-shadow: 0 2px 4px rgba(180, 120, 130, 0.15);
}

.ordeal-about-account-note-title {
    margin: 0 0 0.5em;
    color: #b44260;
    font-weight: 700;
}

.ordeal-about-account-note-body {
    margin: 0;
    line-height: 1.7;
}

/* ========================================
   トップ：対戦募集（暖色・削除ボタンは離す）
   ======================================== */
.index-inner,
#primary.index-wrap {
    background: #2a2520 !important;
    color: #f5f0e8 !important;
}

.match-recruitment-list {
    background: #2a2520;
    color: #f5f0e8;
}

.match-recruitment-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.match-recruitment-item {
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 16px 20px;
    position: relative;
}

/* 2名入室済みで「対戦を覗く」のルームは薄ピンクで区別 */
.match-recruitment-item.match-recruitment-item-started {
    background: #5c4048;
    border-color: #7a5860;
}

.match-recruitment-item .match-recruitment-char {
    font-weight: bold;
    color: #f5f0e8;
    margin-right: 6px;
}

.match-recruitment-item .match-recruitment-attr {
    color: #c9b896;
    font-size: 0.95em;
}

.match-recruitment-item .match-recruitment-comment {
    margin: 12px 0 8px;
    padding: 10px 0;
    border-top: 1px solid #4a4238;
    color: #e8e0d5;
    line-height: 1.6;
}

.match-recruitment-item .match-recruitment-char-line {
    margin: 0 0 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-recruitment-item .match-recruitment-char-meta-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.match-recruitment-item .match-recruitment-char-meta-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    font-size: 0.9em;
    color: #a89888;
}

.match-recruitment-item .match-recruitment-elapsed {
    font-weight: 500;
}

.match-recruitment-item .match-recruitment-author,
.match-recruitment-item .match-recruitment-member-count {
    margin: 0;
}

.match-recruitment-item .match-recruitment-gender,
.match-recruitment-item .match-recruitment-condition {
    font-size: 0.9em;
    color: #c9b896;
}

/* 性別の値：男性＝ブルー、女性＝赤 */
.match-recruitment-item .match-recruitment-gender-val.match-recruitment-gender-male {
    color: #3b82f6;
    font-weight: 600;
}

.match-recruitment-item .match-recruitment-gender-val.match-recruitment-gender-female {
    color: #dc2626;
    font-weight: 600;
}

.match-recruitment-item .match-recruitment-gender-val.match-recruitment-gender-other {
    color: inherit;
}

.match-recruitment-item .match-recruitment-actions {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid #4a4238;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.match-recruitment-item .btn-chat-link,
.match-recruitment-item .btn-recruitment-edit {
    display: inline-block;
    padding: 6px 14px;
    background: #5c5248;
    color: #f5f0e8;
    text-decoration: none;
    border: 1px solid #8b7355;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.2s, color 0.2s;
}

.match-recruitment-item .btn-chat-link:hover,
.match-recruitment-item .btn-recruitment-edit:hover,
.match-recruitment-item .btn-chat-spectate:hover {
    background: #6d6256;
    color: #fff;
}

.match-recruitment-item .btn-chat-spectate {
    display: inline-block;
    padding: 6px 14px;
    background: #5c5248;
    color: #f5f0e8;
    text-decoration: none;
    border: 1px solid #8b7355;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background 0.2s, color 0.2s;
}

.match-recruitment-item .btn-recruitment-cancel {
    padding: 4px 10px;
    background: transparent;
    color: #a89888;
    border: 1px solid #5c5248;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
}

.match-recruitment-item .btn-recruitment-cancel:hover {
    background: rgba(74, 48, 40, 0.3);
    color: #c9a898;
    border-color: #6b5048;
}

/* 入室・編集を左、削除を右に1行で表示（Gridで右端固定） */
.match-recruitment-item .match-recruitment-actions-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.match-recruitment-item .match-recruitment-actions-right {
    justify-self: end;
}

.match-recruitment-item .form-cancel-recruitment {
    display: inline-block;
}

.match-recruitment-edit-form {
    background: #3d3530 !important;
    border-color: #5c5248 !important;
}

.btn-recruitment-update,
.btn-recruitment-cancel-edit {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
}

.btn-recruitment-cancel-edit {
    background: transparent;
    color: #a89888;
}

.btn-recruitment-cancel-edit:hover {
    color: #f5f0e8;
}

.match-recruitment-empty {
    background: #3d3530;
    border: 1px solid #5c5248;
    color: #a89888;
    padding: 24px;
    text-align: center;
}

/* ========================================
   マイページ（暖色・入力欄高さ・幅）
   ======================================== */
#primary.mypage-wrap {
    background: #2a2520 !important;
    color: #f5f0e8 !important;
}

.mypage-lead {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin: 0 0 28px;
    padding: 20px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    color: #f5f0e8;
}

.mypage-welcome-msg {
    font-size: 1.2rem;
    text-align: center;
    margin: 0 0 24px;
    padding: 16px 20px;
    background: #3d3530;
    border: 1px solid #8b7355;
    border-radius: 6px;
    color: #f5f0e8;
}

.mypage-recruitment-disabled {
    color: #a89888;
    font-size: 0.95em;
}

.mypage-recruitment-note {
    margin-top: 8px;
    font-size: 0.9em;
    color: #a89888;
}

.mypage-wrap input[type="text"],
.mypage-wrap select,
.mypage-wrap textarea {
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
    box-sizing: border-box;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
}
.mypage-wrap input[type="text"]:not(.mypage-input-full),
.mypage-wrap select:not(.mypage-input-fit),
.mypage-wrap textarea {
    max-width: 480px;
}

.mypage-wrap textarea {
    min-height: 100px;
    resize: vertical;
}

.mypage-wrap textarea.mypage-textarea-resize {
    resize: vertical;
    min-width: 200px;
    min-height: 4.5em;
    max-width: 100%;
}

/* ダーク枠カード（共通） */
.ordeal-card-dark {
    border: 2px solid #5c5248;
    padding: 20px;
    margin-bottom: 30px;
    background: #3d3530;
    color: #f5f0e8;
}

/* マイページ：「ルームのテーマ」は大きな枠にしない。下のキャラ編集だけ枠 */
.mypage-wrap .mypage-edit-character-theme-only.ordeal-card-dark {
    border: none;
    padding: 0;
    margin-bottom: 24px;
    background: transparent;
    color: inherit;
}
.mypage-wrap .mypage-edit-character-theme-only .mypage-label,
.mypage-wrap .mypage-edit-character-theme-only .ordeal-chat-admin-section-desc {
    color: inherit;
}

.mypage-wrap .mypage-edit-character {
    background: #3d3530 !important;
    border: 2px solid #5c5248 !important;
    padding: 20px;
    margin-bottom: 30px;
    color: #f5f0e8;
}

.mypage-edit-character-main {
    margin-bottom: 0;
}

.mypage-edit-character-theme {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #5c5248;
}

.mypage-wrap .mypage-field-name-full input.mypage-input-full,
.mypage-wrap .mypage-field-name-full .mypage-input-full {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.mypage-row-gender-age {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    align-items: flex-end;
}

.mypage-row-gender-age .mypage-field-gender,
.mypage-row-gender-age .mypage-field-age {
    margin: 0;
    min-width: 100px;
}

.mypage-row-gender-age .mypage-field-height,
.mypage-row-gender-age .mypage-field-weight,
.mypage-row-gender-age .mypage-field-bust,
.mypage-row-gender-age .mypage-field-waist,
.mypage-row-gender-age .mypage-field-hip,
.mypage-row-gender-age .mypage-field-blood,
.mypage-row-gender-age .mypage-field-sign {
    margin: 0;
    min-width: 0;
}

.mypage-input-fit {
    min-width: 0;
    width: auto;
}

.mypage-input-measure {
    text-align: right;
}

/* キャラ設定の数字系入力は最小限の幅にする（3桁＋余白程度） */
.mypage-wrap .mypage-row-gender-age input.mypage-input-measure {
    width: 56px !important;
    max-width: 56px !important;
}

.mypage-row-gender-age .mypage-label {
    font-size: 0.95em;
}

.mypage-unit {
    font-size: 0.8em;
    opacity: 0.8;
}

/* 性別・年齢・血液型・星座などのセレクトは必要幅のみ */
.mypage-wrap .mypage-row-gender-age select.mypage-input-fit {
    width: auto !important;
    max-width: none !important;
}

.mypage-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.mypage-checkbox-group .mypage-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    cursor: pointer;
}

.mypage-field-attributes .mypage-label,
.mypage-field-ng .mypage-label {
    margin-right: 6px;
}

.mypage-edit-character .mypage-label,
.mypage-wrap .mypage-label {
    color: #e8e0d5;
}

.mypage-field-with-limit {
    width: 100%;
    box-sizing: border-box;
}

.mypage-label-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
    box-sizing: border-box;
}

.mypage-char-limit-hint {
    font-size: 0.9em;
    color: #a89888;
}

.mypage-character-item {
    border: 1px solid #5c5248;
    margin-bottom: 10px;
    padding: 15px;
    background: #3d3530;
}

.mypage-character-header {
    margin: 0 0 8px;
    color: #f5f0e8;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mypage-character-header-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.mypage-character-header-left .mypage-character-attr {
    flex-shrink: 0;
}

.mypage-character-header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.mypage-character-header-one-line .mypage-character-meta {
    margin-left: 0;
    font-size: 0.95em;
    flex-shrink: 1;
}

.mypage-character-header-one-line .mypage-character-label {
    color: #c8c0b8;
}

.mypage-character-header-one-line .mypage-character-gender-value,
.mypage-character-header-one-line .mypage-character-age-value {
    flex-shrink: 0;
}

.mypage-character-header-one-line .mypage-gender-female {
    color: #ff8080;
}

.mypage-character-header-one-line .mypage-gender-male {
    color: #80b5ff;
}

.mypage-character-header-one-line .mypage-gender-other {
    color: #7ddc7d;
}

.mypage-character-bio {
    margin: 8px 0 0;
    padding: 0;
    font-size: 0.9em;
    color: #b8b0a8;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

.btn-character-select {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #5c5248;
    background: #5c5248;
    color: #e8e0d5;
}

.mypage-character-header .form-delete-character {
    flex-shrink: 0;
    margin-left: auto;
}

.mypage-character-name {
    color: #f5f0e8;
}

.mypage-recruitment-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #5c5248;
}

.mypage-recruitment-form-label {
    color: #e8e0d5;
}

.mypage-section-title {
    margin-top: 0;
    color: #f5f0e8;
}

.mypage-character-item .mypage-recruitment-form textarea:focus,
.mypage-wrap input:focus,
.mypage-wrap select:focus,
.mypage-wrap textarea:focus {
    border-color: #8b7355;
    outline: none;
}

.btn-recruitment-submit:hover {
    background: #6d6256 !important;
}

.mypage-character-header .btn-character-edit,
.mypage-character-header .btn-character-delete {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #5c5248;
}

.mypage-wrap .btn-character-edit {
    text-decoration: none;
}

.mypage-character-header .btn-character-edit {
    background: #5c5248;
    color: #e8e0d5;
}

.mypage-character-header .btn-character-edit:hover {
    background: #6d6256;
    color: #fff;
}

.mypage-character-header .btn-character-delete {
    background: #e0d8cc;
    color: #4a4038;
    border: 1px solid #a09888;
}

.mypage-character-header .btn-character-delete:hover {
    background: #d4ccc0;
    color: #2a2520;
}

.mypage-character-header .form-delete-character {
    display: inline-block;
}

.mypage-recruitment-comments-box {
    border: 1px solid #5c5248;
    border-radius: 8px;
    padding: 16px;
    background: rgba(31, 27, 24, 0.4);
    margin-bottom: 16px;
}

.mypage-room-theme-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.mypage-room-theme-note {
    margin: 4px 0 8px;
    font-size: 0.85em;
    color: #d0c8bc;
}

.mypage-recruitment-comment-item {
    border: 1px solid #5c5248;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    background: #1f1b18;
    box-sizing: border-box;
    overflow: hidden;
}

.mypage-recruitment-comment-item:last-child {
    margin-bottom: 0;
}

.mypage-comment-item-footer {
    margin: 8px 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mypage-comment-delete-btn {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #a09888;
    background: #e0d8cc;
    color: #4a4038;
}

.mypage-comment-delete-btn:hover {
    background: #d4ccc0;
    color: #2a2520;
}

.mypage-comment-room-form {
    margin: 0;
}

.mypage-comment-room-btn {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.85em;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #5c5248;
    background: #5c5248;
    color: #f5f0e8;
    text-decoration: none;
}

.mypage-comment-room-btn:hover {
    background: #6d6256;
}

.mypage-comment-room-btn-disabled {
    opacity: 0.5;
    cursor: default;
}

/* 明るいテーマ時のルームボタンのコントラスト調整 */
body.ordeal-theme-light .mypage-comment-room-btn {
    background: #e0d8cc;
    color: #3a3028;
    border-color: #a09078;
}

body.ordeal-theme-light .mypage-comment-room-btn:hover:not(.mypage-comment-room-btn-disabled) {
    background: #d2c6b4;
    color: #201a15;
}

.mypage-comment-item-head {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px 0;
    min-width: 0;
}

.mypage-comment-item-head .mypage-comment-label {
    margin-bottom: 0;
    flex-shrink: 0;
}

.mypage-comment-label-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
}

.mypage-comment-label-wrap .mypage-char-limit-hint {
    white-space: nowrap;
}

.mypage-comment-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0%;
    min-width: 0;
    justify-content: flex-end;
}

.mypage-comment-outcome-wrap {
    flex-shrink: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.mypage-comment-outcome-wrap .mypage-label-inline {
    flex-shrink: 0;
}

.mypage-comment-outcome-wrap .mypage-input-inline {
    margin-left: 0;
    max-width: 140px;
    min-width: 0;
}

.mypage-textarea-resize {
    resize: both;
    min-width: 200px;
    min-height: 4.5em;
    width: 100%;
    box-sizing: border-box;
}

.mypage-character-header .form-delete-character button {
    padding: 4px 12px;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.btn-character-update,
.btn-character-cancel-edit {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
}

.btn-character-cancel-edit {
    background: transparent;
    color: #a89888;
}

.btn-character-cancel-edit:hover {
    color: #f5f0e8;
}

/* マイページ：上限時は新規キャラ作成ボタンを表示したまま無効化 */
.mypage-wrap .btn-character-update.mypage-btn-char-create-disabled,
.mypage-wrap .btn-character-update:disabled {
    background: #3d3530;
    color: #8a8078;
    border-color: #4a4038;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

/* マイページ（ダーク）：リンクを背景と明確に区別できる色に */
.mypage-wrap a {
    color: #c9b896;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.mypage-wrap a:hover,
.mypage-wrap a:focus {
    color: #e8dcc0;
}

/* 上限お知らせ：他説明文と区別しやすいようにピンク系で表示 */
.mypage-char-limit-notice {
    color: #e8a8b0;
}
.mypage-char-limit-notice a {
    color: #e8c0c8;
}
.mypage-char-limit-notice a:hover,
.mypage-char-limit-notice a:focus {
    color: #f0d0d8;
}

/* キャラ編集ページのキャンセルボタン（白背景・黒文字） */
.btn-character-cancel {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    background: #fff;
    color: #2a2520;
    border: 1px solid #8b7355;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
}

.btn-character-cancel:hover {
    background: #f5f0e8;
    color: #1a1510;
}

/* キャラ編集フォームのボタン行：変更を保存・キャンセルは左に並べ、削除は右端に離して配置 */
.mypage-edit-character-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.mypage-edit-character-buttons .btn-character-delete {
    margin-left: auto;  /* 左側（保存・キャンセル）と離し、右端に削除ボタン */
    padding: 8px 16px;
    background: #6b2c2c;
    color: #fff;
    border: 1px solid #8b4040;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
.mypage-edit-character-buttons .btn-character-delete:hover {
    background: #8b3838;
    color: #fff;
}

/* 募集コメント10種選択 */
.mypage-recruitment-form .recruitment-comment-select {
    min-height: 42px;
    padding: 8px 12px;
    max-width: 480px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
}

/* ========================================
   チャット：LINE風吹き出し（左右・性別で色）
   ======================================== */
.chat-room-wrap {
    background: #2a2520 !important;
    color: #f5f0e8;
}

/* 5エリアレイアウト：ヘッダー / ルーム情報 / メッセージ / 入力 / 送信バー（表示が切れないよう数px広げる） */
.chat-room-wrap.chat-room-layout {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: -8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

body.admin-bar .chat-room-wrap.chat-room-layout {
    top: 82px;
}

/* 未ログイン時チャットページ：画面下にフローティング表示のログイン案内 */
.ordeal-chat-login-float {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    width: calc(100% - 40px);
    max-width: 380px;
    padding: 24px 28px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}
.ordeal-chat-login-float-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: #f5f0e8;
}
.ordeal-chat-login-float-text {
    margin: 0 0 20px;
    font-size: 0.9rem;
    color: #b8a99a;
    line-height: 1.5;
}
.ordeal-chat-login-float-actions {
    margin: 0;
}
.ordeal-chat-login-float-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #8b7355;
    color: #f5f0e8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid #a89070;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.ordeal-chat-login-float-btn:hover,
.ordeal-chat-login-float-btn:focus {
    background: #a89070;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.ordeal-theme-light .ordeal-chat-login-float {
    background: #f5f0e8;
    border-color: #c4b8a8;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
body.ordeal-theme-light .ordeal-chat-login-float-title {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-chat-login-float-text {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-chat-login-float-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body.ordeal-theme-light .ordeal-chat-login-float-btn:hover,
body.ordeal-theme-light .ordeal-chat-login-float-btn:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 覗き見中に相手が退室したとき：画面下に「入室する」フロート */
.ordeal-spectate-join-float {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
    max-width: calc(100% - 40px);
}
.ordeal-spectate-join-float.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.ordeal-spectate-join-float-text {
    margin: 0;
    font-size: 0.95rem;
    color: #f5f0e8;
}
.ordeal-spectate-join-float-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #8b7355;
    color: #f5f0e8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid #a89070;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, color 0.2s;
}
.ordeal-spectate-join-float-btn:hover,
.ordeal-spectate-join-float-btn:focus {
    background: #a89070;
    color: #fff;
}
body.ordeal-theme-light .ordeal-spectate-join-float {
    background: #f5f0e8;
    border-color: #c4b8a8;
}
body.ordeal-theme-light .ordeal-spectate-join-float-text {
    color: #2a2520;
}

/* Area 1: ヘッダー（固定・リサイズ不可） */
.chat-room-layout .chat-room-head {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 20px;
    border-bottom: 1px solid #5c5248;
    z-index: 20;
}

/* Area 2: ルーム情報（リサイズ可） */
.chat-room-layout .chat-area-roominfo {
    flex: 0 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 20px;
    min-height: 60px;
}

/* リサイズバー共通（Bar A / Bar B） */
.chat-resizer {
    flex: 0 0 8px;
    height: 8px;
    cursor: ns-resize;
    background: transparent;
    position: relative;
    z-index: 5;
}

.chat-resizer::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 20%;
    top: 50%;
    margin-top: -2px;
    height: 4px;
    background: #5c5248;
    border-radius: 2px;
    pointer-events: none;
}

.chat-resizer:hover::after,
.chat-resizer:active::after {
    background: #8b7355;
}

.chat-resizer-b::after {
    left: 30%;
    right: 30%;
}

.chat-room-head .chat-back-link {
    color: #c9b896;
    text-decoration: underline;
    font-size: 0.9em;
}

/* Area 3: ダイアログ（メッセージログ） */
.chat-room-layout .chat-area-dialogue {
    flex: 1 1 0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-room-layout .chat-area-dialogue .chat-messages {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 18px;
}

.chat-room-layout .chat-area-dialogue .chat-room-enter-form {
    margin: 20px;
    overflow-y: auto;
}

/* Area 4: メッセージ入力 */
.chat-room-layout .chat-area-input {
    flex: 0 0 auto;
    min-height: 80px;
    padding: 0 20px;
    background: #2a2520;
    border-top: 1px solid #5c5248;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.chat-room-layout .chat-area-input > form {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.chat-room-layout .chat-area-input textarea {
    flex: 1 1 0;
    min-height: 0;
    resize: none;
    width: 100%;
    box-sizing: border-box;
}

/* Area 5: 送信バー（常に最下部に固定） */
.chat-room-layout .chat-area-sendbar {
    flex: 0 0 auto;
    padding: 8px 20px 12px;
    background: #2a2520;
    z-index: 10;
    box-sizing: border-box;
}

/* チャット入力フォーム上下の余白をなくし、リサイズバー直下にテキストエリアを配置する */
.chat-input-wrap form {
    margin: 0;
}

.chat-room-head .chat-back-link:hover {
    color: #f5f0e8;
}

.chat-messages {
    padding: 16px;
    min-height: 320px;
    max-height: 60vh;
    overflow-y: auto;
}

/* チャット入力フォーム上下の余白をなくし、リサイズバー直下にテキストエリアを配置する */
.chat-area-input form {
    margin: 0;
}

.chat-message {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
}

.chat-message.mine {
    justify-content: flex-end;
}

.chat-message .chat-bubble-wrap {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-message:not(.mine) .chat-bubble-wrap {
    align-items: flex-start;
}

.chat-message.mine .chat-bubble-wrap {
    align-items: flex-end;
}

.chat-message .chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}

.chat-message:not(.mine) .chat-bubble {
    border-top-left-radius: 4px;
    margin-right: auto;
}

.chat-message.mine .chat-bubble {
    border-top-right-radius: 4px;
    margin-left: auto;
}

/* 男性：ブルー系 */
.chat-bubble.bubble-male {
    background: #2c5282;
    color: #e8f0f8;
    border: 1px solid #3a6a9a;
}

/* 女性：レッド系 */
.chat-bubble.bubble-female {
    background: #7c3a2c;
    color: #f8e8e8;
    border: 1px solid #9a4a3a;
}

/* その他：ニュートラル */
.chat-bubble.bubble-other {
    background: #4a4a42;
    color: #e8e8e0;
    border: 1px solid #5c5c54;
}

/* バブルの右（自分の時は左）に話者名・タイムスタンプを縦に配置（名前が上、時刻が下） */
.chat-bubble-time-wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.chat-message.mine .chat-bubble-time-wrap {
    flex-direction: row-reverse;
}

/* 吹き出しは残り幅を確保し、名前が長くても狭くならない */
.chat-bubble-time-wrap > .chat-bubble,
.chat-bubble-time-wrap > .chat-narration-box {
    flex: 1 1 0;
    min-width: 120px;
}

.chat-bubble-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex-shrink: 0;
    max-width: 160px;
}

.chat-message.mine .chat-bubble-meta {
    align-items: flex-end;
}

.chat-message .chat-bubble-name {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #c9b896;
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-bubble-time {
    display: block;
    font-size: 0.75em;
    color: #a89888;
    white-space: nowrap;
}

.chat-message.mine .chat-bubble-time {
    text-align: right;
}

/* ナレーション：枠の中心をチャット画面の中心から自分の時は10%右(60%)・相手の時は10%左(40%)に固定 */
.chat-message.chat-message-narration {
    justify-content: flex-start;
    position: relative;
}

.chat-message.chat-message-narration .chat-bubble-wrap {
    width: max-content;
    min-width: 300px !important;
    max-width: min(max(300px, 80%), calc(100vw - 48px));
    position: relative;
}

.chat-message.mine.chat-message-narration .chat-bubble-wrap {
    left: 60%;
    transform: translateX(-50%);
}

.chat-message.chat-message-narration:not(.mine) .chat-bubble-wrap {
    left: 40%;
    transform: translateX(-50%);
}

.chat-message.chat-message-narration .chat-bubble-time-wrap > .chat-narration-box {
    flex: 1 1 0;
    min-width: 120px;
    width: 100% !important;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box,
body .chat-messages .chat-message.chat-message-narration .chat-narration-box {
    display: block !important;
    box-sizing: border-box !important;
    width: max-content !important;
    min-width: 300px !important;
    max-width: min(720px, calc(100vw - 48px)) !important;
    min-height: 1em;
    border: 1px solid #000 !important;
    background: #fff !important;
    padding: 10px 14px !important;
    border-radius: 4px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box * {
    color: inherit;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-female,
body .chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-female {
    color: red;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-female * {
    color: red;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-male,
body .chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-male {
    color: blue;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-male * {
    color: blue;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-other,
body .chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-other {
    color: purple;
}

.chat-messages .chat-message.chat-message-narration .chat-narration-box.narration-other * {
    color: purple;
}

/* 本文中の「説明」部分：色・フォントサイズ・スタイルは管理画面「チャット配色」で指定（ここでは指定しない） */
.chat-message .chat-bubble .chat-message-explanation,
.chat-message .chat-narration-box .chat-message-explanation {
    /* 管理画面の動的CSSで上書きされる。未設定時は functions.php のデフォルトで出力 */
}
/* 説明ブロックが連続するとき、デリミター ］［ がつながらないように間隔をあける */
.chat-message-explanation + .chat-message-explanation {
    margin-left: 0.2em;
}

/* 明るいテーマでもナレーション枠を同じように表示 */
body.ordeal-theme-light .chat-messages .chat-message.chat-message-narration .chat-narration-box {
    border: 1px solid #000 !important;
    background: #fff !important;
}

.chat-message-type-row {
    margin: 0;
    display: inline-flex;
    gap: 16px;
    align-items: center;
}

.chat-message-type-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* チャット管理ページ：見やすさ優先・シンプル */
.ordeal-chat-admin-wrap {
    padding: 28px 24px 48px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
}

.ordeal-chat-admin-title {
    margin: 0 0 12px;
    color: #f5f0e8;
    font-size: 1.5rem;
    font-weight: 700;
}

.ordeal-chat-admin-message {
    color: #9ccc65;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* ブロック：チャット管理ページ（.ordeal-page-chat-admin）のみ。他ページは変更しない */
.ordeal-page-chat-admin .ordeal-chat-admin-block {
    background: #2c2620;
    border: 1px solid #4a4038;
    border-radius: 4px;
    margin-bottom: 28px;
    overflow: visible;
    box-sizing: border-box;
}
.ordeal-page-chat-admin .ordeal-chat-admin-block-archive {
    margin-top: 36px;
}

.ordeal-page-chat-admin .ordeal-chat-admin-block .ordeal-chat-admin-section-label {
    margin: 0;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #f0e8dc;
    border-bottom: 2px solid #4a4038;
    background: #332d28;
}
.ordeal-chat-admin-block .ordeal-chat-admin-section-label-archive {
    margin-top: 0;
}

.ordeal-chat-admin-section-label {
    font-size: 0.9rem;
    color: #a89888;
    margin: 0 0 8px;
    font-weight: 600;
}
.ordeal-chat-admin-section-label-archive {
    margin-top: 32px;
}

.ordeal-page-chat-admin .ordeal-chat-admin-block .ordeal-chat-admin-main-frame {
    border: none;
    border-radius: 0;
    background: transparent;
    margin-bottom: 0;
}

.ordeal-chat-admin-main-frame {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    overflow: visible;
    box-sizing: border-box;
}

/* アコーディオン用のみリセット。マイページの .ordeal-chat-admin-section.ordeal-card-dark はそのまま */
.ordeal-chat-admin-accordion.ordeal-chat-admin-section {
    padding: 0;
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #4a4038;
    background: transparent;
}
.ordeal-chat-admin-main-frame .ordeal-chat-admin-accordion.ordeal-chat-admin-section:last-of-type {
    border-bottom: none;
}
.ordeal-chat-admin-accordion-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: #e8e0d5;
    font-size: 1rem;
    font-weight: 600;
    user-select: none;
}
.ordeal-chat-admin-accordion-summary::-webkit-details-marker {
    display: none;
}
.ordeal-chat-admin-accordion-summary:hover {
    background: rgba(255, 255, 255, 0.06);
}
.ordeal-chat-admin-accordion-icon {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #b8a99a;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}
.ordeal-chat-admin-accordion[open] .ordeal-chat-admin-accordion-icon {
    transform: rotate(180deg);
}
.ordeal-chat-admin-accordion-body {
    padding: 20px 24px 28px;
    border-top: 1px solid #3d3530;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: auto;
}
/* チャット管理ページのみ：開いた中身を入力欄より明るく */
.ordeal-page-chat-admin .ordeal-chat-admin-accordion-body {
    background: #2a2520;
}
.ordeal-chat-admin-accordion-body .ordeal-chat-admin-section-desc:first-child {
    margin-top: 0;
}

.ordeal-chat-admin-section-title {
    margin: 0 0 12px;
    color: #e8e0d5;
    font-size: 1rem;
    font-weight: 600;
}

.ordeal-chat-admin-section-desc {
    color: #b8a99a;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 20px;
}
.ordeal-chat-admin-accordion-body .ordeal-chat-admin-section-desc + .ordeal-chat-admin-section-desc {
    margin-top: 12px;
}
.ordeal-chat-admin-accordion-body .ordeal-chat-admin-color-table {
    margin-top: 0;
}

/* チャット配色：表形式でコンパクトに */
.ordeal-chat-admin-color-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.ordeal-chat-admin-color-table th,
.ordeal-chat-admin-color-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #3d3530;
    vertical-align: middle;
}

.ordeal-chat-admin-color-table thead th {
    background: #1f1b18;
    color: #b8a99a;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #5c5248;
}

.ordeal-chat-admin-color-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* プレミアム管理：設定表を枠いっぱいに・設定項目は左揃え・入力欄は全行で同一幅 */
.ordeal-premium-settings-table.ordeal-chat-admin-color-table {
    table-layout: fixed;
    width: 100%;
}
.ordeal-premium-settings-table .ordeal-premium-settings-th-item {
    width: 45%;
    text-align: left;
}
.ordeal-premium-settings-table .ordeal-premium-settings-th-value {
    width: 27.5%;
}
.ordeal-premium-settings-table .ordeal-premium-settings-row-label {
    font-weight: 600;
    color: #e8e0d5;
    vertical-align: middle;
    padding: 10px 12px;
    line-height: 1.35;
    text-align: left;
}
.ordeal-premium-settings-table .ordeal-premium-settings-label-main {
    display: block;
}
.ordeal-premium-settings-table .ordeal-premium-settings-label-note {
    display: block;
    font-size: 0.82em;
    font-weight: 400;
    color: #a89888;
    margin-top: 4px;
}
.ordeal-premium-settings-table .ordeal-premium-settings-cell {
    vertical-align: middle;
    padding: 10px 12px;
}
/* ログ・キャラ上限・テーマ枠の入力欄はすべて同じ幅で縦に揃える */
.ordeal-premium-settings-table .ordeal-premium-settings-input {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    box-sizing: border-box;
    text-align: right;
    padding: 6px 8px;
}

.ordeal-chat-admin-color-table .ordeal-chat-admin-color-cell-label {
    color: #e8e0d5;
    font-weight: 500;
    white-space: nowrap;
    width: 1%;
}

.ordeal-chat-admin-color-table .ordeal-chat-admin-color-cell {
    min-width: 0;
}
.ordeal-chat-admin-color-table .ordeal-chat-admin-font-cell {
    min-width: 200px;
}
.ordeal-chat-admin-color-table .ordeal-chat-admin-color-cell .ordeal-chat-font-display-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ordeal-chat-font-preview-box {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 6px;
    box-sizing: border-box;
    border: 1px solid rgba(0,0,0,0.1);
}
.ordeal-chat-font-display {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.ordeal-theme-light .ordeal-chat-font-preview-box {
    border-color: rgba(0,0,0,0.15);
}
.ordeal-chat-font-btn {
    flex-shrink: 0;
    margin-left: auto;
}

.ordeal-chat-admin-field-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    min-width: 0;
}
.ordeal-chat-admin-field-inline:last-child {
    margin-bottom: 0;
}

.ordeal-chat-admin-field-inline .ordeal-chat-admin-field-label {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.ordeal-chat-admin-field-label {
    display: block;
    margin-bottom: 8px;
    color: #e0d8cc;
    font-size: 0.95rem;
    font-weight: 600;
}

.ordeal-chat-admin-wrap input[type="text"],
.ordeal-chat-admin-wrap input[type="number"],
.ordeal-chat-admin-wrap textarea {
    box-sizing: border-box;
    max-width: 100%;
}

.ordeal-chat-admin-field {
    margin-bottom: 18px;
    min-width: 0;
}
.ordeal-chat-admin-field:last-child {
    margin-bottom: 0;
}
.ordeal-chat-admin-field .description {
    display: block;
    margin-top: 6px;
    margin-left: 0;
    font-size: 0.85rem;
    color: #a89888;
    line-height: 1.4;
}

.ordeal-chat-admin-color-inputs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ordeal-chat-admin-color-inputs .ordeal-color-picker {
    width: 40px;
    height: 32px;
    padding: 0;
    border: 1px solid #5c5248;
    border-radius: 4px;
    cursor: pointer;
    background: #1f1b18;
}

.ordeal-chat-admin-color-inputs .ordeal-color-hex {
    width: 7em;
    min-width: 72px;
    padding: 6px 8px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
    box-sizing: border-box;
}

.ordeal-font-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ordeal-font-input-wrap .ordeal-font-input {
    width: 180px;
}

.ordeal-chat-admin-color-table .ordeal-font-input-wrap .ordeal-font-input {
    width: 160px;
    max-width: 100%;
}

.ordeal-font-picker-btn {
    padding: 6px 12px;
    cursor: pointer;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
}

.ordeal-font-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ordeal-font-picker-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.ordeal-font-picker-modal-content {
    position: relative;
    background: #2a2520;
    border: 1px solid #5c5248;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 100%;
}

.ordeal-font-picker-modal-title {
    margin-top: 0;
    margin-bottom: 12px;
    color: #f5f0e8;
}

.ordeal-font-picker-preview-label {
    margin-bottom: 4px;
    color: #a89888;
    font-size: 0.9em;
}

.ordeal-font-picker-preview {
    margin: 0 0 16px 0;
    padding: 12px;
    background: #1f1b18;
    border: 1px solid #5c5248;
    border-radius: 4px;
    color: #f5f0e8;
    font-size: 1.1em;
}

.ordeal-font-picker-modal-content label {
    color: #e8e0d5;
}

.ordeal-font-picker-modal-content select,
.ordeal-font-picker-modal-content input[type="text"] {
    margin-left: 8px;
    padding: 6px 8px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
}

.ordeal-font-picker-modal-actions {
    margin-top: 16px;
    margin-bottom: 0;
}

.ordeal-font-picker-modal-actions .button {
    margin-right: 8px;
    padding: 8px 16px;
    cursor: pointer;
}

body.ordeal-theme-light .ordeal-font-picker-modal-content {
    background: #e8e0d5;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-font-picker-modal-title {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-font-picker-preview {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-font-picker-modal-content label {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-font-picker-modal-content select,
body.ordeal-theme-light .ordeal-font-picker-modal-content input[type="text"] {
    background: #fff;
    color: #2a2520;
    border-color: #c9b896;
}

.ordeal-font-input,
.ordeal-char-option-textarea {
    width: 100%;
    max-width: 280px;
    padding: 8px 10px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
}

.ordeal-char-option-textarea {
    max-width: 100%;
    min-height: 120px;
    resize: vertical;
}

.ordeal-char-option-group {
    margin-bottom: 24px;
}

.ordeal-char-option-group .ordeal-chat-admin-field-label {
    margin-bottom: 6px;
}

.ordeal-chat-admin-actions {
    margin-top: 24px;
    padding: 24px 24px 28px;
    border-top: 2px solid #4a4038;
}

.ordeal-chat-admin-submit {
    padding: 12px 28px;
    cursor: pointer;
    background: #5c5248;
    color: #f5f0e8;
    border: 2px solid #8b7355;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1em;
}
.ordeal-chat-admin-submit:hover {
    background: #6b6156;
    border-color: #9b8365;
    color: #fff;
}

/* 対話ログページ：削除・ダウンロードなどのボタンを少し小さめに */
.ordeal-log-bulk-btn,
.ordeal-log-detail-btn {
    padding: 6px 14px;
    font-size: 0.9em;
    min-width: 0;
}

.ordeal-chat-admin-back {
    margin-left: 12px;
    color: #c4b5a5;
    font-weight: 500;
}
.ordeal-chat-admin-back:hover {
    color: #f5f0e8;
}

/* 対話ログ一覧：日時リンク */
.ordeal-log-date-link:hover {
    color: #a8d4f0 !important;
}

body.ordeal-theme-light .ordeal-log-date-link {
    color: #1a5a8a;
}
body.ordeal-theme-light .ordeal-log-date-link:hover {
    color: #2c5282 !important;
}

/* 明るい表示時：対話ログ一覧のカード（相手・自分のキャラ名を見やすく） */
/* 対話ログ一覧：性別表示を対話ログ詳細と同じ色に（男性＝青、女性＝赤） */
.ordeal-log-list-char-line .ordeal-log-gender-male {
    color: #2c5282;
}
.ordeal-log-list-char-line .ordeal-log-gender-female {
    color: #c53030;
}
.ordeal-log-list-char-line .ordeal-log-gender-other {
    color: #805ad5;
}
body.ordeal-theme-light .ordeal-log-list-char-line .ordeal-log-gender-male {
    color: #2563eb;
}
body.ordeal-theme-light .ordeal-log-list-char-line .ordeal-log-gender-female {
    color: #b91c1c;
}
body.ordeal-theme-light .ordeal-log-list-char-line .ordeal-log-gender-other {
    color: #553c9a;
}

/* 対話ログ一覧：テーマ本文の背景をカードと少し違う色に */
.ordeal-log-list-line2 {
    background: #3d3530;
    padding: 4px 8px;
    border-radius: 4px;
}

body.ordeal-theme-light .ordeal-log-list-item {
    background: #e8e0d5 !important;
    border-color: #c9b896 !important;
}
body.ordeal-theme-light .ordeal-log-list-line1 {
    color: #2a2520 !important;
}
body.ordeal-theme-light .ordeal-log-list-line2 {
    color: #4a4038 !important;
    background: #faf8f5;
}

/* 明るい表示時：チャット管理ページ（/chat-admin/）のみ。他ページは変更しない */
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-title {
    color: #1a1510;
    font-weight: 700;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-block {
    background: #f2f0ed;
    border: 1px solid #8b7355;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-block-archive {
    background: #f2f0ed;
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-block .ordeal-chat-admin-section-label {
    color: #1a1510;
    font-weight: 700;
    border-bottom-color: #8b7355;
    background: #e8e4df;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-main-frame .ordeal-chat-admin-accordion.ordeal-chat-admin-section {
    border-bottom-color: #c9b896;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-accordion-body {
    border-top-color: #c9b896;
    background: #f8f7f5;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-accordion-summary {
    color: #1a1510;
    font-weight: 600;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-accordion-summary:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-accordion-icon {
    border-top-color: #5c5248;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-section-desc {
    color: #3d3530;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-field-label {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-field .description {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-actions {
    border-top-color: #8b7355;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-wrap input[type="number"],
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-wrap input[type="text"] {
    background: #fff;
    color: #1a1510;
    border: 1px solid #5c5248;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-submit {
    background: #6b5344;
    color: #f5f0e8;
    border: 1px solid #5c5248;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-submit:hover {
    background: #5c5248;
    color: #fff;
}

body.ordeal-theme-light .ordeal-log-list-actions .ordeal-log-sort-btn {
    background: #4b6b9e;
    color: #fff;
    border-color: #3d5a80;
}
body.ordeal-theme-light .ordeal-log-list-actions .ordeal-log-sort-btn:hover {
    background: #3d5a80;
    border-color: #2d4a70;
    color: #fff;
}

body.ordeal-theme-light .ordeal-log-detail-eval-memo-wrap {
    background: #e8e0d5 !important;
    border-color: #c9b896 !important;
}
body.ordeal-theme-light .ordeal-log-detail-eval-memo-wrap p {
    color: #5c5248 !important;
}
body.ordeal-theme-light .ordeal-log-detail-eval-memo-wrap .ordeal-log-detail-rating-value {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-log-detail-memo {
    background: #faf8f5 !important;
    border-color: #c9b896 !important;
    color: #2a2520 !important;
}
body.ordeal-theme-light .ordeal-log-detail-memo::placeholder {
    color: #8b7355;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-section-title {
    color: #1a1510;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-section-desc {
    color: #3d3530;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-table th,
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-table td {
    border-bottom-color: #c9b896;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-table thead th {
    background: #ddd5c8;
    color: #3d3530;
    border-bottom-color: #8b7355;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-table .ordeal-chat-admin-color-cell-label {
    color: #1a1510;
}

body.ordeal-theme-light .ordeal-premium-settings-table .ordeal-premium-settings-row-label {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-premium-settings-table .ordeal-premium-settings-label-note {
    color: #5c5248;
}

/* プレミアム会員管理ページ：明るいテーマ時の文字・表の見やすさ */
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-title {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-back {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-back:hover {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-message {
    color: #2e7d32;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-section-desc {
    color: #3d3530;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-section-title {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-color-table thead th {
    background: #e8e0d5;
    color: #3d3530;
    border-bottom-color: #8b7355;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-color-table th,
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-color-table td {
    border-bottom-color: #c9b896;
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-color-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.04);
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-premium-settings-table .ordeal-premium-settings-input {
    background: #fff;
    color: #1a1510;
    border: 1px solid #c9b896;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-submit {
    background: #6b5344;
    color: #f5f0e8;
    border-color: #5c5248;
}
body.ordeal-theme-light .ordeal-premium-admin-wrap .ordeal-chat-admin-submit:hover {
    background: #5c5248;
    color: #fff;
}

/* サイト管理（/site-admin/）も ordeal-premium-admin-wrap を利用。明るい表示時にテキスト色をはっきりさせる */
body.ordeal-theme-light .ordeal-premium-admin-wrap,
body.ordeal-theme-light .ordeal-premium-admin-wrap p,
body.ordeal-theme-light .ordeal-premium-admin-wrap label,
body.ordeal-theme-light .ordeal-premium-admin-wrap span {
    color: #2a2520;
}

/* サイト管理：データリセットボタンの高さと形を他ボタンと揃える */
.ordeal-premium-admin-wrap button[name="ordeal_reset_room_data"] {
    padding: 8px 16px;
    border-radius: 4px;
}

/* サイト管理：確認チェックが入るまでボタンを押せなさそうな色にする（視覚的フィードバックのみ） */
.ordeal-premium-admin-wrap form:has(input[name="ordeal_reset_room_confirm"]:not(:checked)) button[name="ordeal_reset_room_data"] {
    background: #c9a3a0 !important;
    color: #fbeeee !important;
    border-color: #b58380 !important;
    cursor: default;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-label,
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-field-label {
    color: #1a1510;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-inputs .ordeal-color-picker {
    background: #fff;
    border: 1px solid #d5cfc4;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-color-inputs .ordeal-color-hex,
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-font-input,
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-char-option-textarea {
    background: #fff;
    color: #1a1510;
    border: 1px solid #5c5248;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-back {
    color: #5c5248;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-back:hover {
    color: #2a2520;
}

/* アクセス解析ページ（.ordeal-page-analytics）：デフォルト＋明るいテーマ時の文字見やすさ */
.ordeal-page-analytics .ordeal-analytics-stat-box {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    min-width: 120px;
}
.ordeal-page-analytics .ordeal-analytics-stat-label {
    font-size: 0.85em;
    color: #b8a99a;
}
.ordeal-page-analytics .ordeal-analytics-stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #e8e0d5;
}
.ordeal-page-analytics .ordeal-analytics-table {
    width: 100%;
    min-width: 280px;
    border-collapse: collapse;
}
.ordeal-page-analytics .ordeal-analytics-table th {
    text-align: left;
    padding: 8px 12px;
}
.ordeal-page-analytics .ordeal-analytics-table th:last-child {
    text-align: right;
}
.ordeal-page-analytics .ordeal-analytics-table td {
    padding: 8px 12px;
}
.ordeal-page-analytics .ordeal-analytics-table td:last-child {
    text-align: right;
}
.ordeal-page-analytics .ordeal-analytics-table thead tr {
    border-bottom: 2px solid #c9b896;
}
.ordeal-page-analytics .ordeal-analytics-table thead th {
    color: #a89888;
}
.ordeal-page-analytics .ordeal-analytics-table tbody tr {
    border-bottom: 1px solid #3d3530;
}
.ordeal-page-analytics .ordeal-analytics-table .ordeal-analytics-cell-path {
    word-break: break-all;
}
.ordeal-page-analytics .ordeal-analytics-empty {
    padding: 16px;
    color: #b8a99a;
}
.ordeal-page-analytics .ordeal-analytics-date-sep {
    color: #b8a99a;
}
.ordeal-page-analytics .ordeal-analytics-retention-section {
    margin-top: 32px;
    border: 1px solid #8b5550;
    border-radius: 8px;
    padding: 20px;
    background: rgba(139, 85, 80, 0.08);
}
.ordeal-page-analytics .ordeal-analytics-retention-title {
    color: #c96868;
}

.ordeal-page-analytics .ordeal-analytics-details {
    border: 1px solid #4a4038;
    border-radius: 8px;
    padding: 0 4px 4px;
}
.ordeal-page-analytics .ordeal-analytics-details-summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 8px 12px 28px;
    position: relative;
    user-select: none;
}
.ordeal-page-analytics .ordeal-analytics-details-summary::-webkit-details-marker {
    display: none;
}
.ordeal-page-analytics .ordeal-analytics-details-summary::before {
    content: "▶";
    position: absolute;
    left: 8px;
    font-size: 0.75em;
    color: #a89888;
    transition: transform 0.2s ease;
}
.ordeal-page-analytics .ordeal-analytics-details[open] .ordeal-analytics-details-summary::before {
    transform: rotate(90deg);
}

.ordeal-page-analytics .ordeal-analytics-chart-empty {
    color: #a89888;
}

body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-chart-wrap {
    background: rgba(0, 0, 0, 0.04);
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-chart-empty {
    color: #5c5248;
}

/* 明るいテーマ時：アクセス解析の文字・背景をはっきり表示 */
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-title {
    color: #1a1510;
}

/* 対話ログページ：明るいテーマ時のタイトル・戻るリンクの見やすさ */
body.ordeal-theme-light .ordeal-log-wrap .ordeal-chat-admin-title {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-log-wrap .ordeal-chat-admin-back {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-log-wrap .ordeal-chat-admin-back:hover {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-back {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-back:hover {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-message {
    color: #2e7d32;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-section-desc {
    color: #3d3530;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-section-title {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-field-label {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-stat-box {
    background: #e8e0d5;
    border: 1px solid #c9b896;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-stat-label {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-stat-value {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-date-sep {
    color: #3d3530;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-table thead th {
    color: #3d3530;
    border-bottom-color: #8b7355;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-table tbody tr {
    border-bottom-color: #c9b896;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-table td {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-empty {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-page-analytics input[type="date"],
body.ordeal-theme-light .ordeal-page-analytics input[type="number"] {
    background: #fff;
    color: #1a1510;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-section {
    background: rgba(139, 85, 80, 0.12);
    border-color: #8b7355;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-section .ordeal-chat-admin-section-desc {
    color: #3d3530;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-title {
    color: #8b5550;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-details {
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-details-summary::before {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-section .ordeal-chat-admin-field-label {
    color: #1a1510;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-submit {
    background: #6b5344;
    color: #f5f0e8;
    border-color: #5c5248;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-chat-admin-submit:hover {
    background: #5c5248;
    color: #fff;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-section button[name="ordeal_analytics_purge"] {
    background: #8b5550;
    color: #fff;
    border-color: #6d3848;
}
body.ordeal-theme-light .ordeal-page-analytics .ordeal-analytics-retention-section button[name="ordeal_analytics_purge"]:hover {
    background: #6d3848;
    color: #fff;
}

.ordeal-page-chat-admin .ordeal-chat-admin-section-link.ordeal-chat-admin-data-archive-frame {
    border: 1px solid #3d3530;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-section-link.ordeal-chat-admin-data-archive-frame {
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-page-chat-admin .ordeal-chat-admin-section-link.ordeal-chat-admin-data-archive-frame .ordeal-chat-admin-accordion-summary:hover {
    background: rgba(107, 83, 68, 0.12);
}

.chat-room-enter-form {
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.chat-room-enter-form select {
    min-height: 42px;
    padding: 8px 12px;
    max-width: 320px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
}

.chat-room-enter-form .chat-enter-char-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.chat-room-enter-form .chat-enter-no-char-notice {
    color: #e8c8c0;
}

body.ordeal-theme-light .chat-room-enter-form .chat-enter-no-char-notice {
    color: #5c4a3a;
}

.chat-room-enter-form .btn-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #3d3530;
    color: #8a8078;
    border-color: #4a4038;
}

body.ordeal-theme-light .chat-room-enter-form .btn-chat-send:disabled {
    background: #d4ccc0;
    color: #8a8078;
    border-color: #b8b0a8;
}

.chat-input-wrap textarea {
    min-height: 150px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 8px;
    padding: 12px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* セリフ選択時：入力欄は通常の暗い背景 */
#ordeal-chat-input-wrap.message-type-dialogue textarea {
    background: #1f1b18;
    border-color: #5c5248;
}
/* ナレーション選択時：入力欄の背景をやや明るい緑系にしてセリフと明確に区別 */
#ordeal-chat-input-wrap.message-type-narration textarea {
    background: #264535;
    border-color: #50825f;
}

/* 音声入力中：セリフ/ナレーションより優先して赤系の背景で録音中であることを表示 */
#ordeal-chat-input-wrap.voice-input-active textarea,
.chat-input-wrap.voice-input-active textarea {
    background: #4a2020 !important;
    border-color: #8b3a3a !important;
    color: #f5e8e8 !important;
}

.chat-input-wrap .btn-chat-send,
.chat-input-wrap .btn-chat-mic {
    margin-top: 10px;
    padding: 10px 24px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
    cursor: pointer;
    font-size: inherit;
    line-height: inherit;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.chat-input-wrap .btn-chat-send:hover,
.chat-input-wrap .btn-chat-mic:hover:not(:disabled) {
    background: #6d6256;
}

.chat-input-wrap .btn-chat-mic:disabled,
.chat-input-wrap .btn-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.chat-input-wrap .btn-chat-mic.listening {
    background: #8b4513;
    border-color: #a0522d;
    animation: ordeal-chat-mic-pulse 1s ease-in-out infinite;
}
@keyframes ordeal-chat-mic-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.chat-input-row .btn-chat-mic {
    margin-top: 0;
}

.chat-send-and-type-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chat-input-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.chat-input-row .btn-chat-send {
    margin-top: 0;
}

/* 音声入力ボタン／送信ボタン／セグメントの高さを揃える */
.chat-input-row .btn-chat-send,
.chat-input-row .btn-chat-mic,
.chat-message-type-segment {
    min-height: 38px;
}

/* セリフ : 本文|説明 | ナレーション の1本のセグメント */
.chat-message-type-segment {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #5c5248;
    border-radius: 6px;
    overflow: hidden;
    background: #2d2722;
}
.chat-message-type-segment-dialogue {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}
.chat-message-type-segment-narration {
    margin: 0;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
}
.chat-message-type-segment-dialogue input,
.chat-message-type-segment-narration input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.chat-segment-dialogue-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
}
.chat-message-type-label {
    font-size: 0.95em;
    color: #e0d8d0;
}
.chat-message-type-segment-divider {
    width: 1px;
    background: #5c5248;
    flex-shrink: 0;
}
.chat-message-type-segment-narration {
    padding: 10px 16px;
    font-size: 0.95em;
    color: #e0d8d0;
    opacity: 1;
}
.chat-message-type-segment-narration:hover {
    color: #f0e8e0;
}
.chat-message-type-segment-narration:has(input:checked) {
    background: rgba(200, 160, 160, 0.5);
    opacity: 1;
}
.chat-message-type-segment-narration:has(input:checked):hover {
    background: rgba(210, 170, 170, 0.55);
}

/* ナレーション選択時：本文・説明は選択肢ではないのでピンクにしない（ナレーションだけがピンク） */
#ordeal-chat-input-wrap.message-type-narration .chat-content-tab,
#ordeal-chat-input-wrap.message-type-narration .chat-content-tab.active,
#chat-area-sendbar.message-type-narration .chat-content-tab,
#chat-area-sendbar.message-type-narration .chat-content-tab.active {
    background: rgba(20, 18, 16, 0.6) !important;
    border-color: #4a4238 !important;
}

/* 本文・説明トグル（セリフ内のみ・枠内のボタン） */
.chat-content-type-tabs {
    display: inline-flex;
    gap: 0;
    border-radius: 4px;
    overflow: hidden;
}
.chat-content-tab {
    margin: 0;
    padding: 4px 10px;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    border: 1px solid #5c5248;
    background: rgba(31, 27, 24, 0.8);
    color: #e0d8d0;
}
.chat-content-tab:first-child {
    border-radius: 4px 0 0 4px;
    border-right-width: 0;
}
.chat-content-tab:last-child {
    border-radius: 0 4px 4px 0;
}
.chat-content-tab:hover {
    color: #f5f0e8;
}
.chat-content-tab.active {
    background: rgba(200, 160, 160, 0.5);
    border-color: #5c5248;
}
.chat-content-tab.active + .chat-content-tab {
    border-left-width: 0;
}
.chat-content-tab:first-child.active {
    border-right-width: 0;
}

.ordeal-send-mode-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.chat-send-mode-label {
    margin: 0;
    font-size: 0.95em;
}

.chat-sound-option-wrap {
    margin: 0;
    font-size: 0.95em;
}

.chat-sound-option-wrap label {
    cursor: pointer;
    user-select: none;
}

.ordeal-send-mode-form select {
    padding: 6px 10px;
    background: #3d3530;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
    cursor: pointer;
}

.chat-room-collapse summary {
    list-style: none;
    cursor: pointer;
}

.chat-room-collapse summary::-webkit-details-marker {
    display: none;
}

.chat-room-collapse-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
}

.chat-room-collapse-summary-left {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.chat-room-collapse-summary .chat-room-collapse-arrow {
    font-size: 0;
}

.chat-room-collapse-summary .chat-room-collapse-arrow::before {
    font-size: 1rem;
    content: '▼';
}

.chat-room-collapse:not([open]) .chat-room-collapse-summary .chat-room-collapse-arrow::before {
    content: '▶';
}


.chat-room-collapse-extra {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chat-room-member-count {
    color: #b8a99a;
    font-size: 0.9em;
}

.chat-room-theme-collapse .chat-room-collapse-body {
    margin: 0 0 8px;
}

.chat-room-char-collapse .chat-room-collapse-summary {
    margin: 0;
}

.chat-area-roominfo > details:last-of-type .chat-room-collapse-summary {
    margin-bottom: 0;
}

.chat-room-char-collapse .chat-room-collapse-body {
    margin: 4px 0 0;
}

.chat-room-collapse-summary .chat-room-collapse-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #b8a078;
}

.chat-room-theme-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 8px;
}

.chat-room-theme-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chat-room-theme-head-row .btn-chat-close,
.chat-room-theme-head-row .btn-chat-kick,
.chat-room-theme-collapse .chat-room-collapse-extra .btn-chat-close,
.chat-room-theme-collapse .chat-room-collapse-extra .btn-chat-kick,
.chat-room-theme-collapse .chat-room-collapse-extra .btn-chat-leave {
    padding: 2px 8px;
    font-size: 0.75em;
}

.chat-room-theme-head-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.chat-room-char-info-heading {
    margin: 0 0 2px;
    font-size: 0.9em;
    font-weight: 600;
    color: #b8a078;
}

.chat-recruitment-comment {
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    color: #c9b896;
}

.chat-recruitment-comment-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
}

.chat-recruitment-comment-left {
    flex: 1;
    min-width: 0;
}

.chat-recruitment-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
}

.chat-recruitment-comment-head .chat-recruitment-comment-label {
    margin: 0;
}

.chat-recruitment-comment-label {
    margin: 0 0 6px;
    font-size: 0.9em;
    font-weight: 600;
    color: #b8a078;
}

.chat-recruitment-comment-text {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
}

.chat-recruitment-comment-actions-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.chat-recruitment-comment-actions-col .chat-room-action-form {
    margin: 0;
}

.chat-recruitment-comment-actions {
    margin: 10px 0 0;
}

.chat-recruitment-comment-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.chat-recruitment-comment-actions-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-recruitment-comment-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-room-action-form {
    display: inline;
}

.btn-chat-kick,
.btn-chat-close,
.btn-chat-leave {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.9em;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #8b7355;
}

.btn-chat-kick,
.btn-chat-close {
    background: #5c5248;
    color: #f5f0e8;
}

.btn-chat-kick:hover,
.btn-chat-close:hover {
    background: #6d6256;
    color: #fff;
}

a.btn-chat-leave {
    text-decoration: none;
}

.btn-chat-leave {
    background: #4a3028;
    color: #e8b8a8;
    border-color: #6b5048;
}

.btn-chat-leave:hover {
    background: #5a3830;
    color: #fff;
}

/* ルームオーナーがルームを閉じたときのゲスト向けポップアップ */
.ordeal-room-closed-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.ordeal-room-closed-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}
.ordeal-room-closed-dialog-box {
    position: relative;
    max-width: 400px;
    width: 100%;
    padding: 24px;
    background: #2a2520;
    border: 2px solid #8b7355;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.ordeal-room-closed-dialog-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: #f5f0e8;
}
.ordeal-room-closed-dialog-message {
    margin: 0 0 20px;
    color: #e8e0d5;
    line-height: 1.5;
}
.ordeal-room-closed-dialog-actions {
    margin: 0;
}
.ordeal-room-closed-dialog-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.ordeal-room-closed-dialog-btn:hover {
    background: #6d6256;
    color: #fff;
}

.chat-room-char-info-wrap {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 16px;
    margin: 4px 0 0;
}

.chat-char-info-card {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
}

.chat-char-info-line {
    margin: 0 0 2px;
    font-size: 0.85em;
    line-height: 1.35;
}

.chat-char-info-line:last-child {
    margin-bottom: 0;
}

.chat-char-info-name,
.chat-char-info-gender {
    font-weight: bold;
}

.chat-char-info-gender.chat-char-info-gender-male {
    color: #2c5282;
}

.chat-char-info-gender.chat-char-info-gender-female {
    color: #c53030;
}

.chat-char-info-gender.chat-char-info-gender-other {
    color: #805ad5;
}

.chat-char-info-setting-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 2px 0 0;
}

.chat-char-info-setting-label {
    flex-shrink: 0;
    font-size: 0.85em;
    line-height: 1.35;
}

.chat-char-info-setting-box {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.85em;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 3.6em;
    overflow-y: auto;
    background: #ffffff;
    color: #1a1410;
    border: 1px solid #5c5248;
    border-radius: 4px;
}

.chat-spectate-notice {
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    color: #c9b896;
    font-size: 0.95em;
}

/* ========================================
   ログイン・新規登録（サービスページ同系デザイン）
   ======================================== */
.ordeal-auth-wrap {
    background: #2a2520;
    color: #f5f0e8;
    padding: 24px 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

.ordeal-auth-inner {
    max-width: 600px;
    margin: 0 auto;
}

.ordeal-auth-lead {
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    margin: 0 0 24px;
    padding: 16px 20px;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    color: #f5f0e8;
}

.ordeal-auth-card {
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
}

.ordeal-auth-title {
    margin: 0 0 20px;
    font-size: 1.35rem;
    color: #f5f0e8;
    border-bottom: 1px solid #5c5248;
    padding-bottom: 12px;
}

/* ログインフォーム（wp_login_form 出力） */
.ordeal-auth-wrap #ordeal-login-form p {
    margin-bottom: 16px;
}

.ordeal-auth-wrap #ordeal-login-form label {
    display: block;
    margin-bottom: 6px;
    color: #e8e0d5;
    font-size: 0.95em;
}

.ordeal-auth-wrap #ordeal-login-form input[type="text"],
.ordeal-auth-wrap #ordeal-login-form input[type="password"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
    font-size: 1em;
}

.ordeal-auth-wrap #ordeal-login-form input:focus {
    border-color: #8b7355;
    outline: none;
}

.ordeal-auth-wrap #ordeal-login-form input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.ordeal-auth-wrap #ordeal-login-form .button,
.ordeal-auth-wrap #ordeal-login-form input[type="submit"] {
    display: inline-block;
    padding: 10px 24px;
    margin-top: 8px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ordeal-auth-wrap #ordeal-login-form .button:hover,
.ordeal-auth-wrap #ordeal-login-form input[type="submit"]:hover {
    background: #6d6256;
    color: #fff;
}

/* 新規登録フォーム */
.ordeal-auth-form .ordeal-auth-field {
    margin-bottom: 16px;
}

.ordeal-auth-form .ordeal-auth-field label {
    display: block;
    margin-bottom: 6px;
    color: #e8e0d5;
    font-size: 0.95em;
}

.ordeal-auth-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    background: #1f1b18;
    color: #f5f0e8;
    border: 1px solid #5c5248;
    border-radius: 4px;
    font-size: 1em;
}

.ordeal-auth-input:focus {
    border-color: #8b7355;
    outline: none;
}

/* プレミアム登録ページ：返金不可の注記 */
.ordeal-premium-no-refund-notice {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(139, 101, 64, 0.12);
    border: 1px solid #8b7355;
    border-left-width: 3px;
    border-left-color: #a08050;
    border-radius: 4px;
    font-size: 0.9em;
    line-height: 1.5;
}
.ordeal-premium-no-refund-notice-text {
    margin: 0;
    color: #6a5248;
}

.ordeal-premium-pay-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ordeal-premium-ltc-about-link {
    margin: 0;
    font-size: 0.9em;
}

/* LTCガイドページ：/about と同じ幅（ガイドドキュメント用） */
.ordeal-ltc-guide-page .ordeal-auth-inner {
    max-width: 960px;
}

/* LTCガイドページ：区切り線・注記・番号リスト */
.ordeal-ltc-guide-page .ordeal-ltc-guide-divider {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid #5c5248;
}
.ordeal-ltc-guide-page .ordeal-ltc-guide-subdivider {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid rgba(92, 82, 72, 0.5);
}
.ordeal-ltc-guide-page .ordeal-ltc-guide-note {
    margin: 0.75rem 0 0;
    font-size: 0.9em;
    line-height: 1.5;
    color: #6a5248;
}
.ordeal-ltc-guide-page .ordeal-ltc-guide-label {
    margin: 0.5rem 0 0.25rem;
    font-size: 0.95em;
    font-weight: 600;
    color: #8b7355;
}
.ordeal-ltc-guide-page .ordeal-ltc-guide-h4 {
    margin: 1rem 0 0.35rem;
    font-size: 0.95em;
    font-weight: 600;
    color: #8b7355;
}
.ordeal-ltc-guide-page .ordeal-auth-list.ordeal-ltc-guide-list-decimal {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

.ordeal-auth-submit {
    margin-top: 20px;
    margin-bottom: 0;
}

.ordeal-auth-btn-primary {
    display: inline-block;
    padding: 10px 24px;
    background: #5c5248;
    color: #f5f0e8;
    border: 1px solid #8b7355;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ordeal-auth-btn-primary:hover {
    background: #6d6256;
    color: #fff;
}

.ordeal-auth-btn-primary:disabled,
.ordeal-auth-btn-primary.is-disabled {
    background: #2a2520;
    color: #6a6056;
    border-color: #4a4038;
    cursor: not-allowed;
    opacity: 0.7;
}

.ordeal-auth-btn-primary:disabled:hover,
.ordeal-auth-btn-primary.is-disabled:hover {
    background: #2a2520;
    color: #6a6056;
    opacity: 0.7;
}

.ordeal-tos-section {
    margin-bottom: 20px;
}

.ordeal-tos-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 8px;
}

.ordeal-tos-box {
    max-height: 200px;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 12px 14px;
    margin: 0 0 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #5c5248;
    border-radius: 6px;
    font-size: 0.9em;
    line-height: 1.5;
}

.ordeal-tos-box h3 {
    font-size: 0.95em;
    margin: 12px 0 6px;
}

.ordeal-tos-box h3:first-of-type {
    margin-top: 0;
}

.ordeal-tos-box ul {
    margin: 4px 0 8px 1.2em;
    padding: 0;
}

.ordeal-tos-box p {
    margin: 4px 0 8px;
}

.ordeal-tos-box a {
    color: #c9b896;
    text-decoration: underline;
}

.ordeal-tos-box a:hover {
    color: #e0d0b0;
}

.ordeal-auth-consent {
    margin: 0 0 16px;
}

.ordeal-auth-consent .ordeal-auth-field {
    margin-bottom: 8px;
}

.ordeal-auth-consent .ordeal-auth-field:last-child {
    margin-bottom: 0;
}

.ordeal-auth-consent input[type="checkbox"] {
    margin-right: 6px;
}

.ordeal-welcome-btn-login {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1em;
    color: #f5f0e8;
    background: #5c5248;
    border: 1px solid #8b7355;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ordeal-welcome-btn-login:hover {
    background: #6d6256;
    color: #fff;
}

.ordeal-welcome-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
}

.ordeal-welcome-btn-register {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1em;
    color: #f5f0e8;
    background: transparent;
    border: 1px solid #8b7355;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.ordeal-welcome-btn-register:hover {
    background: rgba(139, 115, 85, 0.35);
    color: #fff;
}

.ordeal-auth-description {
    margin: 0 0 16px;
    font-size: 0.95em;
    color: #a89888;
}

.ordeal-auth-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #3a2520;
    border: 1px solid #8b4040;
    border-radius: 6px;
    color: #e8b8a8;
    font-size: 0.95em;
}

.ordeal-auth-success {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #2a3530;
    border: 1px solid #4a6b58;
    border-radius: 6px;
    color: #b8d8c8;
    font-size: 0.95em;
}

.ordeal-auth-notice {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #1e2a3a;
    border: 1px solid #3a5a7a;
    border-radius: 6px;
    color: #a8c8e8;
    font-size: 0.95em;
    line-height: 1.7;
}

.ordeal-auth-notice p {
    margin: 0 0 6px;
}

.ordeal-auth-notice p:last-child {
    margin-bottom: 0;
}

.ordeal-account-info-card .ordeal-account-field {
    margin: 0 0 12px;
}

.ordeal-account-info-card .ordeal-account-field:last-of-type {
    margin-bottom: 0;
}

.ordeal-account-premium-note {
    margin: -6px 0 8px 0;
    font-size: 0.85em;
    color: #e88080;
}

.ordeal-account-premium-renew-wrap {
    margin: 8px 0 0;
    text-align: right;
}
.ordeal-account-premium-renew-wrap .ordeal-auth-btn-primary {
    background: #e87800;
    border-color: #d86a00;
    color: #fff;
    text-decoration: none;
}
.ordeal-account-premium-renew-wrap .ordeal-auth-btn-primary:hover {
    background: #f08810;
    color: #fff;
    text-decoration: none;
}
.ordeal-account-premium-renew-note {
    margin: 6px 0 0;
    font-size: 0.85em;
    color: #c44;
    text-align: right;
}

.ordeal-account-email-card {
    margin-top: 20px;
}

.ordeal-account-password-card {
    margin-top: 20px;
}

.ordeal-account-password-label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.ordeal-auth-sublabel {
    font-size: 0.9em;
    color: #a89888;
    font-weight: normal;
}

.ordeal-account-forgot-password {
    margin: 12px 0 0;
    font-size: 0.95em;
}

.ordeal-account-label,
.ordeal-account-value {
    font-size: 0.95em;
}

.ordeal-account-email-current {
    word-break: break-all;
}

.ordeal-account-email-label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.ordeal-account-logout {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #5c5248;
}

.ordeal-auth-links {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #5c5248;
    font-size: 0.95em;
}

.ordeal-auth-link {
    color: #c9b896;
    text-decoration: underline;
}

.ordeal-auth-link:hover {
    color: #f5f0e8;
}

.ordeal-auth-link-note {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #a89888;
}

.ordeal-auth-sub.ordeal-auth-card {
    text-align: center;
}

.ordeal-auth-register-text {
    margin: 0 0 12px;
    color: #e8e0d5;
    font-size: 0.95em;
}

.ordeal-auth-btn-secondary {
    display: inline-block;
    padding: 10px 24px;
    background: transparent;
    color: #c9b896;
    border: 1px solid #5c5248;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1em;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ordeal-auth-btn-secondary:hover {
    background: #5c5248;
    color: #f5f0e8;
    border-color: #8b7355;
}

/* ========================================
   明るいトーン（ライトテーマ）
   ======================================== */
body.ordeal-theme-light {
    background: #f5f0e8;
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-site-header {
    background: #e8e0d5;
    border-bottom-color: #c9b896;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.ordeal-theme-light .ordeal-custom-header-brand {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-custom-header-brand:hover,
body.ordeal-theme-light .ordeal-custom-header-brand:focus {
    color: #1f1b18;
}

body.ordeal-theme-light .ordeal-custom-header-welcome {
    color: #5c5248;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-custom-header-welcome:hover,
body.ordeal-theme-light .ordeal-custom-header-welcome:focus {
    color: #2a2520;
    background: rgba(201, 184, 150, 0.3);
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-custom-header-about {
    background: rgba(42, 37, 32, 0.12);
    color: #2a2520;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-custom-header-about:hover,
body.ordeal-theme-light .ordeal-custom-header-about:focus {
    background: rgba(42, 37, 32, 0.2);
    color: #1f1b18;
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-custom-header-mypage-btn {
    color: #5c5248;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-custom-header-mypage-btn:hover,
body.ordeal-theme-light .ordeal-custom-header-mypage-btn:focus {
    color: #2a2520;
    background: rgba(201, 184, 150, 0.3);
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-custom-header-logout {
    color: #5c5248;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-custom-header-logout:hover,
body.ordeal-theme-light .ordeal-custom-header-logout:focus {
    color: #2a2520;
    background: rgba(201, 184, 150, 0.3);
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-custom-header-chat-back {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-custom-header-chat-back:hover,
body.ordeal-theme-light .ordeal-custom-header-chat-back:focus {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-custom-header-admin {
    color: #5c4510;
    background: rgba(201, 164, 80, 0.25);
    border-color: #a08020;
}

body.ordeal-theme-light .ordeal-custom-header-admin:hover,
body.ordeal-theme-light .ordeal-custom-header-admin:focus {
    color: #3d2e08;
    background: rgba(201, 164, 80, 0.4);
    border-color: #8b6914;
}

body.ordeal-theme-light .ordeal-custom-header-theme a {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-custom-header-login {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-custom-header-username {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-custom-header-username:hover,
body.ordeal-theme-light .ordeal-custom-header-username:focus {
    color: #1f1b18;
}

body.ordeal-theme-light .ordeal-nav-item a {
    color: #3d3530;
}

body.ordeal-theme-light .ordeal-nav-item a:hover,
body.ordeal-theme-light .ordeal-nav-item a:focus {
    background: #ddd5c8;
    color: #1f1b18;
}

body.ordeal-theme-light .index-inner,
body.ordeal-theme-light #primary.index-wrap {
    background: #f5f0e8 !important;
    color: #2a2520 !important;
}

body.ordeal-theme-light .match-recruitment-list {
    background: #f5f0e8;
    color: #2a2520;
}

body.ordeal-theme-light .match-recruitment-item {
    background: #fff;
    border-color: #c9b896;
}

body.ordeal-theme-light .match-recruitment-item.match-recruitment-item-started {
    background: #fce8ec;
    border-color: #e8c4cc;
}

body.ordeal-theme-light .match-recruitment-item .match-recruitment-char,
body.ordeal-theme-light .match-recruitment-item .match-recruitment-comment {
    color: #2a2520;
}

body.ordeal-theme-light .match-recruitment-item .match-recruitment-attr,
body.ordeal-theme-light .match-recruitment-item .match-recruitment-char-meta-right,
body.ordeal-theme-light .match-recruitment-item .match-recruitment-condition {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-custom-header-imagechat {
    background: linear-gradient(135deg, #ffe5b3, #ffc27d);
    color: #3a2414;
}

body.ordeal-theme-light .ordeal-custom-header-imagechat:hover,
body.ordeal-theme-light .ordeal-custom-header-imagechat:focus {
    background: linear-gradient(135deg, #ffeccc, #ffd08f);
}

body.ordeal-theme-light .match-recruitment-item .match-recruitment-gender-val.match-recruitment-gender-male {
    color: #2563eb;
}

body.ordeal-theme-light .match-recruitment-item .match-recruitment-gender-val.match-recruitment-gender-female {
    color: #b91c1c;
}

body.ordeal-theme-light .match-recruitment-item .match-recruitment-actions {
    border-top-color: #ddd5c8;
}

body.ordeal-theme-light .match-recruitment-item .btn-chat-link,
body.ordeal-theme-light .match-recruitment-item .btn-recruitment-edit,
body.ordeal-theme-light .match-recruitment-item .btn-chat-spectate {
    background: #c9b896;
    color: #1f1b18;
    border-color: #8b7355;
}

body.ordeal-theme-light .match-recruitment-item .btn-chat-link:hover,
body.ordeal-theme-light .match-recruitment-item .btn-recruitment-edit:hover,
body.ordeal-theme-light .match-recruitment-item .btn-chat-spectate:hover {
    background: #8b7355;
    color: #fff;
}

body.ordeal-theme-light .match-recruitment-item .btn-recruitment-cancel {
    color: #8b7355;
    border-color: #c9b896;
}

body.ordeal-theme-light .match-recruitment-item .btn-recruitment-cancel:hover {
    background: rgba(201, 184, 150, 0.2);
    color: #5c5248;
    border-color: #8b7355;
}

body.ordeal-theme-light .match-recruitment-empty {
    background: #fff;
    border-color: #c9b896;
    color: #5c5248;
}

body.ordeal-theme-light .match-recruitment-filters {
    background: #fff !important;
    border-color: #c9b896 !important;
    color: #2a2520;
}

body.ordeal-theme-light .match-recruitment-filters label,
body.ordeal-theme-light .recruitment-filter-form select {
    color: #2a2520;
}

body.ordeal-theme-light .match-recruitment-filters select {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .btn-filter-apply {
    background: #c9b896 !important;
    color: #1f1b18 !important;
    border-color: #8b7355 !important;
}

body.ordeal-theme-light .btn-filter-apply:hover {
    background: #8b7355 !important;
    color: #fff !important;
}

body.ordeal-theme-light .ordeal-send-mode-form select {
    background: #fff;
    color: #2a2520;
    border-color: #c9b896;
}

body.ordeal-theme-light .chat-bubble-name {
    color: #5c5248;
}

body.ordeal-theme-light .chat-bubble-time {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-site-footer {
    border-top-color: #c9b896;
    background: #e8e0d5;
    color: #5c5248;
}

body.ordeal-theme-light .match-recruitment-edit-form {
    background: #fff !important;
    border-color: #c9b896 !important;
    color: #2a2520;
}

body.ordeal-theme-light .match-recruitment-edit-form h2,
body.ordeal-theme-light .match-recruitment-edit-form label {
    color: #2a2520;
}

body.ordeal-theme-light .btn-chat-kick,
body.ordeal-theme-light .btn-chat-close {
    background: #c9b896;
    color: #1f1b18;
    border-color: #8b7355;
}

body.ordeal-theme-light .btn-chat-kick:hover,
body.ordeal-theme-light .btn-chat-close:hover {
    background: #8b7355;
    color: #fff;
}

body.ordeal-theme-light .btn-chat-leave {
    background: #e8d5d0;
    color: #8b4040;
    border-color: #c9b896;
}

body.ordeal-theme-light .btn-chat-leave:hover {
    background: #d8c0b8;
    color: #2a2520;
}

body.ordeal-theme-light .chat-room-enter-form {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .chat-room-enter-form p,
body.ordeal-theme-light .chat-room-enter-form strong {
    color: #2a2520;
}

body.ordeal-theme-light .chat-room-enter-form select {
    background: #fff;
    color: #2a2520;
    border-color: #c9b896;
}

body.ordeal-theme-light #primary.mypage-wrap {
    background: #f5f0e8 !important;
    color: #2a2520 !important;
}

/* マイページ（ライト）：共有クラス ordeal-chat-admin-* の色を明るいテーマ用に戻す */
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-title {
    color: #2a2520;
}
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-section-desc {
    color: #5c5248;
}
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-section-label {
    color: #2a2520;
}
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-back {
    color: #5c5248;
}
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-back:hover,
body.ordeal-theme-light .mypage-wrap .ordeal-chat-admin-back:focus {
    color: #2a2520;
}

/* マイページ（ライト）：リンクを背景と明確に区別できる色に */
body.ordeal-theme-light .mypage-wrap a {
    color: #5c5248;
    text-decoration: underline;
    text-underline-offset: 2px;
}
body.ordeal-theme-light .mypage-wrap .btn-character-edit {
    text-decoration: none;
}
body.ordeal-theme-light .mypage-wrap .btn-character-update.mypage-btn-char-create-disabled,
body.ordeal-theme-light .mypage-wrap .btn-character-update:disabled {
    background: #d4ccc0;
    color: #8a8078;
    border-color: #b8b0a8;
}
body.ordeal-theme-light .mypage-wrap a:hover,
body.ordeal-theme-light .mypage-wrap a:focus {
    color: #2a2520;
}

/* ライト表示時の上限お知らせ：ピンクで他説明文と区別 */
body.ordeal-theme-light .mypage-char-limit-notice {
    color: #a84858;
}
body.ordeal-theme-light .mypage-char-limit-notice a {
    color: #905060;
}
body.ordeal-theme-light .mypage-char-limit-notice a:hover,
body.ordeal-theme-light .mypage-char-limit-notice a:focus {
    color: #6d3848;
}

body.ordeal-theme-light .mypage-lead {
    background: #e8e0d5;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-welcome-msg {
    background: #e8e0d5;
    border-color: #8b7355;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-wrap input[type="text"],
body.ordeal-theme-light .mypage-wrap select,
body.ordeal-theme-light .mypage-wrap textarea {
    background: #fff;
    color: #2a2520;
    border-color: #c9b896;
}

/* 明るい表示：ダーク枠内のラベル・文字をはっきり */
body.ordeal-theme-light .ordeal-card-dark {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}

/* マイページ：「ルームのテーマ」は枠なしのまま */
body.ordeal-theme-light .mypage-wrap .mypage-edit-character-theme-only.ordeal-card-dark {
    background: transparent;
    border: none;
    color: inherit;
}

body.ordeal-theme-light .mypage-edit-character,
body.ordeal-theme-light .mypage-wrap .mypage-edit-character {
    background: #fff !important;
    border: 1px solid #c9b896 !important;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-edit-character-theme {
    border-top-color: #c9b896;
}

body.ordeal-theme-light .mypage-edit-character-title,
body.ordeal-theme-light .mypage-edit-character .mypage-label,
body.ordeal-theme-light .mypage-wrap .mypage-label,
body.ordeal-theme-light .mypage-section-title {
    color: #2a2520;
}

body.ordeal-theme-light .mypage-character-item {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-character-header,
body.ordeal-theme-light .mypage-character-name,
body.ordeal-theme-light .mypage-character-header-one-line .mypage-character-label,
body.ordeal-theme-light .mypage-character-header-one-line .mypage-character-age-value {
    color: #2a2520;
}

body.ordeal-theme-light .mypage-character-bio {
    color: #4a4038;
}

body.ordeal-theme-light .mypage-character-header-one-line .mypage-gender-female {
    color: #d83434;
}

body.ordeal-theme-light .mypage-character-header-one-line .mypage-gender-male {
    color: #1f66c2;
}

body.ordeal-theme-light .mypage-character-header-one-line .mypage-gender-other {
    color: #228b22;
}

body.ordeal-theme-light .mypage-character-header .btn-character-edit {
    background: #5c5248;
    color: #f5f0e8;
    border-color: #4a4038;
}

body.ordeal-theme-light .mypage-character-header .btn-character-edit:hover {
    background: #4a4038;
    color: #fff;
    border-color: #3d3530;
}

body.ordeal-theme-light .mypage-character-header .btn-character-delete {
    background: #e8e0d5;
    color: #4a4038;
    border-color: #c9b896;
}

body.ordeal-theme-light .mypage-edit-character-buttons .btn-character-delete {
    background: #b04040;
    color: #fff;
    border-color: #8b3030;
}
body.ordeal-theme-light .mypage-edit-character-buttons .btn-character-delete:hover {
    background: #c05050;
    color: #fff;
}
body.ordeal-theme-light .mypage-character-header .btn-character-delete:hover {
    background: #d4ccc0;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-character-item [class*="match-recruitment"] {
    color: #2a2520;
}

body.ordeal-theme-light .mypage-recruitment-comments-box {
    background: rgba(232, 224, 213, 0.5);
    border-color: #c9b896;
}

body.ordeal-theme-light .mypage-recruitment-comment-item {
    background: #fff;
    border-color: #c9b896;
}

body.ordeal-theme-light .mypage-comment-delete-btn {
    background: #e8e0d5;
    color: #4a4038;
    border-color: #c9b896;
}

body.ordeal-theme-light .mypage-comment-delete-btn:hover {
    background: #d4ccc0;
    color: #2a2520;
}

body.ordeal-theme-light .mypage-recruitment-form {
    border-top-color: #c9b896;
}

body.ordeal-theme-light .mypage-recruitment-form-label {
    color: #2a2520;
}

body.ordeal-theme-light .mypage-new-character-section .mypage-section-title {
    color: #2a2520;
}

body.ordeal-theme-light .mypage-recruitment-disabled,
body.ordeal-theme-light .mypage-recruitment-note {
    color: #5c5248;
}

body.ordeal-theme-light .chat-room-wrap {
    background: #f5f0e8 !important;
    color: #2a2520;
}

body.ordeal-theme-light .chat-room-layout .chat-area-input {
    background: #f5f0e8;
    border-top-color: #c9b896;
}
body.ordeal-theme-light .chat-room-layout .chat-area-sendbar {
    background: #f5f0e8;
}
body.ordeal-theme-light .chat-input-wrap .btn-chat-mic {
    background: #c9b896;
    color: #3d3530;
    border-color: #a89888;
}
body.ordeal-theme-light .chat-input-wrap .btn-chat-mic:hover:not(:disabled) {
    background: #b8a888;
}
body.ordeal-theme-light .chat-input-wrap .btn-chat-mic.listening {
    background: #a0522d;
    color: #f5f0e8;
    border-color: #8b4513;
}
body.ordeal-theme-light .chat-input-wrap.voice-input-active textarea {
    background: #ffd8d8;
    border-color: #c95858;
    color: #2a2020;
}
body.ordeal-theme-light #ordeal-chat-input-wrap.message-type-dialogue textarea {
    background: #fff;
    border-color: #c9b896;
    color: #2a2520;
}
body.ordeal-theme-light #ordeal-chat-input-wrap.message-type-narration textarea {
    background: #d8e8dc;
    border-color: #6b9b7a;
    color: #2a2520;
}
body.ordeal-theme-light #ordeal-chat-input-wrap.voice-input-active textarea {
    background: #ffd8d8 !important;
    border-color: #c95858 !important;
    color: #2a2020 !important;
}
body.ordeal-theme-light #ordeal-chat-input-wrap.message-type-narration .chat-content-tab,
body.ordeal-theme-light #ordeal-chat-input-wrap.message-type-narration .chat-content-tab.active,
body.ordeal-theme-light #chat-area-sendbar.message-type-narration .chat-content-tab,
body.ordeal-theme-light #chat-area-sendbar.message-type-narration .chat-content-tab.active {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: #b8a898 !important;
}

body.ordeal-theme-light .chat-content-tab.active {
    background: rgba(220, 180, 190, 0.6);
}
body.ordeal-theme-light .chat-message-type-segment-narration:has(input:checked) {
    background: rgba(220, 180, 190, 0.6);
}

body.ordeal-theme-light .chat-recruitment-comment {
    background: #e8e0d5;
    border-color: #c9b896;
    color: #3d3530;
}
body.ordeal-theme-light .chat-recruitment-comment-label {
    color: #5c5248;
}

body.ordeal-theme-light .chat-char-info-card {
    background: #e8e0d5;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .chat-char-info-card .chat-char-info-line,
body.ordeal-theme-light .chat-char-info-card .chat-char-info-name {
    color: #2a2520;
}

body.ordeal-theme-light .chat-char-info-setting-label {
    color: #4a4038;
}

body.ordeal-theme-light .chat-char-info-setting-box {
    background: rgba(255, 255, 255, 0.85);
    border-color: #c9b896;
    color: #2a2520;
}

/* 明るい表示時のキャラ性別ラベル：背景に合わせたコントラスト */
body.ordeal-theme-light .chat-char-info-gender.chat-char-info-gender-male {
    color: #1e4a6e;
}
body.ordeal-theme-light .chat-char-info-gender.chat-char-info-gender-female {
    color: #9b2c2c;
}
body.ordeal-theme-light .chat-char-info-gender.chat-char-info-gender-other {
    color: #553c9a;
}


body.ordeal-theme-light .ordeal-auth-wrap {
    background: #f5f0e8;
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-auth-lead {
    background: #e8e0d5;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-auth-card {
    background: #fff;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-auth-title {
    color: #2a2520;
    border-bottom-color: #c9b896;
}

body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form label,
body.ordeal-theme-light .ordeal-auth-form .ordeal-auth-field label {
    color: #3d3530;
}

body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form input[type="text"],
body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form input[type="password"],
body.ordeal-theme-light .ordeal-auth-input {
    background: #fff;
    color: #2a2520;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form input:focus,
body.ordeal-theme-light .ordeal-auth-input:focus {
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form .button:hover,
body.ordeal-theme-light .ordeal-auth-wrap #ordeal-login-form input[type="submit"]:hover,
body.ordeal-theme-light .ordeal-auth-btn-primary:hover {
    background: #8b7355;
    color: #fff;
}

body.ordeal-theme-light .ordeal-auth-btn-primary:disabled,
body.ordeal-theme-light .ordeal-auth-btn-primary.is-disabled {
    background: #d8d0c8;
    color: #8a8076;
    border-color: #b9a996;
    opacity: 0.8;
}

body.ordeal-theme-light .ordeal-auth-btn-primary:disabled:hover,
body.ordeal-theme-light .ordeal-auth-btn-primary.is-disabled:hover {
    background: #d8d0c8;
    color: #8a8076;
    opacity: 0.8;
}

body.ordeal-theme-light .ordeal-tos-box {
    background: #f5f0e8;
    border-color: #c9b896;
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-tos-box a {
    color: #6d5a3c;
}

body.ordeal-theme-light .ordeal-tos-box a:hover {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-tos-title {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-welcome-btn-login {
    background: #c9b896;
    color: #2a2520;
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-welcome-btn-login:hover {
    background: #8b7355;
    color: #fff;
}

body.ordeal-theme-light .ordeal-welcome-btn-register {
    color: #2a2520;
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-welcome-btn-register:hover {
    background: rgba(139, 115, 85, 0.25);
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-auth-error {
    background: #f8e8e8;
    border-color: #b85c5c;
    color: #8b4040;
}

body.ordeal-theme-light .ordeal-auth-notice {
    background: #e8f0f8;
    border-color: #5a8ab8;
    color: #2a5880;
}

body.ordeal-theme-light .ordeal-premium-no-refund-notice {
    background: rgba(201, 184, 150, 0.25);
    border-color: #c9b896;
    border-left-color: #8b7355;
}
body.ordeal-theme-light .ordeal-premium-no-refund-notice-text {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-ltc-guide-page .ordeal-ltc-guide-divider {
    border-top-color: #c9b896;
}
body.ordeal-theme-light .ordeal-ltc-guide-page .ordeal-ltc-guide-subdivider {
    border-top-color: rgba(139, 115, 85, 0.4);
}
body.ordeal-theme-light .ordeal-ltc-guide-page .ordeal-ltc-guide-note {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-ltc-guide-page .ordeal-ltc-guide-label,
body.ordeal-theme-light .ordeal-ltc-guide-page .ordeal-ltc-guide-h4 {
    color: #7d6b4a;
}

body.ordeal-theme-light .ordeal-auth-links {
    border-top-color: #c9b896;
}

body.ordeal-theme-light .ordeal-auth-link {
    color: #6d6256;
}

body.ordeal-theme-light .ordeal-auth-link:hover {
    color: #2a2520;
}

body.ordeal-theme-light .ordeal-auth-link-note {
    color: #5c5248;
}

body.ordeal-theme-light .ordeal-auth-register-text {
    color: #3d3530;
}

body.ordeal-theme-light .ordeal-auth-btn-secondary {
    color: #6d6256;
    border-color: #c9b896;
}

body.ordeal-theme-light .ordeal-auth-btn-secondary:hover {
    background: #c9b896;
    color: #2a2520;
    border-color: #8b7355;
}

body.ordeal-theme-light .ordeal-account-page .ordeal-account-logout .ordeal-auth-btn-secondary {
    background: #e2d9cc;
    color: #3d3530;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-logout .ordeal-auth-btn-secondary:hover {
    background: #d4c8b8;
    color: #2a2520;
    border-color: #8b7355;
}

/* アカウントページ：ライトテーマ・明るい画面で文字が読めるように */
body.ordeal-theme-light .ordeal-account-page .ordeal-auth-card,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-value,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-delete-description,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-receive-mail-field label {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-page-title,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-label,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-email-label,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-password-label,
body.ordeal-theme-light .ordeal-account-page .ordeal-auth-sublabel,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-receive-mail-heading,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-delete-heading {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-auth-input {
    color: #2a2520;
    background: #fff;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-auth-input:focus {
    border-color: #8b7355;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-receive-mail-heading,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-delete-heading {
    border-bottom-color: #c9b896;
}
/* アカウントページ・二段階認証ブロック：明るい表示で文字を読みやすく */
body.ordeal-theme-light .ordeal-account-page .ordeal-account-2fa-heading,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-2fa-status,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-2fa-setup-desc,
body.ordeal-theme-light .ordeal-account-page .ordeal-account-2fa-secret {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-2fa-secret-code {
    color: #1f1b18;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid #c9b896;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-2fa-qr-img {
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-premium-renew-note {
    color: #b33;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-premium-renew-wrap .ordeal-auth-btn-primary {
    background: #e87800;
    color: #fff;
    border-color: #d86a00;
    text-decoration: none;
}
body.ordeal-theme-light .ordeal-account-page .ordeal-account-premium-renew-wrap .ordeal-auth-btn-primary:hover {
    background: #f08810;
    color: #fff;
    text-decoration: none;
}

/* ========== 定型文フローティングウィンドウ（/chat のみ） ========== */
.btn-teikeibun {
    margin: 0 0 0 6px;
    padding: 8px 14px;
    font-size: 0.95em;
    color: #e8e0d5;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-teikeibun:hover {
    background: #4a423a;
    border-color: #7c7068;
}
.ordeal-teikeibun-float {
    position: fixed;
    z-index: 100000;
    width: 50vw;
    aspect-ratio: 4 / 3;
    min-width: 280px;
    min-height: 200px;
    max-width: 100%;
    max-height: calc(100vh - 24px);
    background: #2a2520;
    border: 1px solid #5c5248;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ordeal-teikeibun-float-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #3d3530;
    border-bottom: 1px solid #5c5248;
    cursor: move;
    flex-shrink: 0;
}
.ordeal-teikeibun-float-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #e8e0d5;
}
.ordeal-teikeibun-float-close {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 1.2em;
    line-height: 1;
    color: #c9b896;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.ordeal-teikeibun-float-close:hover {
    color: #e8e0d5;
    background: #5c5248;
}
.ordeal-teikeibun-float-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 8px 0;
    background: #2d2722;
    border-bottom: 1px solid #5c5248;
    flex-shrink: 0;
}
.ordeal-teikeibun-tab {
    margin: 0;
    padding: 6px 10px;
    font-size: 0.85em;
    color: #c9b896;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
.ordeal-teikeibun-tab:hover {
    background: #4a423a;
    color: #e8e0d5;
}
.ordeal-teikeibun-tab.active {
    background: #2a2520;
    color: #e8e0d5;
    border-bottom: 1px solid #2a2520;
    margin-bottom: -1px;
}
.ordeal-teikeibun-tab-memo {
    background: #3d4a35;
    border-color: #4a5c42;
}
.ordeal-teikeibun-tab-memo:hover {
    background: #4a5c42;
    color: #e8e0d5;
}
.ordeal-teikeibun-tab-memo.active {
    background: #2a2520;
    border-bottom-color: #2a2520;
}
.ordeal-teikeibun-tab-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8em;
}
.ordeal-teikeibun-float-body {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
}
.ordeal-teikeibun-pane {
    display: none;
    flex: 1 1 0;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}
.ordeal-teikeibun-pane.active {
    display: flex;
    min-height: 0;
}
.ordeal-teikeibun-pane-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ordeal-teikeibun-heading-label {
    font-size: 0.9em;
    font-weight: 600;
    color: #c9b896;
    white-space: nowrap;
}
.ordeal-teikeibun-heading-input {
    flex: 1 1 0;
    min-width: 0;
    max-width: 200px;
    padding: 6px 10px;
    font-size: 0.9em;
    color: #e8e0d5;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 4px;
}
.ordeal-teikeibun-heading-input:focus {
    outline: none;
    border-color: #7c7068;
}
.ordeal-teikeibun-memo {
    width: 100%;
    flex: 1 1 0;
    min-height: 120px;
    box-sizing: border-box;
    padding: 10px;
    font-size: 0.95em;
    color: #e8e0d5;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 4px;
    resize: none;
}
.ordeal-teikeibun-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}
.ordeal-teikeibun-line {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.ordeal-teikeibun-line-mask {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(26, 22, 18, 0.88);
    color: #c9b896;
    font-size: 0.85em;
    padding: 8px;
    z-index: 5;
    pointer-events: all;
    border-radius: 4px;
}
.ordeal-teikeibun-line-input {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 10px;
    font-size: 0.95em;
    color: #e8e0d5;
    background: #3d3530;
    border: 1px solid #5c5248;
    border-radius: 4px;
}
.ordeal-teikeibun-paste {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.85em;
    color: #e8e0d5;
    background: #5c5248;
    border: 1px solid #7c7068;
    border-radius: 4px;
    cursor: pointer;
}
.ordeal-teikeibun-paste:hover {
    background: #6c6258;
}
.ordeal-teikeibun-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #5c5248 50%, #5c5248 55%, transparent 55%);
}
.ordeal-teikeibun-resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, #7c7068 50%, #7c7068 55%, transparent 55%);
}

/* 定型文フローティングウィンドウ：明るい表示 */
body.ordeal-theme-light .btn-teikeibun {
    color: #2a2520;
    background: #e8e0d5;
    border-color: #c9b896;
}
body.ordeal-theme-light .btn-teikeibun:hover {
    background: #f5f0e8;
    border-color: #a89888;
}
body.ordeal-theme-light .ordeal-teikeibun-float {
    background: #f5f0e8;
    border-color: #c9b896;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
body.ordeal-theme-light .ordeal-teikeibun-float-head {
    background: #e8e0d5;
    border-bottom-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-float-title {
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-teikeibun-float-close {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-teikeibun-float-close:hover {
    color: #2a2520;
    background: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-float-tabs {
    background: #e8e0d5;
    border-bottom-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-tab {
    color: #5c5248;
    background: #d4ccc0;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-tab:hover {
    background: #c9b896;
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-teikeibun-tab.active {
    background: #f5f0e8;
    color: #2a2520;
    border-bottom-color: #f5f0e8;
}
body.ordeal-theme-light .ordeal-teikeibun-tab-memo {
    background: #c9d4b8;
    border-color: #a8b898;
}
body.ordeal-theme-light .ordeal-teikeibun-tab-memo:hover {
    background: #a8b898;
    color: #2a2520;
}
body.ordeal-theme-light .ordeal-teikeibun-tab-memo.active {
    background: #f5f0e8;
    border-bottom-color: #f5f0e8;
}
body.ordeal-theme-light .ordeal-teikeibun-pane-head .ordeal-teikeibun-heading-label {
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-teikeibun-heading-input {
    color: #2a2520;
    background: #fff;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-heading-input:focus {
    border-color: #8b7355;
}
body.ordeal-theme-light .ordeal-teikeibun-memo {
    color: #2a2520;
    background: #fff;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-memo::placeholder {
    color: #8a8078;
}
body.ordeal-theme-light .ordeal-teikeibun-line-input {
    color: #2a2520;
    background: #fff;
    border-color: #c9b896;
}
body.ordeal-theme-light .ordeal-teikeibun-paste {
    color: #2a2520;
    background: #c9b896;
    border-color: #a89888;
}
body.ordeal-theme-light .ordeal-teikeibun-paste:hover {
    background: #a89888;
}
body.ordeal-theme-light .ordeal-teikeibun-line-mask {
    background: rgba(232, 224, 213, 0.92);
    color: #5c5248;
}
body.ordeal-theme-light .ordeal-teikeibun-resize-handle {
    background: linear-gradient(135deg, transparent 50%, #c9b896 50%, #c9b896 55%, transparent 55%);
}
body.ordeal-theme-light .ordeal-teikeibun-resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, #8b7355 50%, #8b7355 55%, transparent 55%);
}
