/* Shared Community layout, widgets and remaining page adaptations.
Photo, Shipmail and navigator components are loaded separately by the masters. */
.chat-logbook-toplists a.active { font-weight: 700; text-decoration: underline; }

.chat-toplists-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.chat-toplists-filter-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--chat-border);
    border-radius: var(--chat-radius-card);
    background: var(--chat-surface);
}

.chat-logbook-toplists .list-group-item-link { padding: 6px 0; display: flex; align-items: center; gap: 8px; }
.chat-logbook-toplists .list-group-item-link img { width: 35px; height: 35px; object-fit: cover; border-radius: 4px; }
.chat-toplists-filter-card a { overflow-wrap: anywhere; }
.chat-toplists-panel { margin-top: 12px; border: 1px solid var(--chat-border); border-radius: 12px; overflow: hidden; }
.chat-toplists-panel .table { margin-bottom: 0; }
.chat-logbook-toplists .toplist .buddy a { font-weight: 600; }
.chat-logbook-toplists .ordinal { width: 40px; text-align: right; padding-right: 8px; }
.chat-logbook-toplists .user-photo { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.chat-toplists-ad { float: right; max-width: 100%; overflow-x: auto; margin: 0 0 12px 12px; }
.chat-logbook-toplists [id$="GenderLinksAndAdContainer"] { display: flow-root; }
.chat-toplists-promotion { margin-top: 16px; }
.chat-logbook-toplists .chat-toplists-my-statistics { display: flex; align-items: center; justify-content: space-between; gap: 16px; clear: both; padding: 14px 16px; margin: 16px 0 0; border: 1px solid var(--chat-border); border-radius: 10px; background: var(--chat-surface-muted); color: var(--chat-link); text-decoration: none; overflow-wrap: anywhere; }
.chat-toplists-my-statistics > span:first-child { min-width: 0; }
.chat-toplists-statistics-description { display: block; margin-top: 3px; color: var(--chat-text-muted); font-size: 13px; line-height: 1.5; }
.chat-toplists-statistics-arrow { flex: 0 0 auto; font-size: 22px; }
.chat-logbook-toplists .chat-toplists-my-statistics:hover { border-color: var(--chat-link); }
.chat-toplists-my-statistics:focus-visible { outline: 2px solid var(--chat-link); outline-offset: 3px; }
.chat-logbook-rank h2 { font-size: 1.2rem; }
.chat-rank-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.chat-rank-heading h1 { margin: 0; }
.chat-rank-icon { max-width: 74px; height: auto; }
.chat-rank-card { padding: 18px; margin-bottom: 16px; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); min-width: 0; }

.chat-rank-boost,
.chat-rank-progress { text-align: center; }

.chat-rank-card img { max-width: 100%; height: auto; }

.chat-rank-actions,
.chat-rank-level-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }

.chat-rank-level-links > div { flex: 1 1 auto; }
.chat-rank-level-links > div:last-child { text-align: right; }
.chat-rank-promotion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px; }
.chat-rank-description { overflow-wrap: anywhere; }
.chat-rank-reasons { padding-left: 24px; margin-bottom: 0; }
.chat-rank-reasons li { margin-bottom: 12px; }
.chat-rank-gauge { width: 180px; height: 180px; max-width: 100%; border-radius: 50%; margin: 18px auto 0; display: grid; place-items: center; background: conic-gradient(var(--chat-accent-focus) calc(var(--rank-progress) * 1%), var(--chat-rank-gauge-track) 0); }
.chat-rank-gauge-content { width: 148px; height: 148px; border-radius: 50%; background: var(--chat-surface); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; }
.chat-rank-gauge-content strong { font-size: 1.6rem; }
.chat-rank-barometer .userLevel { display: grid; grid-template-columns: 80px 32px minmax(0, 1fr); align-items: center; gap: 0 16px; min-height: 44px; }
.chat-rank-barometer .levelIcon { display: flex; align-items: center; justify-content: center; }
.chat-rank-barometer .levelTitle { overflow-wrap: anywhere; font-size: .9rem; padding: 10px 0; border-bottom: 1px solid var(--chat-border-row-subtle); }
.chat-rank-barometer .meterElm { display: flex; justify-content: center; align-self: stretch; position: relative; }
.chat-rank-meter-track { display: block; width: 20px; height: 100%; background: var(--chat-rank-meter-track); border-left: 1px solid var(--chat-border-rank-meter); border-right: 1px solid var(--chat-border-rank-meter); }
.rank-meter-earned .chat-rank-meter-track { background: linear-gradient(90deg, var(--chat-accent), var(--chat-rank-meter-highlight), var(--chat-accent)); }
.rank-meter-current-fill .chat-rank-meter-track { background: linear-gradient(to top, var(--chat-rank-meter-fill) 50%, var(--chat-rank-meter-track) 50%); }
.rank-meter-saved .chat-rank-meter-track { background: var(--chat-rank-meter-saved); }
.rank-meter-saved-half .chat-rank-meter-track { background: linear-gradient(to top, var(--chat-rank-meter-saved) 50%, var(--chat-rank-meter-track) 50%); }
.rank-meter-current .levelTitle { font-weight: 600; color: var(--chat-text-accent); }
.rank-meter-current .meterElm::after { content: ''; position: absolute; top: 50%; right: -5px; width: 10px; height: 10px; background: var(--chat-accent); transform: translateY(-50%) rotate(45deg); border: 2px solid var(--chat-border-on-image); }
.chat-rank-current-label { display: inline-block; margin-left: 10px; padding: 3px 8px; border-radius: 12px; background: var(--chat-surface-accent-label); font-size: .75rem; }
.chat-rank-barometer .chat-rank-meter-cap { min-height: 18px; }
.chat-rank-meter-top, .chat-rank-meter-bottom { display: block; width: 20px; height: 18px; border: 1px solid var(--chat-border-rank-meter); }
.chat-rank-meter-top { background: var(--chat-rank-meter-track); border-radius: 10px 10px 0 0; border-bottom: 0; }
.chat-rank-meter-bottom { background: var(--chat-rank-meter-fill); border-radius: 0 0 10px 10px; border-top: 0; }

@media (max-width: 575px) {
    .chat-rank-barometer .userLevel { grid-template-columns: 74px 24px minmax(0, 1fr); gap: 0 8px; }
    .chat-rank-current-label { margin-left: 0; }
}

.chat-rank-barometer .meterElm img { display: block; flex: 0 0 auto; }
.chat-badges-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 24px; }
.chat-badges-welcome > div { flex: 1 1 200px; min-width: 0; }
.chat-badges-category { margin-bottom: 24px; }
.chat-logbook-badges h2 { font-size: 1.25rem; }
.chat-badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 14px; padding: 0; margin: 16px 0; list-style: none; }
.chat-badge-card { display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100%; padding: 18px 12px; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); text-align: center; overflow-wrap: anywhere; }

.chat-badge-card:hover,
.chat-badge-card:focus-visible { background: var(--chat-surface-focus); border-color: var(--chat-accent-focus); text-decoration: none; }

.chat-badge-card img { object-fit: contain; }
.chat-badge-card small { color: var(--chat-text-secondary); }
.chat-badge-details { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 20px; }
.chat-badge-summary { flex: 1 1 180px; text-align: center; padding: 18px; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); }
.chat-badge-explanation { flex: 3 1 300px; min-width: 0; overflow-wrap: anywhere; }
.chat-badge-explanation > div { margin-bottom: 16px; }
.chat-badge-detail-image { max-width: 100%; height: auto; max-height: 160px; margin-bottom: 20px; }
.chat-badge-explanation img { max-width: 100%; height: auto; }
.chat-badge-disclaimer { color: var(--chat-text-secondary); font-size: .9rem; }

.chat-buddy-notice,
.chat-buddy-upgrade { display: block; padding: 14px; margin-bottom: 16px; background: var(--chat-surface-info); border: 1px solid var(--chat-border); border-radius: 10px; }

.chat-buddylist .nav-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chat-buddylist .nav-pills a { display: block; padding: 8px 12px; border-radius: 8px; }
.chat-buddylist .nav-pills .active a { color: var(--chat-on-accent); background: var(--chat-accent-focus); }
.chat-buddy-table { overflow-x: auto; }
.chat-buddy-table .table { margin-bottom: 0; }

.chat-buddy-table td,
.chat-buddy-table th { vertical-align: middle; }

.chat-buddy-select-all { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chat-buddy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.chat-buddy-card { padding: 16px; background: var(--chat-surface); border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); min-width: 0; }
.chat-buddy-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-buddy-card-heading h2 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.chat-buddy-card-profile { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.chat-buddy-card-profile img { border-radius: 50%; object-fit: cover; }
.chat-buddy-meta { font-size: .85rem; color: var(--chat-text-secondary); margin-top: 8px; }

.chat-buddy-card-actions,
.chat-buddy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }

.chat-logbook-settings { display: grid; gap: 16px; }
.chat-settings-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px 16px; padding: 16px; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); }
.chat-settings-icon img { width: 64px; height: 64px; object-fit: contain; }
.chat-settings-description { min-width: 0; overflow-wrap: anywhere; }
.chat-settings-description h2 { font-size: 1.2rem; margin: 0 0 8px; }
.chat-settings-description p { margin-bottom: 0; }
.chat-settings-action { grid-column: 2; }
.chat-settings-action .btn { white-space: normal; }

@media (max-width: 480px) {
    .chat-settings-card { grid-template-columns: 48px minmax(0, 1fr); padding: 12px; gap: 10px; }
    .chat-settings-icon img { width: 44px; height: 44px; }
}

.chat-profile-email h2 { font-size: 1.2rem; }
.chat-email-section { padding: 18px; margin-bottom: 16px; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); }
.chat-email-current { margin: 18px 0; overflow-wrap: anywhere; }
.chat-email-unverified { padding: 12px 0; border-top: 1px solid var(--chat-border); overflow-wrap: anywhere; }
.chat-email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.chat-email-actions .btn { white-space: normal; }
.chat-information-table-scroll { overflow-x: auto; }
.chat-information-table { width: 100%; min-width: 480px; border-collapse: collapse; }

.chat-information-table td,
.chat-information-table th { padding: 10px 8px; vertical-align: middle; border-bottom: 1px solid var(--chat-border); }

.chat-information-table td:first-child { width: 24%; }
.chat-information-table td:nth-child(2) { width: 43%; }
.chat-information-table td:last-child { width: 33%; }
.chat-information-table .form-control { width: 100%; min-width: 0; }
.chat-information-table .chat-information-small-field { width: 60px; display: inline-block; }
.chat-information-table img { max-width: 100%; height: auto; }
.chat-information-table select { max-width: 100%; }
.chat-information-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chat-information-saved { padding: 14px; margin-top: 16px; border: 1px solid var(--chat-border-success); border-radius: 10px; background: var(--chat-surface-success); color: var(--chat-text-success); }
.chat-essay-editor { min-width: 0; max-width: 100%; }
.chat-essay-editor textarea { width: 100%; min-height: 400px; resize: vertical; }
.chat-essay-editor .mce-tinymce { width: 100% !important; box-sizing: border-box; }
.chat-essay-editor .mce-container { max-width: 100%; }
.chat-essay-editor .mce-toolbar-grp { overflow-x: auto; }
.chat-essay-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0; }
.chat-essay-warning { color: var(--chat-text-warning-strong); margin-top: 18px; }
.chat-guestbook-write h2 { font-size: 1.2rem; }
.chat-guestbook-recipients { display: grid; gap: 12px; padding: 16px; margin-bottom: 20px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-soft); }
.chat-guestbook-recipients .form-control { margin-bottom: 10px; }
.chat-guestbook-write #BuddyList { max-width: 100%; overflow-x: auto; margin-bottom: 20px; }
.chat-guestbook-write #BuddyList td { padding: 8px; }
.chat-guestbook-write #MultiMessageWarning { color: var(--chat-text-warning-strong); }
.chat-inventory-treasure { object-fit: contain; margin: 0 0 14px 16px; }

