/* VALHALLA · crisp white, cool neutrals and a restrained blue accent.
   Color overrides only; page layout, visibility and motion remain with their components. */
:root{color-scheme:light;--surface:#fff;--surface-muted:#f5f7fa;--paper:var(--surface-muted);--ink:#172033;--muted:#617084;--line:#e2e8f0;--line-strong:#cbd5e1;--blue:#2563eb;--blue-hover:#1d4ed8;--accent-soft:#eff6ff;--accent-line:#bfdbfe;--soft-shadow:0 5px 24px #17203308;--gold:var(--blue);--gold-deep:var(--blue);--gold-hover:var(--blue-hover);--gold-soft:var(--accent-soft);--gold-line:var(--line)}
body{background-color:var(--paper);color:var(--ink)}
header{background:#fff;border-color:var(--line);box-shadow:0 1px 0 #17203308}
.logo{color:#172033;text-shadow:0 1px 0 #fff}
.logo .mark{color:var(--blue);background:var(--surface);border:1px solid #cbd5e1;box-shadow:inset 0 0 0 3px #fff,0 3px 12px #1720330d}
.search{background:#f5f7fa;color:var(--muted);box-shadow:inset 0 0 0 1px #e2e8f0}.search input{color:var(--ink)}
:where(input,textarea)::placeholder{color:#617084;opacity:1}
.avatar,.avatar img,.flag{background:#eff6ff;color:var(--blue)}
.card,.post,.notice,dialog{background:#fff;border-color:var(--line);box-shadow:var(--soft-shadow)}
.post-footer,.news-card-actions,.news-article-actions,.admin-table :is(th,td),.comment-signin,.post-comments .comment{border-color:var(--line)}
.post p,.country-description,.news-article-body,.service-panel{color:#475569}
.meta,.form-note,.local-note,.pending,.empty,.side-note,.label,.site-footer,.post-footer,.news-byline,.news-standfirst,.news-card>p,.news-article-actions,.news-close-poll,.poll-result,.poll-total,.member-profile-stats,.member-ip-time,.long-notice-meta,.notice-motion{color:var(--muted)}
.card h3 small,.feed-top h2 small,.directory-membership,.directory-count,.nation-card dt,.nation-note,.nation-detail,.nation-no-room,.country-stats,.country-tile p,.keyword,.nation p,.nation>span:last-child{color:var(--muted)}
nav button,.bottom button,.tabs button,.directory-tabs button{color:#617084}
nav button.active,.bottom button.active{color:var(--blue)}
nav button.active{background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--line)}
nav button.active .nav-symbol,.bottom button.active .nav-symbol{background:var(--blue);color:#fff;box-shadow:0 3px 9px #2563eb1f}
.bottom{background:#ffffffef;border-color:var(--line);box-shadow:0 7px 30px #1720330d}
.blue,.mobile-write{background:var(--blue);color:#fff;box-shadow:0 4px 12px #2563eb14}
.blue:hover,.mobile-write:hover{background:var(--blue-hover)}
.write,.mobile-write{box-shadow:0 7px 22px #2563eb24}
.tabs .active,.directory-tabs button.active{color:var(--blue);background:#eff6ff;box-shadow:inset 0 0 0 1px var(--line)}
.directory-tabs{background:#eef2f6}
.filters button,.service-types button{background:#fff;border-color:var(--line);color:#617084}
.filters button.active{background:#2563eb;border-color:#2563eb;color:#fff}
.service-types button.active{background:var(--accent-soft);color:var(--blue);border-color:#93c5fd}
.notice b,.tag,.news-category,.news-poll-badge,.service-kind,.user-country{background:var(--accent-soft);color:var(--blue)}
.news-draft{background:#f1f5f9;color:#617084}
.user-title{background:var(--title-background,#fffbf2);border-color:var(--title-border,#ddc694);color:var(--title-ink,#775722)}
.news-eyebrow,.welcome small,.keyword b,.event .tagline,.event button,.event p{color:var(--blue)}
.welcome,.event{background:linear-gradient(145deg,#fff,#f5f7fa);border-color:var(--line)}
.welcome p{color:var(--muted)}
.content-link,.directory-refresh,.directory-manage-link a,.news-card-actions,.post-country-name,.admin-directory-link,.profile-photo-row button,.local-note button,.auth-links button,.post-footer .liked,.post-comments h2 span,.ads-manager-heading button,.ad-admin-card a,.service-actions button,[data-service-status],.change-after{color:var(--blue)}
.auth-links .blue,.service-actions .blue{color:#fff}
#community-notice-controls button{color:var(--blue);border-color:var(--line);background:#fff}
.profile-cover{background:linear-gradient(115deg,#eef2f6,#fff 60%,#dbeafe)}
.avatar-profile{border-color:#fff;box-shadow:0 3px 14px #17203314}
.comment,.recovery-code{background:#f5f7fa}
.toast{background:#172033;color:#fff;box-shadow:0 8px 28px #17203329}
dialog::backdrop{background:#17203365}
.art{background:linear-gradient(120deg,#172033,#334155)}.art small{color:#bfdbfe}
/* Inputs retain their established dimensions and native interaction behavior. */
dialog :is(input,textarea,select),.application-card input:not([type="checkbox"]),.application-card :is(select,textarea),.service-panel input:not([type="checkbox"]),.service-panel :is(select,textarea),.ad-editor input:not([type=checkbox]),.directory-search input,.directory-filters select,.admin-tools select,.inline-comment-form textarea,.chat-composer textarea,#notice-text{background-color:#fff;color:var(--ink);border-color:#cbd5e1;outline-color:var(--blue)}
input[type=checkbox],input[type=radio],.poll-option-name input{accent-color:var(--blue)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.logo:focus-visible,.nation-name-link:focus-visible,.post-title-link:focus-visible,.content-link:focus-visible{outline-color:var(--blue)}
/* Keep the original fixed Nephthys emblem visible through the directory cards. */
body:has(.nation-directory){background-color:var(--paper)}
.nation-directory .nation-card{background:#ffffffc7;border-color:#e2e8f0;box-shadow:0 2px 10px #17203306}
.nation-directory .application-card,.nation-directory .directory-rules{background:#ffffffdf;border-color:var(--line)}
.directory-source{background:#f5f7fae8;border-color:var(--line)}
.directory-source p,.directory-rules summary{color:#475569}.directory-source small,.directory-rules p{color:var(--muted)}
.source-badge:not(.source-live),.nation-initial,.nation-card .nation-category{background:#f1f5f9;color:#475569}
.directory-group{border-top-color:#cbd5e1}.directory-group-heading h3,.nation-card :is(h3,h4){color:var(--ink)}
.directory-group-heading>span,.directory-filter-row .directory-count,.directory-group-empty,.nation-card .nation-leader{color:#617084}
.directory-guidance,.directory-group-description{background:#f1f5f9de;border-left-color:#cbd5e1;color:#475569}
.nation-name-link{text-decoration-color:#94a3b8}.room-link-indicator{color:var(--blue)}
/* Selected country themes remain the country owner's choice. */
.country-tile:not([class*="theme-"]){--country-color:var(--blue);--country-bg:var(--accent-soft)}
.country-actions .blue{background:var(--country-color);color:#fff}
.post-recruitment{border-top-color:#2563eb}.post-recruitment h3,.post-recruitment.post-detail h1{background:#eff6ff;color:#1e40af}.post-recruitment .tag{background:#dbeafe;color:#1e40af}
.service-comparison strong{color:var(--blue);background:#eff6ff}.service-comparison small,.service-comparison span,.change-before{color:var(--muted)}
.poll-option{border-color:var(--line)}.poll-selected{border-color:#93c5fd;background:#eff6ff}.poll-track{background:#e2e8f0}.poll-track>span{background:#93c5fd}.poll-selected .poll-track>span{background:var(--blue)}
#news-poll-fields{border-color:var(--line)}#news-poll-fields legend{color:var(--muted)}
.news-photo img{background:#f5f7fa}.news-photo-preview{border-color:var(--line)}
.feed-pinned{background:linear-gradient(135deg,#f5f7fa,#fff);border-color:#e2e8f0}.pinned-heading h3{color:#172033}.pinned-heading p{color:#617084}.pinned-marker{background:#dbeafe;color:#2563eb}.pin-label{background:#eff6ff;color:#1e40af}.post-pin-control{color:var(--blue)}
/* Advertisements keep their original photos and contain sizing. */
.ad-slot{background:#f5f7fa;border-color:var(--line)}.ad-label{color:#617084;border-color:#e2e8f0}.ad-label span{color:#617084}.ad-placeholder h1{color:#475569}.ad-placeholder p,.ad-counter,.ad-image-error,.ads-list-heading>span,.ad-admin-card p{color:var(--muted)}
.ad-grid,.ad-grid:before,.ad-grid:after{border-color:#94a3b8}.ad-slide,.ad-upload-preview,.ad-admin-thumb{background:#f5f7fa;border-color:#cbd5e1}.ad-controls{background:#fff}.ad-controls>button,.ad-editor-actions button,.ad-row-actions button{border-color:var(--line)}
.ad-dots button:after{background:#cbd5e1}.ad-dots button.active:after{background:var(--blue)}.ad-editor{background:#f5f7fa;border-color:var(--line)}.ad-upload-preview{color:#617084}.ad-admin-card{border-color:var(--line)}
/* Chat follows the same palette; author and system states retain clear separation. */
.chat-eyebrow,.chat-back{color:var(--blue)}.chat-room-mark{background:#dbeafe;color:var(--blue)}.chat-role,.chat-pin-label{background:var(--accent-soft);color:#1e40af}
.chat-room-meta,.chat-message-byline time,.chat-deleted time,.chat-message-tools button,.chat-empty,.chat-composer-footer>span{color:var(--muted)}
.chat-messages{background:#f5f7fa}.chat-message{background:#f1f5f9}.chat-message.chat-own{background:#eff6ff;box-shadow:inset 0 0 0 1px #bfdbfe}.chat-deleted{background:transparent;border-color:#cbd5e1;color:#617084}
.chat-composer{border-color:var(--line);background:#fff}.chat-notices{border-color:var(--line);background:#eff6ff}.chat-notices summary{color:#1e40af}.chat-notices summary b{background:#dbeafe;color:#1e40af}.chat-pinned-message{background:#fff;border-left-color:#60a5fa}.chat-member{border-color:var(--line)}
/* Warning and positive states are semantic, independent of the brand accent. */
.error,.danger,.post-footer .danger,.chat-message-tools .danger,.news-photo-preview button{color:#aa3431}.source-live{color:#24644c;background:#e1f5e9}.ad-state.is-live{color:#226345;background:#e6f4ec}

/* Administrator-assigned title colors remain readable on a soft tinted badge. */
.title-color-editor{margin:18px 0;padding:16px;border:1px solid var(--line);border-radius:12px;background:#f5f7fa}
.title-color-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.title-color-editor input[type="color"]{width:64px;min-height:44px;padding:4px;margin:0;border-radius:10px;cursor:pointer;background:#fff}
.title-color-controls button{color:var(--blue);font-size:12px;text-decoration:underline;text-underline-offset:3px}
.title-color-swatches{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}
.title-color-swatch{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:7px 9px;font-size:11px;background:#fff}
.title-color-swatch>span:first-child{width:15px;height:15px;border-radius:50%;background:var(--swatch-color);box-shadow:inset 0 0 0 1px #00000012}
.title-color-swatch[aria-pressed="true"]{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue);font-weight:700}
.title-preview-label{font-size:12px;font-weight:700;margin:18px 0 8px}
.title-badge-preview{min-height:45px;display:flex;align-items:center;padding:10px;border:1px dashed var(--line);border-radius:8px;background:#fff}
.title-badge-preview .user-title{font-size:12px}

.feed-credit{margin:28px 0 0;padding:16px 12px 24px;text-align:center;font-size:13px;line-height:1.6;color:var(--muted)}.feed-credit strong{font-weight:600;color:var(--blue)}

.member-ip-link{color:var(--blue);text-decoration:underline;text-underline-offset:3px;user-select:text;overflow-wrap:anywhere}.member-ip-link:hover{opacity:.8}.member-ip-link:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:3px}

.member-ip-map-label{display:inline-block;margin-left:5px;font-family:inherit;font-size:11px;white-space:nowrap;text-decoration:none}.member-location-facts{margin:18px 0;display:grid;gap:10px}.member-location-facts>div{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px}.member-location-facts dt{color:var(--muted)}.member-location-facts dd{margin:0;overflow-wrap:anywhere}.member-location-map{display:block;box-sizing:border-box;width:100%;height:clamp(230px,45vh,340px);margin:18px 0 12px;border:1px solid var(--line);border-radius:14px;background:#f5f7fa}.member-location-links{display:flex;flex-wrap:wrap;gap:12px 20px}.member-location-links a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
