/* Social screens keep the olive LCD, with the console's burgundy as their accent. */
body#chimera-console.friends-page #friends-main {
  --friends-accent:#8b244b; --friends-accent-dark:#6b1338;
  --friends-cream:#fff3df; --friends-ink:#304029; --friends-muted:#526541;
  --friends-line:#91a076; --friends-font:var(--lcd-font,ui-monospace,monospace);
}
#friends-main [hidden] {display:none!important}
.friends-page #friends-content {font:400 .8rem/1.5 var(--friends-font);color:var(--friends-ink)}
.friends-page .friends-icon {width:18px;height:18px;flex:none;fill:currentColor}
.friends-page .friends-heading-copy {display:flex;align-items:center;gap:12px;min-width:0}
.friends-page .friends-heading-copy>div {min-width:0}
.friends-page .friends-heading-art {width:64px;height:64px;flex:none;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(2px 3px 0 #30402925)}
body#chimera-console.friends-page .console-lcd-filter {--lcd-grid-x:linear-gradient(90deg,#30402908 1px,transparent 1px);--lcd-grid-y:linear-gradient(#30402906 1px,transparent 1px)}
body#chimera-console.friends-page #friends-main #friends-refresh {display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none}
body#chimera-console.friends-page #friends-main .account-heading {padding-bottom:14px;border-bottom:2px solid #8b244b45;align-items:center}
body#chimera-console.friends-page #friends-main .account-eyebrow {color:var(--friends-accent);font-weight:800;letter-spacing:.06em}
body#chimera-console.friends-page #friends-main .account-heading h1 {color:var(--friends-accent-dark)}
body#chimera-console.friends-page #friends-main button,
body#chimera-console.friends-page #friends-main .friends-actions a {
  min-height:38px;padding:8px 11px;border:1px solid #73865c;border-radius:5px;
  background:#e4ebcc;color:var(--friends-ink);box-shadow:0 2px 0 #9aa77d;
  font:700 .72rem/1.4 var(--friends-font);text-decoration:none;cursor:pointer;
  transition:background-color .15s,box-shadow .15s,transform .15s;
}
body#chimera-console.friends-page #friends-main button:hover:not(:disabled),
body#chimera-console.friends-page #friends-main .friends-actions a:hover {background:#f0f4dc;box-shadow:0 3px 0 #9aa77d;transform:translateY(-1px)}
body#chimera-console.friends-page #friends-main button:active:not(:disabled) {transform:translateY(1px);box-shadow:none}
body#chimera-console.friends-page #friends-main button:disabled {opacity:.55;cursor:wait}
body#chimera-console.friends-page #friends-main :is(button,a,input,textarea):focus-visible {outline:3px solid var(--friends-accent);outline-offset:3px}
body#chimera-console.friends-page #friends-main input,
body#chimera-console.friends-page #friends-main textarea {background:#f0f3dc;color:var(--friends-ink);border:1px solid #819268;border-radius:5px;box-shadow:inset 0 2px 0 #67754f15;font-family:var(--friends-font)}
body#chimera-console.friends-page #friends-main :is(.friends-primary,button[type=submit]),
body#chimera-console.friends-page #friends-main .friends-actions a {
  background:var(--friends-accent);color:var(--friends-cream);border-color:var(--friends-accent-dark);box-shadow:0 2px 0 #59172f;
}
body#chimera-console.friends-page #friends-main :is(.friends-primary,button[type=submit]):hover:not(:disabled),
body#chimera-console.friends-page #friends-main .friends-actions a:hover {background:var(--friends-accent-dark);box-shadow:0 3px 0 #59172f}
body#chimera-console.console-page.friends-page #friends-main .friends-code-panel {
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px 12px;
  padding:14px;margin-bottom:16px;border:1px solid #6b1338;border-radius:7px;
  color:var(--friends-cream);background:linear-gradient(115deg,#74203f,#943959);
  box-shadow:0 3px 0 #53603d40;position:relative;
}
.friends-page .friends-code-seal {display:grid;place-items:center;width:38px;height:38px;border:1px solid #fff3df55;background:#fff3df12;border-radius:5px}
.friends-page .friends-code-seal .friends-icon {width:22px;height:22px}
.friends-page .friends-code-identity {min-width:0}
.friends-page .friends-code-identity>span {font-size:.64rem;letter-spacing:.06em;text-transform:uppercase;color:#f1d3bf}
.friends-page .friends-code-panel strong {display:block;letter-spacing:.06em;font-size:.95rem;margin-top:2px;overflow-wrap:anywhere}
body#chimera-console.friends-page #friends-main #friends-copy {background:#fff0d3;color:#6b1338;border-color:#eed7b2;box-shadow:0 2px 0 #502332}
body#chimera-console.friends-page #friends-main #friends-copy:hover {background:#fff9eb}
body#chimera-console.friends-page #friends-main #friends-share {grid-column:1/-1;width:100%;min-width:0;min-height:30px;margin:0;padding:6px 9px;font-size:.66rem;background:#5f1f36;color:#ffe9d1;border:1px solid #c9809366;box-shadow:inset 0 1px 3px #35121d40}
.friends-page .friends-tabs {display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px;padding:0 0 12px;border-bottom:1px solid var(--friends-line)}
body#chimera-console.friends-page #friends-main .friends-tabs button {display:flex;align-items:center;justify-content:center;gap:7px;flex:1 1 auto;min-width:0;padding:9px 10px;font-size:.72rem}
body#chimera-console.friends-page #friends-main .friends-tabs button[aria-pressed=true] {background:var(--friends-accent);color:var(--friends-cream);border-color:var(--friends-accent-dark);box-shadow:0 3px 0 #59172f}
.friends-page .friends-count {display:inline-grid;place-items:center;min-width:20px;min-height:20px;padding:1px 5px;border-radius:4px;background:var(--friends-accent);color:var(--friends-cream);font:800 .64rem/1.4 var(--friends-font)}
.friends-page .friends-count:empty {display:none}
.friends-page [aria-pressed=true] .friends-count {background:var(--friends-cream);color:var(--friends-accent-dark)}
body#chimera-console.friends-page #friends-main h2 {display:flex;align-items:center;gap:9px;font:800 .9rem/1.4 var(--friends-font);margin:18px 0 11px;color:var(--friends-ink)}
.friends-page h2>.friends-icon {color:var(--friends-accent)}
.friends-page .friends-list {list-style:none;padding:0;margin:0 0 16px;display:grid;gap:10px}
.friends-page .friends-list:empty {display:none}
.friends-page .friends-card {
  --notice-accent:#8b244b; --notice-tint:#f3e3d5;
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px;
  border:1px solid #8e9b70;border-radius:7px;background:#e9eed4;box-shadow:0 3px 0 #82946728;
  min-width:0;overflow-wrap:anywhere;
}
.friends-page .friends-person {display:flex;gap:12px;align-items:center;flex:1 1 200px;min-width:0}
.friends-page .friends-person>div {min-width:0;overflow-wrap:anywhere}
.friends-page .friends-person strong {display:block;font-size:.88rem;line-height:1.5}
.friends-page .friends-person small {display:block;font-size:.66rem;margin-top:4px;color:var(--friends-muted)}
.friends-page .trainer-avatar {flex:none;width:50px;height:54px;border:2px solid #a4ad89;border-radius:6px;background-color:#d1dcb0;box-shadow:2px 2px 0 #7a8c5b30;image-rendering:pixelated}
.friends-page [data-online=true] .trainer-avatar {border-color:#487851;background-color:#d6e4c1}
.friends-page .friends-actions {display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.friends-page .friends-actions a {display:inline-flex;align-items:center;justify-content:center}
body#chimera-console.friends-page #friends-main .friends-danger {background:transparent;color:#704452;border-color:#af9d8e;box-shadow:none;font-size:.65rem;min-height:32px;padding:5px 8px}
body#chimera-console.friends-page #friends-main .friends-danger:hover:not(:disabled) {background:#f1dcd3;color:#6b1338;box-shadow:none}
body#chimera-console.friends-page #friends-main .friends-duel-action {background:#e9dcaf;border-color:#aa8d48;color:#674b1e;box-shadow:0 2px 0 #bda775}
body#chimera-console.friends-page #friends-main .friends-duel-action:hover:not(:disabled) {background:#f6e9be}
.friends-page .friends-person .friends-online,.friends-page .friends-person .friends-offline {display:inline-flex;align-items:center;gap:5px;padding:2px 6px;border-radius:3px;font-size:.61rem;line-height:1.4}
.friends-page .friends-person .friends-online {color:#2f613c;background:#d2e4bd}
.friends-page .friends-person .friends-offline {color:#586449;background:#dce2c9}
.friends-page .friends-online::before,.friends-page .friends-offline::before {content:'';width:6px;height:6px;flex:none;background:currentColor;box-shadow:0 0 0 2px #ffffff40}
.friends-page .friends-hint {font-size:.72rem;line-height:1.6;margin:8px 0;color:var(--friends-muted)}
.friends-page .friends-empty {padding:18px 16px 18px 20px;border:1px dashed #98a477;border-left:3px solid #9eaa7d;border-radius:5px;line-height:1.7;background:#dfe7c3;color:#526541}
.friends-page .friends-search-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px}
body#chimera-console.friends-page #friends-main .friends-search-controls input {min-width:0;width:100%;margin:0}
/* Account forms make submit buttons full-width; this inline search keeps its field first. */
body#chimera-console.friends-page #friends-main .friends-search-controls button {width:auto;min-height:44px;margin:0}
.friends-page .friends-section-heading {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}
body#chimera-console.friends-page #friends-main .friends-section-heading h2 {margin:0}
body#chimera-console.friends-page #friends-main #friends-read-events {min-height:34px;font-size:.65rem;background:transparent;box-shadow:none}
.friends-page #friends-settings-form {display:grid;gap:10px}
body#chimera-console.friends-page #friends-main .friends-check {display:flex;align-items:center;gap:10px;line-height:1.5;margin:0;padding:12px;min-height:44px;background:#e6edce;border:1px solid #a3af89;border-radius:5px}
body#chimera-console.friends-page #friends-main .friends-check input {min-height:18px;height:18px;width:18px;margin:0;padding:0;flex:none;accent-color:var(--friends-accent)}
.friends-page #friends-status,.friends-page #friends-error {font:700 .8rem/1.6 var(--friends-font);padding:12px;border:1px solid #7d8d60;border-left-width:4px;border-radius:5px;background:#e2edcb}
.friends-page #friends-error {color:#6b1338;border-color:#b67681;background:#f4e0d4}
/* Category, icon and unread label work together: color is never the only cue. */
.friends-page .friends-notice {display:grid;grid-template-columns:40px minmax(0,1fr);align-items:start;gap:10px 12px;border-left:4px solid #98a780}
.friends-page .friends-notice[data-category=duel],.friends-page .friends-duel-card {--notice-accent:#805a20;--notice-tint:#efe0b6}
.friends-page .friends-notice[data-category=progression] {--notice-accent:#786023;--notice-tint:#eee4b8}
.friends-page .friends-notice[data-category=gift] {--notice-accent:#356750;--notice-tint:#d5e6c6}
.friends-page .friends-notice[data-category=gallery] {--notice-accent:#a13b61;--notice-tint:#f2dce0}
.friends-page .friends-notice[data-category=moderation] {--notice-accent:#904830;--notice-tint:#f0ddca}
.friends-page .friends-notice-icon {display:grid;place-items:center;width:40px;height:40px;flex:none;border:1px solid var(--notice-accent);border-radius:6px;color:var(--notice-accent);background:var(--notice-tint);box-shadow:2px 2px 0 #30402912}
.friends-page .friends-notice-icon .friends-icon {width:20px;height:20px}
.friends-page .friends-notice-copy {min-width:0}
.friends-page .friends-notice-copy>strong {display:block;font-size:.8rem;line-height:1.6;font-weight:750}
.friends-page .friends-notice-copy>p {font-size:.73rem;line-height:1.6;margin:5px 0 0;color:var(--friends-muted)}
.friends-page .friends-notice-meta {display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:5px;color:var(--notice-accent);font:800 .6rem/1.5 var(--friends-font);letter-spacing:.04em;text-transform:uppercase}
.friends-page .friends-unread-label,.friends-page .friends-person .friends-unread-label {display:inline-block;width:fit-content;background:var(--friends-accent);color:var(--friends-cream);padding:2px 6px;border-radius:3px;font-size:.6rem;font-weight:700;line-height:1.5;letter-spacing:0;text-transform:none}
.friends-page .friends-unread {border-left:4px solid var(--notice-accent);background:#f0f2dc;box-shadow:0 3px 0 #82946735}
.friends-page .friends-notice-footer {grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding-top:8px;border-top:1px solid #9eaa802f}
.friends-page .friends-date {font-size:.62rem;line-height:1.5;color:#5d6b4c}
body#chimera-console.friends-page #friends-main .friends-notice .friends-actions :is(button,a) {min-height:32px;padding:6px 8px;font-size:.63rem}
.friends-page .friends-inbox-card {--notice-accent:#356750;background:#e2ecd0}
.friends-page .friends-duel-card {background:#e9e8c7}
.friends-page .friends-duel-copy {flex:1;min-width:0}.friends-page .friends-duel-copy strong {display:block}
.friends-page .friends-duel-copy small {display:block;font-size:.68rem;line-height:1.5;margin-top:4px}
/* The conversation still fills the LCD when opened. */
.friends-page #friends-messages {display:flex;flex-direction:column;gap:10px;list-style:none;margin:12px 0;padding:4px 3px;max-height:40dvh;overflow:auto;overscroll-behavior:contain}
.friends-page .friends-message {max-width:88%;align-self:flex-start;border:1px solid #9ca980;background:#edf1d9;padding:11px 13px;border-radius:8px 8px 8px 2px;overflow-wrap:anywhere;white-space:pre-wrap;box-shadow:0 2px 0 #82946722;line-height:1.6}
.friends-page .friends-message[data-own=true] {align-self:flex-end;background:#ead9d5;color:#5c293b;border-color:#bd8e9c;border-radius:8px 8px 2px 8px}
.friends-page .friends-message time {display:block;font-size:.6rem;opacity:.8;margin-top:5px}
.friends-page #friends-message-form {display:grid;gap:8px}.friends-page #friends-message {width:100%;min-width:0;resize:vertical}
body#chimera-console.friends-chat-open .account-heading,body#chimera-console.friends-chat-open .friends-code-panel,body#chimera-console.friends-chat-open .friends-tabs {display:none}
body#chimera-console.friends-chat-open #friends-main {display:flex;flex-direction:column}
body#chimera-console.friends-chat-open #friends-content,body#chimera-console.friends-chat-open #friends-contacts-panel {display:flex;flex-direction:column;flex:1;min-height:0}
body#chimera-console.friends-chat-open #friends-conversation {display:flex;flex-direction:column;min-height:0;flex:1}
body#chimera-console.friends-chat-open #friends-chat-back {align-self:flex-start}
body#chimera-console.friends-chat-open #friends-messages {min-height:65px;flex:1;max-height:none}
body#chimera-console.friends-chat-open #friends-message-form {flex:none}
body#chimera-console.friends-chat-open #friends-message {resize:none;min-height:65px}
body#chimera-console.friends-chat-open #friends-conversation>.friends-section-heading {flex-direction:row;align-items:center}
@media(max-width:560px) {
  .friends-page .friends-heading-art {width:42px;height:46px}.friends-page .friends-heading-copy {gap:8px;flex:1}
  body#chimera-console.friends-page #friends-main .account-heading {flex-direction:row;flex-wrap:nowrap;align-items:flex-start;gap:8px;padding-bottom:10px}
  body#chimera-console.friends-page #friends-main #friends-refresh {width:36px;min-height:36px;padding:7px;margin:0}
  .friends-page #friends-refresh>span {display:none}
  body#chimera-console.console-page.friends-page #friends-main .friends-code-panel {gap:8px;padding:11px;grid-template-columns:minmax(0,1fr) auto}
  .friends-page .friends-code-seal {display:none}.friends-page .friends-code-panel strong {font-size:.8rem;letter-spacing:.025em}
  body#chimera-console.friends-page #friends-main #friends-copy {min-height:36px;font-size:.63rem;padding:6px 8px}
  .friends-page .friends-tabs {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
  body#chimera-console.friends-page #friends-main .friends-tabs button {grid-column:span 2;padding:8px 4px;gap:5px;min-height:44px;font-size:.65rem}
  body#chimera-console.friends-page #friends-main .friends-tabs button:nth-child(n+4) {grid-column:span 3}
  .friends-page .friends-tabs .friends-icon {width:14px;height:14px}
  .friends-page .friends-card {padding:11px;gap:11px}
  .friends-page .friends-person {flex-basis:100%}
  .friends-page .friends-card>.friends-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;padding-top:10px;border-top:1px solid #9eaa8040}
  .friends-page .friends-card>.friends-actions>:only-child {grid-column:1/-1}
  .friends-page .friends-notice {grid-template-columns:32px minmax(0,1fr);gap:9px}
  .friends-page .friends-notice-icon {width:32px;height:34px}.friends-page .friends-notice-icon .friends-icon {width:17px;height:17px}
  .friends-page .friends-notice-footer {grid-column:1/-1}
  .friends-page .friends-notice-footer .friends-actions {width:100%}
  body#chimera-console.friends-page #friends-main .friends-notice .friends-actions :is(button,a) {min-height:38px}
  .friends-page .friends-search-controls {grid-template-columns:minmax(0,1fr)}
}

.friends-referral {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:11px}
.friends-referral p {margin:0}.friends-referral a {font-weight:700;color:var(--lcd-burgundy,#75243f)}
.friends-referral:has(p[hidden]):has(a[hidden]) {display:none}