.chat-inventory-category,
.chat-logbook-inventory .expired-history-category { margin-top: 22px; }

.chat-logbook-inventory h2 { font-size: 1.25rem; }
.chat-inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; list-style: none; margin: 16px 0; padding: 0; }
.chat-inventory-grid li { padding: 16px; border: 1px solid var(--chat-border); border-radius: 12px; text-align: center; overflow-wrap: anywhere; }
.chat-inventory-grid a.feature { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.chat-inventory-grid img { width: 80px; height: 80px; object-fit: contain; }
.chat-inventory-grid li > span { display: block; margin-top: 10px; font-size: .85rem; color: var(--chat-text-secondary); }
.chat-logbook-inventory .expired-history-list { list-style: none; margin: 0; padding: 12px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-soft); }
.chat-logbook-inventory .expired-history-list li { padding: 10px 0; border-bottom: 1px solid var(--chat-border); overflow-wrap: anywhere; }
.chat-logbook-inventory .expired-history-list li:last-child { border-bottom: 0; }
.chat-logbook-inventory .expired-history-list img { width: 28px; height: 28px; object-fit: contain; margin-right: 8px; }
.chat-logbook-inventory .expired-message { display: block; margin-top: 6px; color: var(--chat-text-secondary); font-size: .85rem; }
.chat-inventory-modal .modal-title { font-size: 1.25rem; }
.chat-inventory-modal #dialog-message { display: flex; flex-wrap: wrap; gap: 20px; overflow-wrap: anywhere; }
.chat-inventory-modal .dialog-info-left { flex: 1 1 180px; min-width: 0; }
.chat-inventory-modal .dialog-info-left small { display: block; margin: 10px 0; }
.chat-inventory-modal .dialog-info-right { flex: 2 1 260px; min-width: 0; }
.chat-inventory-modal .dialog-bottom { flex-basis: 100%; }
.chat-inventory-modal img { max-width: 100%; height: auto; }

/* Community Master layout for migrated Bridge pages. */
.chat-community-page .chat-site-footer,
.chat-community-page .chat-community-shell {
    width: min(1240px, calc(100% - 32px));
    max-width: 1240px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.chat-community-shell {
    display: grid;
    grid-template-columns: minmax(210px, 245px) minmax(0, 1fr) minmax(220px, 270px);
    gap: 18px;
    min-height: 650px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid var(--chat-border);
    background: var(--chat-surface-soft);
    box-shadow: var(--chat-shadow-shell);
    color: var(--chat-text);
}

.chat-community-shell.chat-community-shell-wide {
    grid-template-columns: minmax(210px, 245px) minmax(0, 1fr);
}

.chat-community-sidebar,
.chat-community-main,
.chat-community-aside {
    min-width: 0;
}

.chat-community-card,
.chat-community-legacy-widgets .panel,
.chat-community-legacy-widgets #loginbox {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--chat-border);
    border-radius: var(--chat-radius-card);
    background: var(--chat-surface);
    box-shadow: var(--chat-shadow-card);
}

.chat-community-card h1 {
    margin: 0 0 18px;
    color: var(--chat-text);
    font-size: 30px;
    font-weight: 700;
}

.chat-community-card h2,
.chat-community-legacy-widgets h3 {
    margin: 0 0 12px;
    color: var(--chat-text);
    font-size: 18px;
    font-weight: 700;
}

/* One heading style for master-page menus and legacy sidebar widgets. */
.chat-community-menu > h2,
.chat-community-legacy-widgets .panel-heading {
    margin: -18px -18px 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    min-height: 64px;
    box-sizing: border-box;
    border-radius: var(--chat-radius-card) var(--chat-radius-card) 0 0;
    background: var(--chat-surface-muted);
    color: var(--chat-text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.chat-community-legacy-widgets .panel-heading h2,
.chat-community-legacy-widgets .panel-heading h3 { margin: 0; min-width: 0; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; }

.chat-community-menu .chat-my-menu-heading { gap: 8px; }
.chat-my-menu-heading img { flex: 0 0 35px; border-radius: 50%; object-fit: cover; }
.chat-my-menu-heading span { min-width: 0; overflow-wrap: anywhere; }

.chat-community-menu a,
.chat-community-legacy-widgets ul[id="menuicon"] a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--chat-link);
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.chat-community-menu a:hover,
.chat-community-menu a:focus,
.chat-community-legacy-widgets ul[id="menuicon"] a:hover,
.chat-community-legacy-widgets ul[id="menuicon"] a:focus {
    background: var(--chat-surface-muted);
    color: var(--chat-text);
    text-decoration: none;
}

.chat-community-submenu {
    margin: 0 0 8px 16px;
    padding-left: 8px;
    border-left: 2px solid var(--chat-border);
}

.chat-community-submenu a {
    padding: 7px 10px;
    font-size: 14px;
}

.chat-community-content {
    min-height: 500px;
}

.chat-community-content form {
    margin: 0;
}

.chat-community-news-entry {
    margin: 0 0 20px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--chat-border);
    overflow-wrap: anywhere;
}

.chat-community-news-entry:last-child {
    border-bottom: 0;
}

.chat-community-news-entry h2 {
    margin-bottom: 5px;
    font-size: 23px;
}

.chat-community-news-entry small {
    display: block;
    margin-bottom: 12px;
    color: var(--chat-text-muted);
}

.chat-community-news-list-content {
    margin: 14px 0;
    overflow-x: auto;
}

.chat-community-news-list small {
    display: block;
    margin-top: 4px;
    color: var(--chat-text-muted);
}

.chat-community-news-list .table td {
    vertical-align: middle;
}

.chat-logbook-welcome .hr {
    margin: 18px 0;
    border-top: 1px solid var(--chat-border);
}

.chat-logbook-guestbook {
    position: relative;
    overflow-wrap: anywhere;
}

.chat-guestbook-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px !important;
    padding: 14px;
    border-radius: 12px;
    background: var(--chat-surface-muted);
}

.chat-guestbook-search .form-control {
    flex: 1 1 140px;
    width: auto;
}

.chat-logbook-guestbook .panel-info,
.chat-logbook-guestbook .well {
    margin-bottom: 16px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface);
    text-align: left !important;
}

.chat-logbook-guestbook .panel-heading {
    padding: 12px;
    border-bottom: 1px solid var(--chat-border);
    border-radius: 12px 12px 0 0;
    background: var(--chat-surface-muted);
}

.chat-logbook-guestbook .GuestbookMsgHeaderColumns3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.chat-logbook-guestbook .panel-default,
.chat-logbook-guestbook .well .content {
    padding: 12px;
    overflow-x: auto;
}

.chat-logbook-guestbook .corners {
    display: none;
}

.chat-guestbook-navigation td {
    padding: 3px;
}

.chat-guestbook-navigation .btn {
    width: 100% !important;
    white-space: normal;
}

.chat-guestbook-navigation .btn-default {
    border: 1px solid var(--chat-border);
    color: var(--chat-link);
    background: var(--chat-surface-muted);
}

.chat-logbook-guestbook #CensorBox {
    background: var(--chat-surface);
    box-shadow: var(--chat-shadow-card);
}

.chat-logbook-welcome .columns2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.chat-logbook-welcome .columns2 > div {
    padding: 16px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface-muted);
}

.chat-community-content .row {
    margin-top: 18px;
}

.chat-community-search .well {
    padding: 18px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface-muted);
}

.chat-community-search .corners,
.chat-community-search .breaker {
    display: none;
}

.chat-community-search .content {
    margin: 0 !important;
}

.chat-community-search table {
    width: 100%;
}

.chat-community-search td {
    padding: 7px;
    vertical-align: middle;
}

.chat-community-search .form-control {
    width: min(100%, 280px) !important;
}

.chat-community-search-results {
    border: 0;
    box-shadow: none;
}

.chat-community-results-scroll {
    margin-top: 14px;
    overflow-x: auto;
}

.chat-community-results-scroll .table {
    min-width: 620px;
    margin-top: 12px;
}

.chat-community-results-scroll .table th,
.chat-community-results-scroll .table td {
    vertical-align: middle;
}

.chat-logbook-mypage .myPageColumns3 {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) minmax(135px, 185px);
    gap: 15px;
    align-items: center;
    margin: 0 0 14px;
    padding: 17px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface-muted);
}

.chat-logbook-mypage .myPageColumns3 .col1,
.chat-logbook-mypage .myPageColumns3 .col2,
.chat-logbook-mypage .myPageColumns3 .col3 {
    min-width: 0;
}

.chat-logbook-mypage .myPageColumns3 .col2 h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.chat-logbook-mypage .myPageColumns3 .col2 p {
    margin-bottom: 4px;
}

.chat-logbook-mypage .myPageColumns3 .col3 {
    font-size: 14px;
    line-height: 1.7;
}

/* Dates sit to the right, wrapping below when a headline needs more space. */
.chat-logbook-mypage .myPageColumns3.chat-mypage-news { grid-template-columns: 64px minmax(0, 1fr); }

.chat-mypage-news-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; overflow-wrap: anywhere; }
.chat-mypage-news-item > a { display: block; flex: 1 1 220px; min-width: 0; font-weight: 600; line-height: 1.4; }
.chat-mypage-news-date { display: block; flex: 0 0 auto; max-width: 100%; margin-left: auto; text-align: right; color: var(--chat-text-muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 767px) {
    .chat-logbook-mypage .myPageColumns3.chat-mypage-news { grid-template-columns: 56px minmax(0, 1fr); }
}

.chat-logbook-mypage .myPageColumns3 .icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    background: transparent;
}

.chat-logbook-mypage .myPageColumns3 .icon img {
    object-fit: contain;
}

/* Original MyPage artwork and sprite positions from newstyle.css. */
.chat-logbook-mypage .icon > div {
    width: 50px;
    height: 50px;
    background-image: url("../csg-4de3fc3590fc6.png");
    background-repeat: no-repeat;
}

.chat-logbook-mypage .icon-news { background-position: -301px -960px; }
.chat-logbook-mypage .icon-logbook { background-position: -301px -858px; }
.chat-logbook-mypage .icon-shipmail { background-position: -352px -909px; }
.chat-logbook-mypage .icon-porthole { background-position: -301px -1062px; }
.chat-logbook-mypage .icon-rank { background-position: -352px -807px; }
.chat-logbook-mypage .icon-treasure { background-position: -352px -960px; }
.chat-logbook-mypage .icon-friends { background-position: -301px -705px; }
.chat-logbook-mypage .icon-settings { background-position: -352px -858px; }

.chat-logbook-mypage .icon-profile_cismale,
.chat-logbook-mypage .icon-profile_male { background-position: -352px -756px; }

.chat-logbook-mypage .icon-profile_cisfemale,
.chat-logbook-mypage .icon-profile_female { background-position: -352px -705px; }

.chat-logbook-mypage #client {
    grid-column: 1 / -1;
}

.chat-logbook-profile .columns1,
.chat-logbook-profile .panel {
    margin-bottom: 16px;
}

.chat-logbook-profile [id$="ProfilePictureContainer"] {
    display: inline-block;
    max-width: 100% !important;
    height: auto !important;
    min-height: 180px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--chat-surface-muted);
}

.chat-logbook-profile [id$="ProfilePictureContainer"] img {
    max-width: 100%;
    height: auto;
}

.chat-logbook-profile .panel {
    overflow-x: auto;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface);
}

.chat-logbook-profile .table {
    margin-bottom: 0;
}

.chat-logbook-profile .table th,
.chat-logbook-profile .table td {
    padding: 10px 12px;
    vertical-align: top;
}

