/* Commonroom: one quiet visual language for the entire application. */
@font-face {
  font-family: 'Carrois Gothic';
  src: url('/fonts/CarroisGothic-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Carrois Gothic SC';
  src: url('/fonts/CarroisGothicSC-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --font-body: 'Carrois Gothic', sans-serif;
  --font-display: 'Carrois Gothic SC', sans-serif;
  --bg: #f3f2ec;
  --surface: #fcfbf7;
  --ink: #353e37;
  --muted: #6c756a;
  --line: #ddded4;
  --green: #d5deca;
  --deep: #4e604d;
  --soft: #eaede3;
  --sage: #829279;
  --clay: #9e7d6c;
  --stone: #e7e5dc;
  --radius: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { background: var(--bg); color: var(--ink); }
::selection { background: #d6decb; color: var(--muted); }
button, input, select, textarea { font-family: var(--font-body); }
h1, h2, h3, .brand, .brand-mark, .eyebrow, .nav, .nav-label,
.btn, .feed-tabs, th, label, .pill, .post-name, .card-name,
.metric b, .rail-heading, .mobile-nav, .modal-header,
.message-meta, .steering-editor summary, .backroom-steers summary {
  font-family: var(--font-display);
  font-weight: 400;
}
h1, h2, h3 { color: var(--ink); }
h2 { font-size: 22px; letter-spacing: .1px; }
h3 { font-size: 17px; letter-spacing: .2px; }
.muted, .tiny, .help, .footer-note { color: var(--muted); }
.eyebrow { letter-spacing: 1.9px; font-size: 11px; }
.dot { background: var(--sage); }
.sidebar { background: var(--bg); border-color: var(--line); padding-top: 31px; }
.sidebar .brand { font-size: 22px; letter-spacing: -.7px; gap: 8px; }
.brand { font-family: var(--font-display); font-weight: 400; letter-spacing: -.5px; }
.brand-mark, .sidebar .brand-mark {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--deep);
  background: var(--green);
  border-radius: 9px;
}
.brand-sub { color: var(--muted); letter-spacing: .4px; line-height: 1.5; font-size: 11px; }
.nav-label { color: var(--muted); font-size: 10px; letter-spacing: 1.5px; }
.nav a { color: var(--muted); font-size: 12px; letter-spacing: .15px; border-radius: 7px; font-weight: 400; gap: 10px; padding-left: 10px; padding-right: 10px; }
.nav a > span:not(.count) { white-space: nowrap; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.active { background: #e3e8db; color: var(--deep); }
.nav a .count { background: #d6decc; color: var(--deep); font-size: 11px; }
.sidebar-note { border-color: var(--line); border-radius: 11px; background: #eceee5; padding: 16px 13px; }
.sidebar-note p, .sidebar-footer { color: var(--muted); }
.sidebar-note .eyebrow { font-size: 10px; font-weight: 400; line-height: 1.8; }
.sidebar-footer { font-size: 11px; }
.topbar { background: #f8f7f2; border-color: var(--line); }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 400; }
.top-search { background: #eceee6; color: var(--muted); border: 1px solid transparent; }
.top-search:focus-within { border-color: #c2cbb6; }
.top-search input { font-size: 12px; }
.top-search kbd { color: var(--muted); border-color: #d5d9cc; }
.user-chip { color: var(--deep); font-size: 12px; }
.user-avatar { background: #e4e8db; color: var(--deep); font-family: var(--font-display); font-weight: 400; }
.user-avatar { position: relative; overflow: hidden; flex-shrink: 0; vertical-align: middle; }
.user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.reply-heading { display: flex; align-items: center; gap: 9px; }
.reply-heading .user-avatar { width: 26px; height: 26px; font-size: 11px; }
.refresh-x-profile { display: inline-flex; margin-top: 9px; font-size: 11px; }
.suggestion-evidence { margin: 18px 0; padding: 15px 18px; border-left: 2px solid var(--sage); background: var(--soft); color: var(--muted); font-size: 13px; line-height: 1.8; max-height: 230px; overflow: auto; white-space: pre-wrap; }
.dossier-unlock { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; background: var(--soft); color: var(--deep); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-top: 20px; }
.dossier-unlock > span { flex: 1; }
.dossier-unlock strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 16px; }
.dossier-unlock small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.7; }
.dossier-hero { display: grid; grid-template-columns: minmax(180px,240px) 1fr; gap: 25px; align-items: center; }
.dossier-hero .avatar { width: 100%; aspect-ratio: 1; background: var(--soft); border-radius: 12px; }
.dossier-hero progress { width: 100%; height: 8px; accent-color: var(--sage); }
.dossier-category { margin: 22px 0; }
.dossier-category h3 { color: var(--deep); }
.dossier-attribute { border-bottom: 1px solid var(--line); padding: 13px 0; font-size: 13px; color: var(--muted); line-height: 1.8; }
.dossier-attribute summary { cursor: pointer; color: var(--ink); }
.dossier-attribute blockquote { margin: 12px 0; padding: 0 12px; border-left: 2px solid var(--line); }
.dossier-attribute small { font-size: 11px; }
@media (max-width: 580px) { .dossier-hero { grid-template-columns: 1fr; gap: 18px; } .dossier-hero .avatar { max-width: 250px; margin: auto; } }
.dev-banner { background: #eee8db; border-color: #e1d9c9; color: #786b56; font-size: 11px; line-height: 1.7; }
.btn {
  border-radius: 7px;
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-display);
  letter-spacing: .25px;
  font-size: 13px;
  font-weight: 400;
  transition: background .16s, border-color .16s, color .16s;
}
.btn:hover { background: var(--soft); border-color: #c2cbb7; }
.btn.primary { background: var(--deep); border-color: var(--deep); color: #fafbf6; }
.btn.primary:hover { background: #3f503f; border-color: #3f503f; }
.btn.lime { color: var(--deep); background: var(--green); border-color: #cbd5be; }
.btn.small { font-size: 12px; border-radius: 6px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger, .text-btn.danger { color: #986d5d; }
.icon-btn { border-radius: 7px; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--deep); }
.text-btn { color: var(--deep); font-family: var(--font-display); font-size: 13px; font-weight: 400; }
.text-btn:hover { color: var(--muted); }
.text-btn.tiny { font-size: 11px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline-color: #899b7b;
  outline-width: 2px;
  outline-offset: 3px;
}
input, textarea, select { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: 7px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
label { color: var(--deep); font-size: 13px; letter-spacing: .25px; font-weight: 400; }
label.check { font-family: var(--font-body); letter-spacing: 0; font-size: 12px; }
.pill { background: var(--soft); color: var(--muted); font-size: 11px; border-radius: 4px; letter-spacing: .2px; }
.pill.example { background: #edede6; color: var(--muted); }
.pill.warn { background: #eee7d6; color: #87714e; }
.pill.danger { background: #efe2da; color: #946c5a; }
.hero {
  background: linear-gradient(125deg, #e7ecdf, #edede5);
  border-color: #dce2d2;
  border-radius: 15px;
  padding-top: 32px;
}
.hero h1 { font-family: var(--font-display); font-size: 44px; font-weight: 400; letter-spacing: -.6px; line-height: 1.15; max-width: 475px; }
.hero .eyebrow { font-size: 10px; color: var(--muted); letter-spacing: 1.7px; }
.hero p { color: var(--muted); font-size: 12px; line-height: 1.9; }
.hero-art .avatar { filter: none; }
.hero-art .spark { color: var(--muted); font-family: var(--font-display); }
.hero-art .orbit { border-color: #acb99a77; }
.hero-art .bubble { color: var(--deep); background: #f5f7ee; border-color: #d7dfcb; font-size: 11px; border-radius: 7px; }
.stats-line { color: var(--muted); font-size: 11px; padding-top: 19px; }
.section-heading { margin-top: 30px; margin-bottom: 17px; }
.section-heading h2 { font-size: 20px; font-weight: 400; letter-spacing: .1px; }
.section-heading .caption { color: var(--muted); font-size: 12px; font-family: var(--font-body); }
.character-card { background: var(--surface); border-color: var(--line); border-radius: 12px; padding: 16px; }
.character-card:hover { border-color: #b8c3ab; transform: none; }
.portrait-stage { border-radius: 8px; background: var(--tint); }
.portrait-stage .species { color: var(--muted); font-size: 9px; letter-spacing: 1.2px; }
.portrait-stage .open-profile { color: var(--muted); }
.character-card:hover .portrait-stage .avatar { transform: translateY(7px); }
.character-card h3 { font-size: 18px; font-weight: 400; }
.character-card .tagline { color: var(--muted); font-size: 12px; line-height: 1.65; min-height: 40px; }
.character-card .traits { color: var(--muted); font-size: 10px; }
.character-card .chat-btn { font-size: 12px; padding: 9px; }
.feed-tabs { border-color: var(--line); gap: 24px; }
.feed-tabs button { color: var(--muted); font-size: 13px; font-family: var(--font-display); letter-spacing: .3px; font-weight: 400; }
.feed-tabs button.active { color: var(--deep); }
.feed-tabs button.active:after { background: #859477; }
.board-tabs { margin-bottom: 27px; }
.board-tabs button { display: inline-flex; gap: 8px; align-items: center; }
.board-tabs .icon { width: 17px; height: 17px; }
.composer, .post, .rail-card, .data-card, .conversation-item, .discovery, .metric, .table-wrap {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  border-radius: 12px;
}
.composer textarea { font-size: 13px; }
.composer-bottom { border-color: #e7e8df; }
.composer-bottom select { background: var(--soft); border-color: transparent; color: var(--deep); font-size: 12px; }
.composer-hint { color: var(--muted); font-size: 11px; }
.post { padding: 21px; margin-bottom: 14px; }
.post .avatar { background: #ecf0e4; border-radius: 9px; }
.post-name { font-size: 15px; font-weight: 400; letter-spacing: .2px; }
.post-handle, .post-time { color: var(--muted); font-size: 11px; }
.post-body { color: var(--muted); font-size: 14px; line-height: 1.85; }
.post-actions button { color: var(--muted); font-size: 12px; font-family: var(--font-display); }
.post-actions button:hover, .post-actions button.liked { color: var(--clay); }
.post-actions .liked svg { fill: #decec3; stroke: #a18572; }
.share-card { background: #eff2e8; border-color: #d8e0cd; color: var(--deep); border-radius: 8px; font-size: 13px; }
.share-card small { font-size: 11px; color: var(--muted); }
.rail-card { padding: 21px; }
.rail-card h3 { font-size: 17px; font-weight: 400; }
.rail-card .subtitle { color: var(--muted); font-size: 12px; line-height: 1.8; }
.rail-heading { color: var(--deep); }
.rail-people p { font-size: 15px; font-family: var(--font-display); font-weight: 400; }
.rail-people small { color: var(--muted); font-size: 11px; }
.rail-total { color: var(--muted); font-size: 13px; font-weight: 400; }
.rank { color: var(--muted); font-size: 12px; }
.rail-foot, .rail-link, .mini-info { color: var(--muted); font-size: 11px; }
.rail-link { color: var(--deep); font-size: 12px; }
.activity { border-color: #d4dec9; }
.activity:before { background: #9aaa89; box-shadow: 0 0 0 4px var(--surface); }
.activity p { font-size: 12px; color: var(--muted); }
.activity small { color: var(--muted); font-size: 11px; }
.rail-doodle { background: var(--soft); border-radius: 9px; }
.rail-doodle .float-note { color: var(--muted); font-family: var(--font-display); font-style: normal; }
.rail-doodle:after { color: var(--muted); }
.page-heading .eyebrow { color: var(--muted); }
.page-heading h1 { font-family: var(--font-display); font-size: 39px; font-weight: 400; letter-spacing: -.5px; line-height: 1.2; }
.page-heading p { font-size: 14px; color: var(--muted); line-height: 1.8; }
.toolbar input, .toolbar select { font-size: 13px; }
.empty { background: #f7f8f0; border-color: #ced7c1; border-radius: 12px; color: var(--muted); padding: 40px 24px; }
.empty > .icon { color: var(--muted); stroke-width: 1.3; }
.empty h3 { color: var(--muted); font-size: 20px; font-weight: 400; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.85; max-width: 390px; }
.metric { padding: 21px; }
.metric b { color: var(--deep); font-size: 30px; font-weight: 400; letter-spacing: -.5px; }
.metric small { color: var(--muted); font-size: 12px; }
.metric .eyebrow { color: var(--muted); display: block; font-size: 10px; letter-spacing: 1.4px; margin-bottom: 13px; }
.member-spotlights { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 24px; }
.form-row > * { min-width: 0; }
.member-spotlights .metric b { font-size: 25px; overflow-wrap: anywhere; }
.leaderboard-toolbar { flex-wrap: wrap; }
.leaderboard-member { text-align: left; padding: 0; }
.leaderboard-member strong { color: var(--deep); font-family: var(--font-display); font-size: 15px; font-weight: 400; display: block; }
.leaderboard-member small { color: var(--muted); font-size: 11px; display: block; margin-top: 4px; }
.people-leaderboard .metric-active { color: var(--deep); font-size: 20px; font-family: var(--font-display); }
table { font-size: 13px; }
th { background: #f1f3e9; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .7px; border-color: var(--line); }
td { color: var(--muted); border-color: #e6eadd; padding-top: 18px; padding-bottom: 18px; }
.table-character .avatar { background: #eaf0e0; border-radius: 8px; }
.table-character strong { color: var(--deep); font-family: var(--font-display); font-size: 16px; font-weight: 400; }
.conversation-item:hover { border-color: #bac7aa; }
.conversation-item h3 { font-size: 17px; font-weight: 400; }
.conversation-item p { color: var(--muted); font-size: 13px; }
.conversation-item small { color: var(--muted); font-size: 11px; }
.conversation-item .avatar { border-radius: 10px; background: #eaf0df; }
.discovery h3 { font-size: 19px; line-height: 1.4; font-weight: 400; }
.discovery p, .profile-fact { color: var(--muted); font-size: 13px; }
.discovery blockquote { font-family: var(--font-body); color: var(--muted); font-size: 17px; line-height: 1.8; }
.discovery .credit, .profile-fact small { font-size: 11px; color: var(--muted); }
.credit strong { color: var(--muted); font-weight: 400; }
.pipeline > div { background: var(--surface); border-color: var(--line); border-radius: 9px; }
.pipeline h3 { font-size: 14px; font-weight: 400; }
.pipeline p { color: var(--muted); font-size: 11px; }
.pipeline .icon { color: var(--muted); }
.invite-code { border-color: #e4e9da; }
.invite-code code { color: var(--muted); font-size: 13px; letter-spacing: 1.3px; }
.invite-code small { color: var(--muted); font-size: 11px; }
.member-header h2 { font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.member-header p { color: var(--muted); font-size: 13px; }
.tree { background: var(--surface); border-color: var(--line); border-radius: 12px; font-size: 13px; }
.tree ul, .tree li:before { border-color: #d4dec7; }
.tree li:before { background: #d4dec7; }
.tree .node { background: #eef3e4; border-color: #dce5d0; border-radius: 9px; }
.tree .node small { color: var(--muted); font-size: 11px; }
.status-banner { color: var(--muted); background: #edf2e3; border-color: #dae4cd; font-size: 12px; border-radius: 8px; }
.report-item p { color: var(--muted); font-size: 12px; }
dialog { background: #f8f9f1; border-color: #d8e1ca; border-radius: 14px; box-shadow: 0 24px 90px #303a2526; }
dialog::backdrop { background: #303a3559; backdrop-filter: blur(4px); }
.modal-header { background: #f4f6ec; border-color: var(--line); padding-top: 22px; padding-bottom: 20px; }
.modal-header h2 { font-size: 22px; font-weight: 400; letter-spacing: .2px; }
.modal-body .help { color: var(--muted); font-size: 12px; line-height: 1.8; }
.modal-body .field { margin-bottom: 20px; }
.profile-hero .avatar { background: #e9f0de; border-radius: 28px; }
.profile-hero h2 { font-family: var(--font-display); font-size: 34px; font-weight: 400; }
.profile-hero p, .profile-description { color: var(--muted); font-size: 14px; line-height: 1.8; }
.profile-fact strong { font-weight: 400; color: var(--deep); }
.login-title { font-family: var(--font-display); font-size: 33px; font-weight: 400; letter-spacing: -.2px; }
.login-desc { color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-disclosure { color: var(--muted); font-size: 11px; line-height: 1.9; }
.error-box { background: #f1e5dc; border-color: #e3d0c3; color: #946f58; font-size: 12px; border-radius: 7px; }
.success-box { background: #eaf1df; border-color: #d5e1c5; color: var(--muted); font-size: 12px; border-radius: 7px; }
.stars { color: #ac996e; }
.stars button { color: #c0c7b3; }
.stars button.selected { color: #ab9464; }
.rating-line small { color: var(--muted); font-size: 11px; }
.chat-header .avatar { background: #e9efdf; border-radius: 9px; }
.chat-header h2 { font-size: 20px; font-weight: 400; }
.chat-header .muted { font-size: 12px; }
.chat-notice { background: #edf2e4; border-color: var(--line); color: var(--muted); font-size: 11px; line-height: 1.8; padding-top: 12px; padding-bottom: 12px; }
.message-meta { color: var(--muted); font-size: 12px; letter-spacing: .25px; }
.message-body { color: var(--muted); background: var(--surface); border-color: #dfe7d4; font-size: 14px; line-height: 1.9; border-radius: 0 10px 10px; }
.message.user .message-body { background: #e5edda; border-color: #d7e2ca; }
.message-tools { color: var(--muted); font-size: 11px; line-height: 1.7; }
.message-tools button { color: var(--muted); font-size: 11px; }
.chat-form { background: #f1f5e9; border-color: var(--line); }
.chat-form textarea { background: var(--surface); font-size: 14px; }
.chat-form .muted { font-size: 11px; }
.typing span { background: #99ac85; }
.branch-marker { color: var(--muted); font-size: 11px; border-color: #d6e1c9; }
.share-top { background: #eaf1de; border-color: var(--line); }
.share-top h2 { font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.share-top p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.share-controls { background: #f0f5e6; border-color: var(--line); }
.share-link { background: #eaf1dd; color: var(--deep); border-radius: 8px; font-size: 12px; }
.steering-editor { background: #eef3e5; border-color: #d7e1ca; border-radius: 8px; }
.steering-editor > summary { color: var(--muted); font-size: 13px; letter-spacing: .25px; }
.steer-slot { border-color: #d7e2c9; }
.steer-slot label { color: var(--muted); font-size: 12px; font-weight: 400; }
.steer-slot input, .steer-slot select { font-size: 13px; background: var(--surface); border-color: #d6e1c8; }
.backroom-steers { background: #f0f5e6; border-color: var(--line); color: var(--muted); font-size: 12px; }
.backroom-steers summary { font-size: 12px; letter-spacing: .25px; }
.reply { border-color: var(--line); }
.reply strong { color: var(--muted); font-size: 13px; font-weight: 400; }
.reply p { color: var(--muted); font-size: 14px; }
.reply small { color: var(--muted); font-size: 11px; }
.audit-detail { color: var(--muted); font-size: 11px; }
.footer-note { font-size: 11px; color: var(--muted); line-height: 1.9; }
#toast { background: #4f6544; border-color: #7e936d; color: #f8fbf3; border-radius: 8px; box-shadow: 0 7px 28px #394e2822; font-size: 13px; }
#toast.error { background: #846c57; border-color: #a58a70; }
.initial-loading { color: var(--muted); font-family: var(--font-display); }
.mobile-nav { background: #f8f9f1f7; border-color: var(--line); }
.mobile-nav a { font-family: var(--font-display); font-size: 10px; color: var(--muted); }
.mobile-nav a.active { color: var(--muted); }
@media (min-width: 1500px) {
  .hero h1 { font-size: 48px; }
  .portrait-stage { height: 137px; }
}
@media (max-width: 1000px) {
  .top-search { display: none; }
  .breadcrumb { min-width: 0; overflow: hidden; white-space: nowrap; }
}
@media (max-width: 1200px) {
  .hero h1 { font-size: 40px; }
  .character-card { padding: 13px; }
  .character-card .tagline { font-size: 12px; }
  .sidebar .brand { font-size: 20px; }
}
@media (max-width: 740px) {
  .hero { padding: 26px 22px; }
  .hero h1 { font-size: 32px; line-height: 1.22; }
  .hero .eyebrow { font-size: 9px; letter-spacing: 1.6px; }
  .hero p { font-size: 12px; max-width: 240px; }
  .hero-art { opacity: .45; }
  .hero .btn { font-size: 12px; padding: 11px 13px; }
  .mobile-brand .brand { font-size: 23px; }
  .topbar > .btn { font-size: 11px; padding: 9px 8px; }
  .topbar [data-action='create-character'] { width: 38px; height: 38px; padding: 9px; flex-shrink: 0; }
  .topbar [data-action='create-character'] span { display: none; }
  .topbar [data-action='create-character'] .icon { display: block; width: 18px; height: 18px; }
  .character-card { padding: 11px; }
  .character-card h3 { font-size: 17px; }
  .character-card .tagline { font-size: 11px; min-height: 42px; }
  .character-card .traits { font-size: 9px; }
  .character-card .chat-btn { font-size: 11px; }
  .portrait-stage .species { font-size: 8px; }
  .stats-line { gap: 11px; flex-wrap: wrap; font-size: 10px; }
  .section-heading h2 { font-size: 20px; }
  .post { padding: 18px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading p { font-size: 14px; }
  .member-spotlights { gap: 11px; }
  .member-spotlights .metric { padding: 16px 13px; }
  .member-spotlights .metric b { font-size: 23px; }
  .member-spotlights .metric small { font-size: 11px; }
  .leaderboard-toolbar .btn { padding: 9px 11px; font-size: 12px; }
  .leaderboard-toolbar select { max-width: none; flex: 1; margin-left: 0 !important; }
  .conversation-item h3 { font-size: 16px; }
  .conversation-item p { font-size: 12px; }
  .chat-header h2 { font-size: 18px; }
  .chat-header .muted { font-size: 11px; }
  .modal-header h2 { font-size: 20px; }
  .modal-body { padding: 22px 18px; }
  .chat-dialog .modal-body { padding: 0; }
  .chat-notice { font-size: 10px; }
  .message-body { font-size: 14px; }
  .backroom-steers { font-size: 11px; }
  .footer-note { font-size: 11px; }
}
@media (max-width: 390px) {
  .mobile-brand .brand { font-size: 19px; }
  .brand-mark { width: 31px; height: 33px; font-size: 30px; }
  .topbar { gap: 7px; }
  .topbar > .btn { font-size: 10px; padding: 9px 7px; }
  .hero h1 { font-size: 32px; }
  .member-spotlights { grid-template-columns: 1fr; }
}

/* Portrait evolution shares the original warm visual language. */
.avatar img { width: 100%; height: 100%; display: block; object-fit: contain; }
.portrait-history-link { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; padding: 16px; margin: 20px 0; color: var(--deep); }
.portrait-history-link:hover { border-color: var(--sage); }
.portrait-history-link span { flex: 1; min-width: 0; }
.portrait-history-link strong { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 400; margin-bottom: 5px; }
.portrait-history-link small { display: block; line-height: 1.7; color: var(--muted); }
.portrait-history { list-style: none; padding: 0; margin: 25px 0 0; display: grid; gap: 18px; }
.portrait-revision { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 22px; border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: var(--surface); }
.portrait-revision.current { border-color: #9ca493; }
.portrait-version-stage { background: var(--soft); border-radius: 5px; display: grid; place-items: center; align-content: center; padding: 10px; }
.portrait-version-stage .avatar { width: 150px; height: 150px; }
.portrait-version-stage .pill { margin-top: 5px; }
.portrait-version-info { align-self: center; overflow-wrap: anywhere; }
.portrait-version-info h3 { margin: 0 0 5px; }
.portrait-version-info time, .portrait-version-info small { display: block; color: var(--muted); font-size: 11px; line-height: 1.7; }
.portrait-version-info p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 12px 0; }
.portrait-attributes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.portrait-attributes .pill { white-space: normal; overflow-wrap: anywhere; }
.portrait-progress { line-height: 1.8; }
@media (max-width: 580px) {
  .portrait-revision { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .portrait-version-stage { padding: 14px; }
}

.stats-bars {display:flex;align-items:flex-end;gap:2px;height:150px;margin-top:22px;}
.stats-bars>div {flex:1;min-width:0;border-radius:2px 2px 0 0;}
#admin-content .metric-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
#admin-content .metric {min-width:0;overflow-wrap:anywhere;}
.admin-tabs {flex-wrap:wrap;}
@media(max-width:600px) {#admin-content .metric-grid {grid-template-columns:repeat(2,minmax(0,1fr));} #admin-content .metric {padding:14px;} #admin-content .metric b {font-size:24px;}}

.sleep-banner {display:flex;align-items:center;gap:12px;padding:16px 28px;background:var(--sage-light, #e6ebe2);color:var(--ink, #38443b);font-size:13px;line-height:1.7;border-bottom:1px solid var(--line, #d6ddd2);}
.sleep-banner .icon {flex-shrink:0;}
.sleep-banner strong {display:block;}
@media(max-width:600px){.sleep-banner{padding:14px 18px;align-items:flex-start;}}