.chat-logbook-profile .nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.chat-logbook-profile .nav-pills a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--chat-link);
}

.chat-logbook-profile .nav-pills .active a,
.chat-logbook-profile .nav-pills a:hover {
    background: var(--chat-surface-muted);
    text-decoration: none;
}

.chat-logbook-profile [id$="EssayContent"] {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Opt-in editor display for profiles and logbook posts, not the surrounding UI. */
.chat-editor-content-frame,
.chat-editor-content { width: 100%; min-width: 0; max-width: 100%; }

.chat-editor-content .editorContent { max-width: 100%; }
.chat-editor-content .editorContent img { max-width: 100% !important; height: auto !important; }

.chat-logbook-profile input[type="text"],
.chat-logbook-profile textarea {
    max-width: 100%;
}

@media (min-width: 768px) {
    .chat-logbook-mypage > .hidden-lg.hidden-md.hidden-sm {
        display: none;
    }
}

.chat-community-legacy-widgets .panel-body {
    padding: 0;
}

.chat-community-legacy-widgets ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.chat-community-legacy-widgets li {
    margin: 5px 0;
}

/* Bootstrap's .nav otherwise places the old ItemMenu entries side by side. */
.chat-community-legacy-widgets ul[id="menuicon"] {
    display: block;
}

.chat-community-legacy-widgets .chat-toplist-widget {
    width: 100%;
    max-width: none;
    padding: 0;
    flex: none;
}

.chat-community-legacy-widgets .chat-toplist-widget .panel-body {
    container-type: inline-size;
}

.chat-community-legacy-widgets .chat-toplist-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 8px;
    margin-bottom: 14px;
}

.chat-community-legacy-widgets .chat-toplist-photos .photo,
.chat-community-legacy-widgets .chat-toplist-photos .buddy {
    min-width: 0;
    margin: 0;
    float: none;
    text-align: center;
}

.chat-community-legacy-widgets .chat-toplist-photos a {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
}

.chat-community-legacy-widgets .chat-toplist-photos img {
    width: 50px;
    height: 50px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 4px;
}

@container (max-width: 205px) {
    .chat-community-legacy-widgets .chat-toplist-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.chat-community-legacy-widgets a:not(.btn) {
    color: var(--chat-link);
}

.chat-community-legacy-widgets .btn,
.chat-community-legacy-widgets button {
    max-width: 100%;
}

@media (max-width: 1100px) {
    .chat-community-shell {
        grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
    }

    .chat-community-aside {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .chat-logbook-welcome .columns2 {
        grid-template-columns: 1fr;
    }

    .chat-community-page .chat-site-footer,
    .chat-community-page .chat-community-shell {
        width: calc(100% - 16px);
    }

    .chat-community-shell {
        display: block;
        padding: 10px;
    }

    .chat-community-menu {
        margin-bottom: 10px;
    }

    .chat-community-aside {
        display: block;
    }

    .chat-logbook-mypage .myPageColumns3 {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px;
        padding: 13px;
    }

    .chat-logbook-mypage .myPageColumns3 .col3 {
        grid-column: 2;
    }

    .chat-logbook-mypage #client {
        display: none;
    }

    .chat-logbook-profile [id$="ProfilePictureContainer"] {
        min-height: 0;
    }
}

.chat-user-search h1 { margin-bottom: 1.25rem; }
.chat-search-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.chat-search-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.chat-search-field > label, .chat-search-field legend { display: block; margin-bottom: .5rem; font-size: 1rem; font-weight: 600; }
.chat-search-field small { display: block; margin-top: .4rem; color: var(--chat-text-description); }
.chat-search-age { display: flex; align-items: center; gap: .5rem; }
.chat-search-age select { min-width: 0; }
.chat-search-genders td { padding-right: .8rem; }
.chat-search-genders input { margin-right: .3rem; }
.chat-search-genders label { margin-bottom: 0; }
.chat-search-actions { margin: 1.25rem 0; }
.chat-search-status { padding: 1rem; border-radius: .6rem; background: var(--chat-surface-notice); }
.chat-search-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: .8rem; }
.chat-search-result { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem; border: 1px solid var(--chat-border-result); border-radius: .7rem; background: var(--chat-surface); overflow-wrap: anywhere; }
.chat-search-result img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.chat-search-nick { font-weight: 600; }
.chat-search-online { display: inline-block; margin-left: .3rem; color: var(--chat-text-online-muted); font-size: .8rem; }
.chat-search-pagination { width: 100%; margin-top: 1.25rem; }
.chat-search-pagination td:last-child { text-align: right; }

@media (max-width: 650px) {
    .chat-search-fields { grid-template-columns: 1fr; }
}

.chat-configuration { min-width: 0; }
.chat-configuration h2 { margin: 1rem 0; font-size: 1.4rem; }
.chat-configuration h3 { margin: 0 0 .7rem; font-size: 1rem; font-weight: 600; }
.chat-configuration-tabs ul { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; }
.chat-configuration-tabs a { display: block; padding: .55rem .8rem; border: 1px solid var(--chat-border); border-radius: .5rem; text-decoration: none; }
.chat-configuration-tabs a.active { color: var(--chat-on-accent); background: var(--chat-action-active); border-color: var(--chat-action-active); }
.chat-configuration-tabs a:hover { background: var(--chat-surface-tab-hover); color: var(--chat-text-tab-hover); }

.chat-configuration .columns1, .chat-configuration .columns2, .chat-configuration .column1, .chat-configuration .columnsl,
.chat-configuration .col1, .chat-configuration .col2, .chat-configuration .content, .chat-configuration .colorbox { float: none; width: auto; max-width: 100%; margin: 0; padding: 0; }

.chat-configuration .well { background: transparent; border: 0; margin: 0 !important; padding: 0; box-shadow: none; }
.chat-configuration .corners > span, .chat-configuration .breaker, .chat-configuration .hr { display: none; }
.chat-configuration .columns1, .chat-configuration .column1 { margin-bottom: 1rem; }
.chat-configuration-card, .chat-configuration .avatars { padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); }
.chat-configuration-input .form-control { width: 100%; max-width: 100%; }
.chat-configuration-description { margin-top: .45rem; color: var(--chat-text-description); overflow-wrap: anywhere; }
.chat-configuration-check { padding: .8rem 0; border-bottom: 1px solid var(--chat-border-setting-row); }
.chat-configuration-check:last-child { border-bottom: 0; }
.chat-configuration-check label { display: flex; gap: .5rem; align-items: baseline; margin: 0; }
.chat-configuration-check input { flex-shrink: 0; }
.chat-configuration-check .chat-configuration-description { padding-left: 1.5rem; }
.chat-configuration-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.chat-configuration .avatars { text-align: center; }
.chat-configuration .avatars img { box-sizing: content-box; padding: 7px; margin: 3px; border: 2px solid transparent; border-radius: .35rem; cursor: pointer; }
.chat-configuration .avatars img.selected { border-color: var(--chat-action-active); background: var(--chat-surface-selected); }
.chat-configuration .avatars img:focus-visible { outline: 2px solid var(--chat-action-active); outline-offset: 2px; }
.chat-configuration table { max-width: 100%; }
.chat-configuration table td { padding: .3rem; }
.chat-configuration table input[type="text"] { width: 6.5rem; max-width: 100%; padding: .35rem; border: 1px solid var(--chat-border); border-radius: .3rem; }
.chat-change-password h1 { margin-bottom: 1.25rem; }
.chat-password-fields { max-width: 460px; }
.chat-password-field { margin-bottom: 1rem; }
.chat-password-field label { display: block; margin-bottom: .45rem; font-weight: 600; }
.chat-password-error { display: block; margin-top: .4rem; color: var(--chat-text-danger); }
.chat-password-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.chat-profile-visits h1 { margin-bottom: 1.25rem; }
.chat-visits-section { padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); }
.chat-visits-section h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.chat-visits-list { display: grid; gap: .5rem; }
.chat-visit { display: flex; align-items: center; gap: .75rem; padding: .65rem; border-radius: .5rem; background: var(--chat-surface-visit); }
.chat-visit-ordinal { min-width: 1.5rem; color: var(--chat-text-description); text-align: right; }
.chat-visit-avatar { flex: 0 0 50px; }
.chat-visit-avatar img { display: block; border-radius: 50%; object-fit: cover; }
.chat-visit-details { min-width: 0; overflow-wrap: anywhere; }
.chat-visit-nick { font-weight: 600; }

/* Restore the legacy nickname colours only in member lists, not essay content. */
:is(.chat-logbook-toplists, .chat-community-legacy-widgets, .chat-profile-visits, .chat-buddylist) a.CisFemale:not(.btn), .chat-photo-gallery :is(a, span).CisFemale { color: var(--chat-nick-female); }

:is(.chat-logbook-toplists, .chat-community-legacy-widgets, .chat-profile-visits, .chat-buddylist) a.CisMale:not(.btn), .chat-photo-gallery :is(a, span).CisMale { color: var(--chat-nick-male); }
.chat-visit-date, .chat-visits-empty { color: var(--chat-text-description); font-size: .9rem; }
.chat-visits-ad { text-align: center; margin-bottom: 1rem; max-width: 100%; overflow-x: auto; }
.chat-deactivate h1 { margin-bottom: 1.25rem; }
.chat-deactivate-notice { padding: 1rem; margin-bottom: 1.25rem; background: var(--chat-surface-account-warning); border: 1px solid var(--chat-border-account-warning); border-radius: var(--chat-radius-card); overflow-wrap: anywhere; }
.chat-deactivate-fields { max-width: 460px; }
.chat-deactivate-field { margin-bottom: 1rem; }
.chat-deactivate-field label { display: block; margin-bottom: .45rem; font-weight: 600; }
.chat-deactivate-errors > span { display: block; margin-bottom: .6rem; color: var(--chat-text-danger); }
.chat-deactivate-description { margin-top: 1rem; overflow-wrap: anywhere; }
.chat-deactivate-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.chat-own-emotes h1 { margin-bottom: 1.25rem; }
.chat-emotes-info, .chat-emotes-warning { padding: 1rem; margin-bottom: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface-notice); }
.chat-emotes-warning { color: var(--chat-text-emote-warning); background: var(--chat-surface-emote-warning); }
.chat-emotes-scroll { overflow-x: auto; }
.chat-emotes-table { width: 100%; min-width: 420px; }
.chat-emotes-table td { vertical-align: middle; }
.chat-emotes-table .tagForEmoteReplaceClass { background: var(--chat-preview-console-surface); color: var(--chat-preview-console-text); overflow-wrap: anywhere; }
.chat-emotes-table .tagForEmoteReplaceClass img { vertical-align: middle; }
.chat-emote-command { font-weight: 600; }
.chat-emotes-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.chat-create-emotes h1 { margin-bottom: 1.25rem; }
.chat-create-emotes form > label, .chat-emote-field label { display: block; font-weight: 600; margin-bottom: .45rem; }
.chat-emote-field { margin-top: 1.25rem; }
.chat-emote-preview { margin-top: .5rem; padding: .8rem; min-height: 2.8rem; background: var(--chat-preview-console-surface); color: var(--chat-preview-console-text); border-radius: .5rem; overflow-wrap: anywhere; }
.chat-emote-preview img { vertical-align: middle; }
.chat-emotes-help { margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); }
.chat-emotes-help summary { cursor: pointer; font-weight: 600; }
.chat-emotes-help table { margin-top: .75rem; }
.chat-bot-training h1 { margin-bottom: 1rem; }
.chat-bot-intro { margin-bottom: 1.25rem; }
.chat-bot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.chat-bot-card, .chat-bot-panel { padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); background: var(--chat-surface); min-width: 0; overflow-wrap: anywhere; }
.chat-bot-card { display: flex; flex-direction: column; gap: .85rem; }
.chat-bot-heading { display: flex; align-items: center; gap: .8rem; }
.chat-bot-heading img, .chat-bot-editor-heading > img { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.chat-bot-heading h2, .chat-bot-panel h2 { margin: 0; font-size: 1.15rem; }
.chat-bot-description { flex: 1; }
.chat-bot-editor-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.chat-bot-editor-heading h1 { font-size: 1.5rem; }
.chat-bot-panel { margin-bottom: 1rem; }
.chat-bot-panel h2 { margin-bottom: .6rem; }
.chat-bot-panel label { display: block; margin-bottom: .65rem; }
.chat-bot-panel .form-control { width: 100%; }
.chat-bot-error { display: block; color: var(--chat-text-danger); margin-top: .4rem; }
.chat-bot-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; }
.chat-cabin-designer { min-width: 0; }
.chat-cabin-designer h2 { font-size: 1.25rem; margin: 1.25rem 0 .8rem; }
.chat-cabin-designer .columns1, .chat-cabin-designer .col1, .chat-cabin-designer .col2, .chat-cabin-designer .content { float: none; width: auto; margin: 0; padding: 0; min-width: 0; }
.chat-cabin-designer .columns2l, .chat-cabin-designer .columns2 { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 1rem; margin-bottom: 1rem; }
.chat-cabin-designer .colorbox { padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); margin-bottom: 1rem; }
.chat-cabin-designer .nav-pills { gap: .4rem; margin-bottom: 1.25rem; }
.chat-cabin-designer .nav-pills a { display: block; padding: .55rem .8rem; border: 1px solid var(--chat-border); border-radius: .5rem; }
.chat-cabin-designer .nav-pills .active a { color: var(--chat-on-accent); background: var(--chat-action-active); }
.chat-cabin-designer .nav-pills [disabled] a { pointer-events: none; opacity: .45; }
.chat-cabin-designer .form-control { max-width: 100%; width: 100%; }
.chat-cabin-designer .btn { margin: .3rem .3rem .3rem 0; }
.chat-cabin-divider { margin: 1.25rem 0; border-color: var(--chat-border-divider); }
.chat-cabin-designer #PreviewPanel > div { max-width: 440px; margin: auto; }
.chat-cabin-designer #PreviewImage { width: 100%; height: auto; }
.chat-cabin-canvas-scroll { overflow: auto; max-width: 100%; }
.chat-cabin-guide-canvas, .chat-cabin-preview-canvas { position: relative; box-sizing: content-box; background-color: var(--chat-on-accent); }
.chat-cabin-guide-canvas { width: 800px; height: 600px; background-repeat: no-repeat; }
.chat-cabin-guide-canvas .explBox { position: absolute; width: 590px; height: 420px; z-index: 1; background: var(--chat-preview-canvas); left: 200px; top: 118px; }
.chat-cabin-guide-canvas .element { padding: 0 5px; font-size: 12px; }
.chat-cabin-guide-canvas .size { font-size: 10px; float: left; }
.chat-cabin-guide-canvas .coords { font-size: 10px; margin-left: 3px; }
.chat-cabin-guide-canvas #box { position: absolute; overflow: hidden; z-index: 2; border: 2px solid var(--chat-preview-selection); visibility: hidden; width: 1px; height: 1px; }
.chat-cabin-preview-canvas * { box-sizing: content-box; }
.chat-cabin-preview-canvas table { font-size: 12px; }
.chat-cabin-help { margin: 1rem 0; padding: .8rem; border: 1px solid var(--chat-border); border-radius: .5rem; }
.chat-cabin-help summary { cursor: pointer; font-weight: 600; }

@media (max-width: 650px) {
    .chat-cabin-designer .columns2l, .chat-cabin-designer .columns2 { grid-template-columns: 1fr; gap: .5rem; }
}

.chat-bridge-activity .columns1, .chat-bridge-activity .col1 { width: auto; float: none; margin: 0; padding: 0; }
.chat-bridge-activity h2 { font-size: 1.25rem; margin-bottom: .75rem; }
.chat-bridge-activity .chat-activity-introduction { padding: 18px; margin-bottom: 20px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-panel); line-height: 1.65; }
.chat-activity-introduction img { vertical-align: middle; }
.chat-bridge-activity .nav-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.25rem 0; padding: 0; list-style: none; }
.chat-bridge-activity .nav-pills a { display: block; padding: .55rem .8rem; border: 1px solid var(--chat-border); border-radius: .5rem; }
.chat-bridge-activity .nav-pills .active a { color: var(--chat-on-accent); background: var(--chat-action-active); }
.chat-bridge-activity .colorbox { padding: 0; border: 0; }
.chat-bridge-activity .chat-activity-table-scroll { border: 1px solid var(--chat-border); border-radius: 10px; margin-top: 12px; }
.chat-activity-ranking { margin: 0; }
.chat-activity-ranking th { background: var(--chat-surface-table-heading); border-top: 0; font-size: .9rem; }
.chat-activity-ranking td { padding: .85rem .75rem; }
.chat-activity-ranking td:first-child, .chat-activity-ranking th:first-child { width: 38px; text-align: center; }
.chat-activity-ranking td:nth-child(2), .chat-activity-ranking th:nth-child(2) { width: 44px; color: var(--chat-text-description); text-align: right; }
.chat-activity-ranking td:nth-child(3), .chat-activity-ranking th:nth-child(3) { width: 65px; text-align: center; }
.chat-activity-ranking td:last-child { font-weight: 700; color: var(--chat-text-ranking-value); }
.chat-activity-ranking tr:hover td { background: var(--chat-surface-row-hover); }
.chat-activity-period-navigation a { display: inline-block; padding: 6px 10px; border-radius: 6px; background: var(--chat-surface-notice); }
.chat-activity-table-scroll { overflow-x: auto; }
.chat-activity-table-scroll table { width: 100%; min-width: 380px; }
.chat-activity-table-scroll td, .chat-activity-table-scroll th { vertical-align: middle; }
.chat-activity-table-scroll td:last-child, .chat-activity-table-scroll th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.chat-activity-table-scroll a { font-weight: 600; overflow-wrap: anywhere; }
.chat-assign-points h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-points-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px 20px; padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-panel); margin-bottom: 1.5rem; }
.chat-points-field { min-width: 0; margin: 0; }
.chat-points-reason, .chat-points-weekly, .chat-points-actions { grid-column: 1 / -1; }
.chat-points-reason textarea { resize: vertical; }
.chat-points-field label { display: block; font-weight: 600; margin-bottom: .45rem; }
.chat-points-error { display: block; color: var(--chat-text-danger); margin-top: .4rem; }
.chat-points-weekly { padding: .8rem; border: 1px solid var(--chat-border); border-radius: .5rem; background: var(--chat-surface-notice); }
.chat-points-weekly input { margin-right: .4rem; }
.chat-points-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin: 0; }
.chat-points-table-scroll { max-width: 100%; overflow-x: auto; margin: 1rem 0; border: 1px solid var(--chat-border); border-radius: 10px; }
.chat-points-table-scroll .table { margin-bottom: 0; }
.chat-points-table-scroll th { border-top: 0; background: var(--chat-surface-table-heading); font-size: .9rem; }
.chat-points-table-scroll td:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--chat-text-ranking-value); }
.chat-points-table-scroll th:nth-child(2) { text-align: right; }
.chat-points-table-scroll td:last-child { width: 42px; text-align: center; }
.chat-points-table-scroll tbody tr:hover { background: var(--chat-surface-row-hover); }

@media (max-width: 575px) {
    .chat-points-fields { grid-template-columns: 1fr; }
}

.chat-points-table-scroll table { min-width: 480px; }
.chat-points-table-scroll td { vertical-align: top; overflow-wrap: anywhere; }
.chat-abuse-reports h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-abuse-search-card { padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-panel); margin-bottom: 1.5rem; }
.chat-abuse-search-card h2 { margin-top: 0; }
.chat-abuse-search-card label { font-weight: 600; }
.chat-abuse-search-card .table { margin-bottom: 0; }
.chat-abuse-search-card .table-borderless tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.chat-abuse-search-card .table-borderless tr { display: flex; flex-direction: column; min-width: 0; }
.chat-abuse-search-card .table-borderless td { display: block; border: 0; padding: 0; }
.chat-abuse-search-card .table-borderless td:first-child { margin-bottom: 6px; }
.chat-abuse-search-card .table-borderless tr:last-child { grid-column: 1 / -1; align-items: flex-end; }
.chat-abuse-reports .columns1, .chat-abuse-reports .col1, .chat-abuse-reports .content { width: auto; float: none; margin: 0; padding: 0; }
.chat-abuse-reports .colorbox { padding: .8rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); }
.chat-abuse-table-scroll { overflow-x: auto; margin: .8rem 0; }
.chat-abuse-table-scroll table { min-width: 650px; }
.chat-abuse-table-scroll td { vertical-align: top; overflow-wrap: anywhere; }
.chat-abuse-count { display: inline-block; min-width: 1.8rem; padding: .15rem .4rem; border-radius: 1rem; background: var(--chat-surface-count); color: var(--chat-text-count); text-align: center; font-weight: 600; }
.chat-abuse-table-scroll th:first-child { width: 44px; }
.chat-abuse-toggle { width: 30px; height: 30px; padding: 0; line-height: 28px; white-space: nowrap; }
.chat-abuse-summary > td { background: var(--chat-surface) !important; }
.chat-abuse-summary:nth-child(4n + 3) > td { background: var(--chat-surface-report-alternate) !important; }
.chat-abuse-details[hidden] { display: none !important; }
.chat-abuse-reports .chat-abuse-details > td { padding: 0; background: var(--chat-surface-report-details); }
.chat-abuse-detail-panel { padding: 1.2rem; border-left: 3px solid var(--chat-accent-report); }
.chat-abuse-detail-panel h3 { font-size: 1rem; margin: 1rem 0 .6rem; }
.chat-abuse-add-comment { margin-top: 1rem; max-width: 36rem; }
.chat-abuse-add-comment textarea { margin: .4rem 0 .6rem; }

.chat-abuse-original-comment,
.chat-abuse-navigator-comment { padding: 1rem 1.1rem; border: 1px solid var(--chat-border-comment); border-radius: 7px; background: var(--chat-surface-comment); }

.chat-abuse-navigator-comment { margin-bottom: .8rem; border-left: 4px solid var(--chat-accent-report); }
.chat-abuse-navigator-comment .chat-abuse-detail-meta { margin-top: .75rem; padding-top: .6rem; border-top: 1px solid var(--chat-border-comment-meta); font-size: .85rem; }
.chat-abuse-navigator-comment .chat-abuse-detail-meta span:first-child { font-weight: 600; }
.chat-abuse-detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--chat-text-comment-meta); font-size: .9rem; }
.chat-abuse-comment { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.chat-abuse-gallery { display: flex; flex-wrap: wrap; gap: 1rem; }
.chat-abuse-image-card { display: flex; flex-direction: column; width: 180px; max-width: 100%; padding: .6rem; background: var(--chat-surface); border: 1px solid var(--chat-border); border-radius: .5rem; text-decoration: none; }
.chat-abuse-image-card img { width: 100%; height: 130px; object-fit: contain; background: var(--chat-surface-image-placeholder); }
.chat-abuse-image-card span { margin-top: .5rem; font-size: .85rem; overflow-wrap: anywhere; }
.chat-bridge-bans .columns1, .chat-bridge-bans .col1, .chat-bridge-bans .content { width: auto; float: none; margin: 0; padding: 0; }
.chat-bridge-bans h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-bridge-bans .well { background: transparent; border: 0; padding: 0; }
.chat-bridge-bans .chat-bans-search-card { padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-panel); margin-bottom: 1.5rem; }
.chat-bridge-bans .chat-bans-search-card .content { padding: 0 !important; }
.chat-bridge-bans .table-borderless { width: 100%; margin: 0; }
.chat-bridge-bans .table-borderless tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 16px; }
.chat-bridge-bans .table-borderless tr { display: flex; flex-direction: column; min-width: 0; }
.chat-bridge-bans .table-borderless td { display: block; border: 0; padding: 0; }
.chat-bridge-bans .table-borderless td:first-child { margin-bottom: 6px; }
.chat-bridge-bans .table-borderless tr:last-child { grid-column: 1 / -1; align-items: flex-end; }
.chat-bridge-bans label { font-weight: 600; }
.chat-bans-table-scroll { overflow-x: auto; margin: .8rem 0; border: 1px solid var(--chat-border); border-radius: 10px; }
.chat-bans-table-scroll .table { margin-bottom: 0; }
.chat-bans-table-scroll th { background: var(--chat-surface-table-heading); border-top: 0; font-size: .9rem; }
.chat-bans-table-scroll th:first-child { width: 44px; }
.chat-bans-table-scroll td:first-child .btn { width: 30px; height: 30px; padding: 0; line-height: 28px; }
.chat-bans-table-scroll tr:not(.chat-bans-details-row):hover { background: var(--chat-surface-row-hover); }
.chat-bans-table-scroll .chat-bans-details-row > td { padding: 0; border: 0; }
.chat-bans-table-scroll .chat-ban-details.show { margin: 0 10px 10px; }
.chat-bridge-bans .colorbox .repeatx { display: flex; justify-content: flex-end; margin-top: 12px; }
.chat-bans-table-scroll table { min-width: 720px; }
.chat-bans-table-scroll td { vertical-align: middle; overflow-wrap: anywhere; }
.chat-bans-table-scroll small { display: block; color: var(--chat-text-ban-meta); }
.chat-bans-table-scroll .chat-ban-details { white-space: normal; padding: .75rem; background: var(--chat-surface-notice); border-radius: .5rem; }
.chat-bridge-bans .colorbox { margin-top: 1rem; padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); }
.chat-bridge-bans .colorbox textarea { margin: .5rem 0; width: 100%; resize: vertical; }
.chat-bridge-bans .repeatx { margin-top: 1rem; text-align: right; }
.chat-bridge-bans .colorbox span { color: var(--chat-text-danger); }

@media (max-width: 650px) {
    .chat-bridge-bans .table-borderless td { display: block; padding: .35rem 0; }
}

.chat-admin-log .columns1, .chat-admin-log .col1 { width: auto; float: none; margin: 0; padding: 0; }
.chat-admin-log h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-admin-log .well { background: transparent; padding: 0; border: 0; }
.chat-admin-log .chat-admin-log-search-card { padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-panel); }
.chat-admin-log .table-borderless { width: 100%; max-width: none; margin: 0; }
.chat-admin-log .table-borderless tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.chat-admin-log .table-borderless tr { display: flex; flex-direction: column; min-width: 0; }
.chat-admin-log .table-borderless tr:first-child { grid-column: 1 / -1; }
.chat-admin-log .table-borderless td { display: block; padding: 0; border: 0; min-width: 0; }
.chat-admin-log .table-borderless td:first-child { width: auto; margin-bottom: 6px; }
.chat-admin-log label { font-weight: 600; margin: 0; }
.chat-admin-log .table-borderless td > div { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-admin-log .table-borderless td > span { color: var(--chat-text-danger); }
.chat-admin-log-actions { display: flex; justify-content: flex-end; margin: 16px 0 0; }
.chat-admin-log-table-scroll { overflow-x: auto; margin: .8rem 0; }
.chat-admin-log-table-scroll table { min-width: 650px; }
.chat-admin-log-table-scroll td { vertical-align: top; overflow-wrap: anywhere; }
.chat-admin-log-table-scroll td:last-child small { white-space: nowrap; }
.chat-admin-log .chat-admin-log-event-text { padding: .65rem 1rem 1rem; background: var(--chat-surface-panel); white-space: pre-wrap; border-bottom: 2px solid var(--chat-border); font-size: .9rem; color: var(--chat-text-event-log); }
.chat-admin-log-table-scroll .table { border: 1px solid var(--chat-border); }
.chat-admin-log-table-scroll th { background: var(--chat-surface-table-heading); border-top: 0; }
.chat-admin-log-table-scroll tr:not(.chat-admin-log-details-row) td { background: var(--chat-surface); padding-top: 14px; padding-bottom: 8px; }
.chat-admin-log .table-borderless select { max-width: 100%; }

@media (max-width: 650px) {
    .chat-admin-log .table-borderless tbody { grid-template-columns: 1fr; }
}

.chat-logbook-fansites .columns1, .chat-logbook-fansites .col1 { float: none; width: auto; padding: 0; margin: 0; }
.chat-logbook-fansites h2 { font-size: 1.25rem; }
.chat-logbook-fansites .chat-fansite-entry { padding: 16px 0; overflow-wrap: anywhere; }
.chat-logbook-fansites .chat-fansite-entry b { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.chat-logbook-fansites .hr { border-top: 1px solid var(--chat-border); margin: 0; }
.chat-bridge-user-rank .columns1, .chat-bridge-user-rank .col1 { float: none; width: auto; padding: 0; margin: 0; min-width: 0; }
.chat-bridge-user-rank .corners { display: none; }
.chat-bridge-user-rank .well { background: var(--chat-surface-user-edit); border: 1px solid var(--chat-border); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.chat-bridge-user-rank td { padding: 8px; vertical-align: middle; }
.chat-bridge-user-rank .error { color: var(--chat-text-danger); }
.chat-user-rank-history { overflow-x: auto; }
.chat-user-rank-history table { min-width: 400px; }
.chat-bridge-forum-thread .panel { border: 1px solid var(--chat-border); border-radius: 12px; margin: 18px 0; overflow: hidden; background: var(--chat-surface); }
.chat-bridge-forum-thread .panel-heading { padding: 12px 16px; background: var(--chat-surface-forum-heading); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chat-bridge-forum-thread .panel-title { font-size: 1.15rem; margin: 0; }
.chat-bridge-forum-thread .panel-body { padding: 16px; overflow-wrap: anywhere; }
.chat-bridge-forum-thread .pull-right { margin-left: auto; }
.chat-bridge-forum-thread textarea { max-width: 100%; }
.chat-bridge-forum-thread img { max-width: 100%; height: auto; }
.chat-bridge-forum-thread .tox-tinymce, .chat-bridge-forum-thread .mce-tinymce { max-width: 100%; box-sizing: border-box; }
.chat-bridge-forum-thread .btn-default { border: 1px solid var(--chat-border); background: var(--chat-surface-button-muted); color: var(--chat-text); }
.chat-bridge-forum-thread .panel > .btn { margin: 0 16px 16px; }
.chat-bridge-fansite-edit .columns1, .chat-bridge-fansite-edit .col1 { float: none; width: auto; margin: 0; padding: 0; min-width: 0; }
.chat-bridge-fansite-edit td { padding: 8px; vertical-align: top; }
.chat-bridge-fansite-edit input[type=text], .chat-bridge-fansite-edit textarea { max-width: 100%; border: 1px solid var(--chat-border); border-radius: 6px; padding: 8px; }
.chat-bridge-fansite-edit textarea { min-height: 110px; resize: vertical; }

@media (max-width: 600px) {
    .chat-bridge-fansite-edit table, .chat-bridge-fansite-edit tbody, .chat-bridge-fansite-edit tr, .chat-bridge-fansite-edit td { display: block; width: 100%; }
    .chat-bridge-fansite-edit td:empty { display: none; }
}

/* Shared page banner: reuse the original harbour artwork without legacy layout. */
.chat-community-card.chat-community-content { padding: 0; }

.chat-community-page-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border-radius: var(--chat-radius-card) var(--chat-radius-card) 0 0;
    background-color: var(--chat-page-banner-base);
    background-image: linear-gradient(to right, var(--chat-page-banner-start) 0%, var(--chat-page-banner-stop-strong) 20%, var(--chat-page-banner-stop-muted) 55%, var(--chat-page-banner-stop-clear) 100%), url("../Seasons/default/headers/header_day.png");
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: inset 0 -1px 0 var(--chat-shadow-inset-color);
}

.chat-community-page-header h1 {
    margin: 0;
    color: var(--chat-on-accent);
    font-size: clamp(24px, 2.2vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px var(--chat-shadow-banner-text-color);
}

.chat-community-page-body { padding: 25px; min-width: 0; }

@media (max-width: 650px) {
    .chat-community-page-header { min-height: 64px; padding: 16px 18px; }
    .chat-community-page-body { padding: 18px; }
}

.chat-fansites-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.chat-fansites-heading h2 { font-size: 1.25rem; margin: 0; }
.chat-fansites-table-scroll { overflow-x: auto; margin: .8rem 0; }
.chat-fansites-table-scroll table { min-width: 360px; width: 100%; }
.chat-fansites-table-scroll td { vertical-align: middle; overflow-wrap: anywhere; }
.chat-fansites-table-scroll td:first-child a { font-weight: 600; }
.chat-fansites-table-scroll .chat-fansites-action { width: 70px; text-align: center; }
.chat-fansites-action a { display: inline-flex; padding: .5rem; border-radius: .4rem; }
.chat-fansites-action a img { width: 22px; height: 22px; }
.chat-fansites-action input[type="image"] { padding: .5rem; box-sizing: content-box; border-radius: .4rem; }
.chat-fansites-action a:hover, .chat-fansites-action input[type="image"]:hover { background: var(--chat-surface-fansite-hover); }
.chat-fansites-empty { padding: 1rem; background: var(--chat-surface-notice); border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); }
.chat-news-editor h2 { font-size: 1.25rem; margin-bottom: 1.25rem; }
.chat-news-field { min-width: 0; margin-bottom: 1rem; }
.chat-news-field > label { display: block; font-weight: 600; margin-bottom: .45rem; }
.chat-news-content { min-height: 325px; resize: vertical; }
.chat-news-settings { padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); margin-top: 1.25rem; }
.chat-news-settings legend { font-size: 1rem; font-weight: 600; width: auto; padding: 0 .4rem; }
.chat-news-audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.chat-news-options { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.chat-news-options input { margin-right: .4rem; }
.chat-news-options label { margin: 0; }
.chat-news-buttons, .chat-news-primary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.chat-news-buttons { justify-content: space-between; margin-top: 1.25rem; }
.chat-news-primary-actions { margin-left: auto; }
.chat-news-saving, .chat-news-save-error { padding: 1rem; margin-top: 1rem; border-radius: .5rem; background: var(--chat-surface-notice); }
.chat-news-save-error { color: var(--chat-text-danger); border: 1px solid var(--chat-text-danger); }
.chat-news-editor .mce-tinymce { max-width: 100%; box-sizing: border-box; }

@media (max-width: 850px) {
    .chat-news-audience { grid-template-columns: 1fr; gap: 0; }
}

.chat-news-editor [hidden] { display: none !important; }
.chat-award-intro { padding: 1rem; background: var(--chat-surface-notice); border-radius: .5rem; margin-bottom: 1.25rem; }
.chat-award-category { padding: 1.25rem 0; border-top: 1px solid var(--chat-border); }
.chat-award-category h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.chat-award-grid li { min-width: 0; }
.chat-award-feature { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 1rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); text-align: center; background: var(--chat-surface); }
.chat-award-feature:hover, .chat-award-feature:focus-visible { border-color: var(--chat-accent-focus); background: var(--chat-surface-notice); text-decoration: none; }
.chat-award-image { position: relative; display: block; margin-bottom: .75rem; }
.chat-award-image img { display: block; max-width: 100%; height: auto; }
.chat-award-badge { position: absolute; top: -.4rem; right: -.4rem; padding: .2rem .45rem; color: var(--chat-on-accent); background: var(--chat-accent-focus); border-radius: .5rem; font-size: .75rem; }
.chat-award-title { font-weight: 600; overflow-wrap: anywhere; }
.chat-logbook-profile .chat-profile-rank { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.chat-logbook-profile .chat-profile-rank img { display: block; max-width: 74px; height: auto; flex: 0 0 auto; }
.chat-support-page .columns1, .chat-support-page .col1, .chat-support-page .col2, .chat-support-page .content { width: auto; float: none; margin: 0; padding: 0; min-width: 0; }
.chat-support-page h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-support-page .col1 > label, .chat-support-field-label { display: block; margin: 1rem 0 .4rem; font-size: 1rem; font-weight: 600; }
.chat-support-page .form-control { width: 100%; max-width: 100%; }
.chat-support-page .chat-support-message { min-height: 180px; resize: vertical; }
.chat-support-page .colorbox { border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); padding: 1rem; margin: 1rem 0; }
.chat-support-ticket-header { padding: 1rem; margin-bottom: 1rem; background: var(--chat-surface-notice); border-radius: .5rem; overflow-wrap: anywhere; }
.chat-support-comment { border-top: 1px solid var(--chat-border); padding: 1rem 0; }
.chat-support-comment-body { overflow-wrap: anywhere; padding-top: .65rem; }
.chat-support-page .chat-support-action { display: inline-block; margin: .4rem .5rem .4rem 0; vertical-align: top; }
.chat-support-page .repeatx { min-width: 0 !important; }
.chat-support-page .repeatx input { width: auto !important; }
.chat-helpdesk-ticket .chat-helpdesk-ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
.chat-helpdesk-ticket-actions > .chat-support-action { flex: 0 0 auto; max-width: 100%; margin: 0; }

/* Legacy button wrappers must grow with the translated caption, not stay at a fixed width. */
.chat-helpdesk-ticket-actions .repeatx,
.chat-helpdesk-ticket-actions .btncenter { display: block; float: none; width: auto !important; min-width: 0 !important; max-width: 100%; margin: 0; padding: 0; }

.chat-helpdesk-ticket-actions input.btn { max-width: 100%; }
.chat-support-page .alert table td { padding: .35rem; vertical-align: top; }
.chat-support-table-scroll { overflow-x: auto; }
.chat-support-table-scroll table { min-width: 480px; }
.chat-support-table-scroll td { overflow-wrap: anywhere; }
.chat-support-page input[type=radio] { margin: .4rem .4rem .4rem 0; }
.chat-support-page .error { color: var(--chat-text-danger); }

@media (max-width: 650px) {
    .chat-support-page .alert table td { display: block; width: 100%; }
}

.chat-kb-editor .columns1, .chat-kb-editor .col1 { width: auto; float: none; padding: 0; margin: 0; }
.chat-kb-editor .chat-kb-action { display: inline-block; margin: .5rem .5rem .5rem 0; vertical-align: top; }
.chat-kb-editor .chat-kb-tree { overflow: auto; min-height: 360px; max-height: 650px; padding: 1rem; margin-top: 1rem; border: 1px solid var(--chat-border); border-radius: .5rem; }
.chat-kb-editor table { width: 100%; }
.chat-kb-editor td { padding: .5rem; vertical-align: top; }
.chat-kb-editor td:first-child { width: 30%; }
.chat-kb-editor .form-control { width: 100%; max-width: 100%; }
.chat-kb-editor .chat-kb-content { min-height: 325px; }
.chat-kb-editor .tabpages > div { display: none; }
.chat-kb-editor .tabpages > div.selected { display: block; }
.chat-kb-editor .nav-tabs { gap: .4rem; margin-bottom: 1rem; }
.chat-kb-editor .nav-tabs a { display: block; padding: .6rem .8rem; border: 1px solid var(--chat-border); border-radius: .5rem .5rem 0 0; }
.chat-kb-editor .nav-tabs li.selected a, .chat-kb-editor .nav-tabs li.active a { background: var(--chat-action-active); color: var(--chat-on-accent); }
.chat-kb-editor .chat-kb-empty { padding: 1rem; background: var(--chat-surface-notice); border-radius: .5rem; }
.chat-kb-editor .mce-tinymce { max-width: 100%; box-sizing: border-box; }

@media (max-width: 650px) {
    .chat-kb-editor td { display: block; width: 100% !important; }
    .chat-kb-editor .chat-kb-tree td { display: table-cell; width: auto !important; }
}

.chat-forgot-password { max-width: 520px; }
.chat-forgot-password h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-forgot-password label { display: block; font-weight: 600; margin-bottom: .45rem; }
.chat-forgot-captcha { margin: 1rem 0; max-width: 100%; overflow-x: auto; }
.chat-forgot-message { padding: 1rem; margin-top: 1rem; background: var(--chat-surface-notice); border: 1px solid var(--chat-border); border-radius: .5rem; overflow-wrap: anywhere; }
.chat-forgot-help { margin-top: 1.25rem; color: var(--chat-text-muted); }
.chat-contract-intro { padding: 1rem; margin-bottom: 1rem; background: var(--chat-surface-notice); border-radius: .5rem; }
.chat-contract-document { max-height: min(600px, 65vh); overflow: auto; padding: 1.25rem; border: 1px solid var(--chat-border); border-radius: var(--chat-radius-card); line-height: 1.6; overflow-wrap: anywhere; }
.chat-contract-document:focus-visible { outline: 2px solid var(--chat-accent-focus); outline-offset: 3px; }
.chat-contract-document img { max-width: 100%; height: auto; }
.chat-contract-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; margin-top: 1.25rem; }
.chat-my-rights .columns1, .chat-my-rights .col1 { width: auto; float: none; margin: 0; padding: 0; }
.chat-my-rights-heading { display: flex; align-items: center; gap: .6rem; font-size: 1.25rem; margin-bottom: 1rem; }
.chat-my-rights .nav-tabs { gap: .4rem; margin-bottom: 1rem; }
.chat-my-rights .nav-tabs a { display: block; padding: .6rem .8rem; border: 1px solid var(--chat-border); border-radius: .5rem .5rem 0 0; }
.chat-my-rights .nav-tabs li.selected a, .chat-my-rights .nav-tabs li.active a { color: var(--chat-on-accent); background: var(--chat-action-active); }
.chat-my-rights .tabpages > div { display: none; overflow-x: auto; }
.chat-my-rights .tabpages > div.selected { display: block; }
.chat-my-rights .table { min-width: 360px; }
.chat-my-rights .table td { vertical-align: middle; overflow-wrap: anywhere; }
.chat-activity-information .columns1, .chat-activity-information .col1 { width: auto; float: none; margin: 0; padding: 0; }
.chat-activity-information { line-height: 1.7; overflow-wrap: anywhere; }
.chat-activity-information h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-activity-information table { width: 100%; }
.chat-activity-information td, .chat-activity-information th { padding: .5rem; }

.chat-activity-realtime-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 18px;
    border: 1px solid var(--chat-border);
    border-radius: 12px;
    background: var(--chat-surface-panel);
}

.chat-activity-realtime-filter > div { flex: 1 1 240px; min-width: 0; }
.chat-activity-realtime-filter .form-control { max-width: 28rem; }
.chat-activity-realtime-filter label { display: block; font-weight: 600; }
.chat-activity-realtime .chat-activity-table-scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--chat-border); border-radius: 10px; }
.chat-activity-realtime .table { width: 100%; margin-bottom: 0; }
.chat-activity-realtime .table th { background: var(--chat-surface-table-heading); border-top: 0; font-size: .9rem; }
.chat-activity-realtime .table td { vertical-align: middle; padding: .85rem .75rem; }

.chat-activity-realtime .table th:nth-child(n+4),
.chat-activity-realtime .table td:nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }

.chat-activity-realtime .table td:last-child { font-weight: 700; color: var(--chat-text-ranking-value); }
.chat-activity-realtime .table td:nth-child(3) { overflow-wrap: anywhere; }
.chat-activity-realtime .table td:first-child { white-space: nowrap; font-size: .85rem; color: var(--chat-text-description); }
.chat-activity-realtime .table tbody tr:hover { background: var(--chat-surface-row-hover); }
.chat-activity-realtime-status { display: block; padding: 1rem; border-radius: .5rem; background: var(--chat-surface-notice); }

@media (max-width: 575px) {
    .chat-activity-realtime-filter .btn { width: 100%; }
}

.chat-activity-statistics .columns1,
.chat-activity-statistics .col1 { width: auto; float: none; margin: 0; padding: 0; }

.chat-activity-statistics h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.chat-activity-statistics-chart h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--chat-text-chart); }
.chat-activity-statistics-summary { color: var(--chat-text-description); margin-bottom: 1rem; font-size: .9rem; }
.chat-activity-statistics label { font-weight: 600; margin-right: .5rem; }
.chat-activity-statistics select { padding: .5rem .75rem; border: 1px solid var(--chat-border); border-radius: 8px; background: var(--chat-surface); color: var(--chat-text-chart); }
.chat-activity-statistics-chart { box-sizing: border-box; min-width: 0; max-width: 100%; margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface); box-shadow: 0 3px 12px var(--chat-shadow-chart-color); }
.chat-browser-chart { width: 100%; min-width: 0; }
.chat-browser-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chat-browser-chart svg text { font: 11px "Segoe UI", sans-serif; fill: var(--chat-text-description); }
.chat-chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .25rem 0; font-size: .85rem; color: var(--chat-text-chart); }
.chat-chart-legend span { display: inline-flex; align-items: center; gap: .5rem; overflow-wrap: anywhere; min-width: 0; }
.chat-chart-legend i { width: 1.5rem; flex-shrink: 0; }
.chat-forum { min-width: 0; }
.chat-forum h2 { margin: .75rem 0 .4rem; font-size: 1.35rem; overflow-wrap: anywhere; }
.chat-forum-categories, .chat-forum-threads { overflow: hidden; border: 1px solid var(--chat-border-forum); border-radius: .75rem; background: var(--chat-surface); }
.chat-forum-category, .chat-forum-thread { display: flex; align-items: center; gap: .85rem; padding: 1rem; color: var(--chat-text); text-decoration: none; border-bottom: 1px solid var(--chat-border-forum); }
.chat-forum-category:last-child, .chat-forum-thread:last-child { border-bottom: 0; }
.chat-forum-category:hover, .chat-forum-thread:hover { background: var(--chat-surface-panel); text-decoration: none; }
.chat-forum-category:focus-visible, .chat-forum-thread:focus-visible, .chat-forum summary:focus-visible { outline: 3px solid var(--chat-accent); outline-offset: -3px; }
.chat-forum-category-copy, .chat-forum-thread-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-forum-category strong, .chat-forum-thread strong { display: block; font-size: 1rem; }
.chat-forum-description, .chat-forum-meta { display: block; color: var(--chat-text-description); font-size: .875rem; line-height: 1.55; margin-top: .25rem; }
.chat-forum-reply-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .85rem; margin-top: .6rem; font-size: .8rem; line-height: 1.55; color: var(--chat-text-description); }
.chat-forum-reply-count { display: inline-block; padding: .1rem .45rem; border: 1px solid var(--chat-border-forum); border-radius: .35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chat-forum-last-reply { min-width: 0; overflow-wrap: anywhere; }
.chat-forum-last-reply b { font-weight: 600; }
.chat-forum-count { min-width: 2.4rem; padding: .25rem .55rem; border-radius: 1rem; background: var(--chat-surface-panel); text-align: center; font-weight: 700; }
.chat-forum-toolbar, .chat-forum-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1rem 0; }
.chat-forum-pager { justify-content: center; }
.chat-forum-pager > span { color: var(--chat-text-description); font-variant-numeric: tabular-nums; }
.chat-forum-statuses { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-forum-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: .4rem; font-size: .78rem; line-height: 1.4; font-weight: 600; }
.chat-forum-sticky { background: #fff1c2; color: #685000; }
.chat-forum-locked { background: #e7edf3; color: #384b60; }
.chat-forum-thread.is-sticky { border-left: 4px solid #d4a321; padding-left: calc(1rem - 4px); }
.chat-forum .panel { margin: 1rem 0; border: 1px solid var(--chat-border-forum); border-radius: .65rem; overflow: hidden; background: var(--chat-surface); }
.chat-forum .panel-heading { padding: .85rem 1rem; background: var(--chat-surface-panel); }
.chat-forum .panel-title { font-size: 1.1rem; margin: 0; }
.chat-forum .panel-body, .chat-forum-composer-body { padding: 1rem; }
.chat-forum-composer { margin-top: 1.25rem; border: 1px solid var(--chat-border-forum); border-radius: .65rem; background: var(--chat-surface); }
.chat-forum-composer > summary { padding: 1rem; font-weight: 600; cursor: pointer; }
.chat-forum-composer[open] > summary { border-bottom: 1px solid var(--chat-border-forum); }
.chat-forum-composer .panel-body { border: 0; }
.chat-forum-composer > .btn { margin: 0 1rem 1rem; }
.chat-forum textarea.form-control { width: 100%; min-height: 15rem; box-sizing: border-box; resize: vertical; }
.chat-forum .form-group { margin-bottom: 1rem; }
.chat-forum .form-group label { display: block; margin-bottom: .4rem; }
.chat-forum .form-control { max-width: 100%; }
.chat-forum .mce-tinymce { width: 100% !important; max-width: 100%; box-sizing: border-box; }
.chat-forum-notice { display: block; margin: 1rem 0; padding: .85rem 1rem; border: 1px solid var(--chat-border-forum); border-radius: .5rem; background: var(--chat-surface-panel); }
.chat-forum-post-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.chat-forum-post-heading > img { width: auto !important; height: auto; max-width: 40px; max-height: 40px; object-fit: contain; }
.chat-forum-post-heading > .pull-right { margin-left: auto; color: var(--chat-text-description); font-size: .85rem; }
.chat-forum-post-content { max-width: 100%; overflow: auto; }
.chat-forum-post-content img { max-width: 100%; height: auto; }
@media (max-width: 575px) {
    .chat-forum-thread { flex-wrap: wrap; }
    .chat-forum-thread-copy { flex-basis: calc(100% - 2rem); }
    .chat-forum-thread .chat-forum-statuses { flex-basis: 100%; order: 2; }
    .chat-forum-thread .chat-forum-statuses:empty { display: none; }
    .chat-forum-category, .chat-forum-thread { padding: .85rem; }
    .chat-forum-thread.is-sticky { padding-left: calc(.85rem - 4px); }
    .chat-forum-post-heading > .pull-right { width: 100%; margin-left: 0; }
}
/* Category overview cards */
.chat-forum-overview-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--chat-border-forum); }
.chat-forum-overview-heading h2 { margin: 0; }
.chat-forum-overview-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.chat-forum-overview-stats > span { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border-radius: .45rem; background: var(--chat-surface-panel); color: var(--chat-text-description); font-size: .8rem; }
.chat-forum-overview-stats b { color: var(--chat-text); font-size: .95rem; }
.chat-forum-category-cards { display: flex; flex-direction: column; gap: .85rem; }
.chat-forum-category-card { --forum-category-accent: #177c9f; --forum-category-tint: #eaf6fa; overflow: hidden; border: 1px solid var(--chat-border-forum); border-left: 4px solid var(--forum-category-accent); border-radius: .7rem; background: var(--chat-surface); box-shadow: 0 2px 5px rgba(16,43,67,.035); }
.chat-forum-category-tone-1 { --forum-category-accent: #7460a6; --forum-category-tint: #f2eef9; }
.chat-forum-category-tone-2 { --forum-category-accent: #36866f; --forum-category-tint: #ecf6f0; }
.chat-forum-category-tone-3 { --forum-category-accent: #b27b36; --forum-category-tint: #faf3e8; }
.chat-forum-category-card .chat-forum-category { border: 0; padding: 1rem; background: linear-gradient(105deg, var(--forum-category-tint), var(--chat-surface) 55%); }
.chat-forum-category-card .chat-forum-category:hover { background: var(--forum-category-tint); }
.chat-forum-category-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: .7rem; background: var(--chat-surface); color: var(--forum-category-accent); box-shadow: 0 1px 4px rgba(16,43,67,.06); }
.chat-forum-category-icon svg { width: 25px; height: 25px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chat-forum-category-card .chat-forum-category-copy strong { font-weight: 700; }
.chat-forum-category-card .chat-forum-description { font-size: .8rem; line-height: 1.45; }
.chat-forum-category-count { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 48px; flex: 0 0 auto; }
.chat-forum-category-count b { color: var(--forum-category-accent); font-size: 1.25rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.chat-forum-category-count small { color: var(--chat-text-description); font-size: .7rem; }
.chat-forum-category-arrow { color: var(--forum-category-accent); font-size: 1.4rem; }
.chat-forum-category-latest { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; column-gap: .65rem; row-gap: .15rem; padding: .65rem 1rem .7rem; border-top: 1px solid var(--chat-border-forum); background: var(--chat-surface); }
.chat-forum-latest-caption { color: var(--chat-text-description); font-size: .72rem; }
.chat-forum-latest-title { min-width: 0; overflow-wrap: anywhere; font-size: .85rem; font-weight: 600; text-decoration: none; }
.chat-forum-latest-title:hover { text-decoration: underline; }
.chat-forum-latest-meta { grid-column: 2; min-width: 0; overflow-wrap: anywhere; color: var(--chat-text-description); font-size: .75rem; line-height: 1.5; }
.chat-forum-latest-meta b { font-weight: 600; }
.chat-forum-category-empty { grid-column: 1 / -1; color: var(--chat-text-description); font-size: .75rem; }
@media (max-width: 575px) {
    .chat-forum-category-card .chat-forum-category { gap: .6rem; padding: .85rem .7rem; }
    .chat-forum-category-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: .55rem; }
    .chat-forum-category-icon svg { width: 21px; height: 21px; }
    .chat-forum-category-count { min-width: 35px; }
    .chat-forum-category-count b { font-size: 1.1rem; }
    .chat-forum-category-arrow { display: none; }
    .chat-forum-category-latest { grid-template-columns: minmax(0,1fr); gap: .15rem; padding: .65rem .8rem; }
    .chat-forum-latest-meta { grid-column: 1; }
}

.chat-error-message { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 0; }
.chat-error-illustration { flex: 0 1 auto; max-width: 35%; height: auto; }
.chat-error-details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-error-details h2 { font-size: 1.35rem; margin: 0 0 .75rem; line-height: 1.4; }
.chat-error-hint { line-height: 1.65; }
.chat-error-actions { margin-top: 1rem; }

@media (max-width: 575px) {
    .chat-error-message { flex-direction: column; align-items: flex-start; }
    .chat-error-illustration { max-width: 50%; }
}

.chat-logbook-profile .chat-profile-info-panel { position: relative; }
.chat-logbook-profile .chat-profile-censor { box-sizing: border-box; width: 100%; margin-top: 1.5rem; padding: 1.1rem; border: 1px solid var(--chat-border-censor); border-top: 3px solid var(--chat-accent-censor); border-radius: .65rem; background: var(--chat-surface-censor); }
.chat-profile-censor label { display: block; margin: 0 0 .5rem; font-weight: 600; }
.chat-logbook-profile .chat-profile-censor-reason { box-sizing: border-box; display: block; width: 100%; max-width: none; min-height: 2.75rem; border: 1px solid var(--chat-border-censor-input); border-radius: .4rem; background: var(--chat-surface); }
.chat-profile-censor-actions { display: flex; justify-content: flex-end; margin-top: .85rem; }
.chat-profile-censor-actions .btn { min-width: 7rem; padding: .55rem 1rem; white-space: normal; }

@media (max-width: 575px) {
    .chat-profile-censor-actions .btn { width: 100%; }
}

.chat-profile-photochat { position: absolute; top: 8px; right: 12px; width: 50px; height: 50px; }
.chat-profile-photochat a { display: block; }
.chat-profile-photochat img { display: block; width: 50px; height: 50px; object-fit: cover; border-radius: 50%; }
.chat-profile-info-panel .table tr:first-child { height: 66px; }
.chat-logbook-profile .chat-profile-info-panel .table tr:first-child td:last-child { padding-right: 78px; }
.chat-channel-overview .table-responsive { border: 1px solid var(--chat-border); border-radius: 10px; }
.chat-channel-overview table { min-width: 850px; margin-bottom: 0; }
.chat-channel-overview th, .chat-channel-overview td { vertical-align: middle; }
.chat-channel-overview thead { background: var(--chat-surface-section-heading); }
.chat-channel-deck { margin-bottom: 24px; }
.chat-channel-deck h2 { font-size: 1.25rem; margin: 0 0 12px; }

.chat-community-news-list td[id$="EditColumn"] a,
.chat-community-news-list td[id$="DeleteColumn"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--chat-border);
    border-radius: 7px;
    background: var(--chat-surface);
}

.chat-community-news-list td[id$="EditColumn"] a:hover,
.chat-community-news-list td[id$="DeleteColumn"] a:hover { background: var(--chat-surface-row-hover); }

.chat-ban-delete-action { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--chat-border); border-radius: 7px; background: var(--chat-surface); }
.chat-ban-delete-action img { display: block; width: 22px; height: 22px; }
.chat-ban-delete-action:hover { background: var(--chat-surface-delete-hover); border-color: var(--chat-border-delete-hover); }
.chat-ban-delete-action:focus-visible { outline: 2px solid var(--chat-focus-danger); outline-offset: 2px; }
.chat-smileys-overview { padding: 16px; background: var(--chat-surface-information); border: 1px solid var(--chat-border-information); border-radius: 12px; margin-bottom: 20px; }
.chat-smileys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.chat-smileys-grid a { display: flex; justify-content: center; align-items: center; min-height: 48px; padding: 6px; border-radius: 8px; background: var(--chat-surface); }
.chat-smileys-grid a:hover, .chat-smileys-grid a:focus { background: var(--chat-surface-smiley-hover); outline: 2px solid var(--chat-focus-information); }
.chat-smileys-grid img { max-width: 100%; height: auto; }
.chat-smileys-results { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--chat-border-information); border-radius: 12px; }
.chat-smileys-results .table { width: 100%; min-width: 640px; margin: 0; }
.chat-smileys-results th { background: var(--chat-surface-info); border-top: 0; }
.chat-smileys-results th, .chat-smileys-results td { padding: 12px 16px; vertical-align: middle; }
.chat-smileys-results tr:target { background: var(--chat-surface-target); }
.chat-smileys-results code { white-space: nowrap; }
.chat-smileys-replacements { margin-top: 24px; border: 1px solid var(--chat-border-information); border-radius: 12px; overflow: hidden; }
.chat-smileys-replacement { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 12px; padding: 12px 16px; }
.chat-smileys-replacement + .chat-smileys-replacement { border-top: 1px solid var(--chat-border-replacement); }
.chat-smileys-replacement span { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 575px) {
    .chat-smileys-replacement { grid-template-columns: 1fr; gap: 6px; }
}

.chat-xmas-tree { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chat-xmas-tree .row-no-margin-right { margin: 0 0 18px; }
.chat-xmas-tree .row-no-margin-right > div { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 12px; border: 1px solid var(--chat-border-information); border-radius: 12px; background: var(--chat-surface-information); }
.chat-xmas-tree .active-dec, .chat-xmas-tree .inactive-dec { position: relative; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 4px; }
.chat-xmas-tree .active-dec { cursor: grab; touch-action: none; z-index: 2; }
.chat-xmas-tree .active-dec:focus-visible { outline: 2px solid var(--chat-focus-information); border-radius: 6px; }
.chat-xmas-tree .active-dec.is-dragging { z-index: 3; cursor: grabbing; }
.chat-xmas-tree .active-dec img { pointer-events: none; }
.chat-xmas-tree .inactive-dec { opacity: .45; }
.chat-xmas-tree .row-centre { margin: 0; justify-content: center; }
.chat-xmas-tree #bg-container { position: relative; flex: 0 0 auto; }
.chat-xmas-tree #bg-container > img { display: block; max-width: none; }
.chat-logbook-guestbook .chat-guestbook-action { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 4px; vertical-align: middle; border: 1px solid var(--chat-border); border-radius: 7px; background: var(--chat-surface); text-decoration: none; }
.chat-logbook-guestbook .chat-guestbook-action img { display: block; width: 22px; height: 22px; }

.chat-logbook-guestbook img[src*="PrivateIcon.gif"],
.chat-logbook-guestbook img[src*="privateicon.svg"],
.chat-logbook-guestbook .chat-guestbook-private img[src*="locked.svg"] { content: url('../../gfx/chat/guestbook/icons/private-eye.svg'); width: 22px; height: 22px; }

.chat-logbook-guestbook img[src*="DeleteIcon.gif"],
.chat-logbook-guestbook img[src*="deleteicon.svg"] { content: url('../../gfx/chat/bridge/icons/delete.svg'); width: 22px; height: 22px; }

.chat-logbook-guestbook .chat-guestbook-delete:hover { background: var(--chat-surface-delete-hover); border-color: var(--chat-border-delete-hover); }
.chat-logbook-guestbook .chat-guestbook-private:hover { background: var(--chat-surface-row-hover); }
.chat-logbook-guestbook .chat-guestbook-action:focus-visible { outline: 2px solid var(--chat-focus-information); outline-offset: 2px; }
.chat-logbook-guestbook .chat-guestbook-delete:focus-visible { outline-color: var(--chat-focus-danger); }
.chat-statistics-heading { font-size: 1.25rem; margin: 0 0 18px; }
.chat-statistics-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.chat-statistics-summary .chat-statistics-item { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: linear-gradient(135deg, var(--chat-surface-statistics-start), var(--chat-surface)); border: 1px solid var(--chat-border); border-radius: 12px; }
.chat-statistics-summary dt { color: var(--chat-text-muted); font-size: .85rem; font-weight: 500; }
.chat-statistics-summary dd { margin: 0; color: var(--chat-text-accent); font-size: 1.2rem; font-weight: 600; }
.chat-statistics-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chat-statistics-card { padding: 6px 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface); }
.chat-statistics-card dl { margin: 0; }
.chat-statistics-card .chat-statistics-item { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; }
.chat-statistics-card .chat-statistics-item + .chat-statistics-item { border-top: 1px solid var(--chat-border-statistics-row); }
.chat-statistics-card dt { font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; }
.chat-statistics-card dd { margin: 0; font-weight: 600; color: var(--chat-text-accent); text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.chat-statistics-quests { margin-top: 24px; }
.chat-statistics-quests h2 { font-size: 1.2rem; margin-bottom: 12px; }
.chat-statistics-quest-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--chat-border); border-radius: 12px; }
.chat-statistics-quests .table { margin: 0; width: 100%; min-width: 360px; }
.chat-statistics-quests th { background: var(--chat-surface-info); border-top: 0; }
.chat-statistics-quests th, .chat-statistics-quests td { padding: 12px 16px; }
.chat-statistics-quests td:last-child { white-space: nowrap; color: var(--chat-text-muted); font-size: .85rem; }
.chat-statistics-quests tbody tr:nth-child(even) { background: var(--chat-surface-row-alternate); }

@media (max-width: 767px) {
    .chat-statistics-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .chat-statistics-summary { gap: 10px; }
    .chat-statistics-summary .chat-statistics-item { padding: 14px; }
    .chat-statistics-summary dd { font-size: 1rem; }
}

.chat-logbook-mypage .chat-mypage-profile-photo { display: block; width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.chat-community-legacy-widgets #ChatNowBox .panel { padding: 8px 10px; }
.chat-community-legacy-widgets #ChatNowBox .panel-heading { display: none; }
.chat-community-legacy-widgets #ChatNowBox .panel-heading h3 { margin: 0; font-size: 1rem; line-height: 1.25; }
.chat-community-legacy-widgets #ChatNowBox .panel-body { padding: 0; }
.chat-community-legacy-widgets #ChatNowBox .btn { margin: 0 !important; padding: 5px 10px; min-height: 32px; }
.chat-help-section { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .85fr); gap: 24px; padding: 24px 0; align-items: start; }
.chat-help-section:first-child { padding-top: 0; }
.chat-help-section + .chat-help-section { border-top: 1px solid var(--chat-border); }
.chat-help-explanation { line-height: 1.75; overflow-wrap: anywhere; }
.chat-help-step { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 50%; background: var(--chat-accent); color: var(--chat-on-accent); font-weight: 600; }
.chat-help-preview { min-width: 0; padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface-information); }
.chat-help-preview h2 { font-size: 1rem; margin: 0 0 12px; color: var(--chat-text-accent); }
.chat-help-example-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--chat-border-help-example); }
.chat-help-preview .btn { margin-top: 14px; white-space: normal; }
.chat-help-example-message { padding: 14px; margin-top: 12px; min-height: 70px; background: var(--chat-surface); border: 1px solid var(--chat-border-help-example); border-radius: 8px; }
.chat-help-tabs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; }
.chat-help-tabs span { padding: 6px 8px; border-radius: 7px; background: var(--chat-surface-accent-label); }
.chat-help-tabs span:first-child { background: var(--chat-accent); color: var(--chat-on-accent); }
.chat-help-avatar { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--chat-surface-help-avatar); color: var(--chat-text-accent); }
.chat-help-rank-example { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 14px; }
.chat-help-rank-track { width: 14px; border: 1px solid var(--chat-border-rank-meter); border-radius: 8px; background: linear-gradient(to top, var(--chat-rank-meter-fill) 50%, var(--chat-rank-meter-track) 50%); }

@media (max-width: 767px) {
    .chat-help-section { grid-template-columns: 1fr; gap: 14px; }
}

.chat-help-profile-notice { padding: 12px 16px; margin-bottom: 20px; border: 1px solid var(--chat-border); border-radius: 10px; background: var(--chat-surface-info); font-size: .85rem; }
.chat-help-profile-picture { text-align: center; margin-bottom: 20px; }
.chat-help-profile-picture img { display: inline-block; width: min(100%, 360px); height: auto; border-radius: 14px; }
.chat-help-profile-avatar { border-radius: 50%; object-fit: cover; }
.chat-help-profile .table th { width: 34%; }
.chat-help-profile .table td { overflow-wrap: anywhere; }
.chat-help-profile-essay { padding: 20px; line-height: 1.7; }
.chat-help-profile-essay h2 { font-size: 1.25rem; }
.chat-help-profile-example-note { color: var(--chat-text-muted); font-size: .85rem; margin-bottom: 0; }
.chat-help-realistic .chat-help-section { grid-template-columns: 1fr; gap: 16px; }
.chat-help-example { min-width: 0; padding: 20px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface); }
.chat-help-example-caption { margin-bottom: 16px; color: var(--chat-text-muted); font-size: .8rem; }
.chat-help-example .btn:disabled { opacity: 1; cursor: default; }
.chat-help-editor-toolbar { padding: 10px 14px; background: var(--chat-surface-info); border: 1px solid var(--chat-border); border-radius: 8px 8px 0 0; word-spacing: 12px; }
.chat-help-message-body { padding: 20px; line-height: 1.7; }
.chat-help-icon-action { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-left: 4px; border: 1px solid var(--chat-border); border-radius: 7px; background: var(--chat-surface); }

@media (max-width: 575px) {
    .chat-help-example { padding: 12px; }
}

.chat-help-profile-introduction { margin-bottom: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.chat-help-back { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--chat-border); }
.chat-help-back .btn { min-height: 40px; border-radius: 8px; }

.chat-help-back + .chat-logbook-help,
.chat-help-back + .chat-help-profile { margin-top: 20px; }

.chat-logbook-welcome-intro { display: flex; align-items: flex-start; gap: 24px; padding: 24px; border: 1px solid var(--chat-border); border-radius: 14px; background: var(--chat-surface-section-heading); line-height: 1.65; }
.chat-logbook-welcome-intro > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-logbook-welcome-intro h2 { margin: 0 0 12px; }
.chat-logbook-welcome-captain { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; flex-shrink: 0; border: 3px solid var(--chat-border-on-image); }
.chat-logbook-welcome-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.chat-logbook-welcome-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--chat-border); border-radius: 12px; background: var(--chat-surface); font-weight: 600; overflow-wrap: anywhere; transition: background .15s, border-color .15s; }
.chat-logbook-welcome-card:hover { background: var(--chat-surface-section-heading); border-color: var(--chat-accent); text-decoration: none; }
.chat-logbook-welcome-card:focus-visible { outline: 3px solid var(--chat-accent); outline-offset: 3px; }
.chat-logbook-welcome-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; color: var(--chat-accent); background: var(--chat-surface-section-heading); }
.chat-logbook-welcome-arrow { margin-left: auto; padding-left: 8px; }
.chat-logbook-welcome-registration { margin-top: 20px; text-align: center; }
.chat-logbook-welcome-registration .btn { padding: 10px 24px; white-space: normal; }

@media (max-width: 575px) {
    .chat-logbook-welcome-intro { flex-direction: column; gap: 16px; padding: 18px; }
    .chat-logbook-welcome-captain { width: 72px; height: 72px; }
    .chat-logbook-welcome-cards { grid-template-columns: 1fr; }
}

.chat-help-profile-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chat-account-settings { min-width: 0; }
.chat-account-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.chat-security-scroll { overflow-x: auto; }
.chat-security-grid { display: grid; grid-template-columns: minmax(140px, 1fr) repeat(3, minmax(62px, auto)); min-width: 340px; }
.chat-security-grid > div { float: none; width: auto; margin: 0; padding: 10px 6px; border-bottom: 1px solid var(--chat-border); }
.chat-security-grid > .hr { display: none; }
.chat-security-grid > [class^="headerCol"] { font-weight: 700; background: var(--chat-surface-muted); }

.chat-security-grid > .col2, .chat-security-grid > .col3, .chat-security-grid > .col4,
.chat-security-grid > .headerCol2, .chat-security-grid > .headerCol3, .chat-security-grid > .headerCol4 { text-align: center; }

.chat-security-grid input[type="radio"] { accent-color: var(--chat-accent-security); }
.chat-facebook-button { background: var(--chat-facebook-button); color: var(--chat-on-accent); padding: 10px 18px; }
.chat-facebook-button:hover, .chat-facebook-button:focus { background: var(--chat-facebook-button-hover); color: var(--chat-on-accent); }
.chat-delete-account .form-control { max-width: 360px; }
.chat-bring-buddy .panel { margin: 18px 0; padding: 16px; border: 1px solid var(--chat-border); border-radius: 10px; }
.chat-bring-buddy .panel-body { min-width: 0; overflow-x: auto; }
.chat-bring-buddy .input-group { margin-bottom: 10px; }
.chat-bring-buddy .input-group-addon { display: flex; align-items: center; padding: 6px 12px; background: var(--chat-surface-muted); border: 1px solid var(--chat-border); }
.chat-bring-buddy .pull-right { float: right; }
.chat-bring-buddy .pull-left { float: left; }
