.profile-section { scroll-margin-top:24px; }
.profile-directory { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:28px 0; padding:16px; border:2px solid #718563; background:#25342b; font:8px/1.8 "Press Start 2P",monospace; }
.profile-directory span { color:#b9ca9c; margin-right:8px; }
.profile-directory a { color:#f7f0d9; text-underline-offset:5px; padding:6px; }
.profile-panel { --panel:#c4c9ad; --edge:#eff1dc; --shade:#45523b; --text:#243025; --muted:#4a5846; --accent:#456d2b; background:var(--panel); color:var(--text); border:3px solid; border-color:var(--edge) var(--shade) var(--shade) var(--edge); box-shadow:5px 5px #142019; }
.profile-panel p,.profile-panel dd,.profile-panel dt { font:15px/1.7 monospace; }
.profile-panel h3 { font:11px/1.8 "Press Start 2P",monospace; }
.profile-panel a { color:var(--accent); font:9px/1.8 "Press Start 2P",monospace; text-underline-offset:4px; }
.profile-panel button,.profile-panel summary { font:9px/1.8 "Press Start 2P",monospace; cursor:pointer; }
.profile-panel button:focus-visible,.profile-panel summary:focus-visible,.profile-directory a:focus-visible { outline:3px solid #ae6d1f; outline-offset:3px; }
.profile-tag,.profile-kicker,.profile-panel-heading { font:8px/1.8 "Press Start 2P",monospace; }
.profile-tag { color:var(--accent); }
.profile-kicker { margin:0 0 18px; color:var(--muted); }
.profile-panel-heading { display:flex; justify-content:space-between; flex-wrap:wrap; gap:14px; padding:18px 22px; border-bottom:2px solid var(--shade); color:#f6edce; background:#4b5039; }
.quest-book { background:repeating-linear-gradient(0deg,transparent 0 29px,#5b522d09 29px 30px),#ddd4ab; }
.quest-filters { display:flex; flex-wrap:wrap; gap:8px; padding:20px 22px 0; }
.quest-filters button { padding:8px 12px; color:#444a32; background:#cac39e; border:2px solid; border-color:#f6ebc8 #797557 #797557 #f6ebc8; }
.quest-filters button[aria-pressed="true"] { color:#fff6d6; background:#465a35; }
.quest-list { list-style:none; margin:0; padding:8px 24px 20px; }
.quest-empty { margin:0; padding:0 24px 24px; }
.quest-list li { display:flex; gap:18px; padding:20px 0; border-bottom:1px dashed #8b8a68; }
.quest-list li:last-child { border-bottom:0; }
.quest-list h3 { margin:7px 0; }
.quest-list p { margin:0; }
.quest-mark { font-size:24px; color:#92732b; padding-top:8px; }
[data-quest-state="done"] .quest-mark { color:#4a742f; }
.loadout-layout { display:grid; grid-template-columns:1fr 1fr; gap:28px; padding:26px; }
.carry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; max-width:350px; }
.carry-slot { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:6px; aspect-ratio:1.15; border:3px solid; border-color:#4b5543 #f2f1dc #f2f1dc #4b5543; color:#f3edcd; background:#78816a; transition:background .15s,transform .15s; }
.carry-slot span { font:34px/1 monospace; }
.carry-slot small { font:7px/1.8 "Press Start 2P",monospace; }
button.carry-slot:hover { transform:translateY(-2px); }
.carry-slot[aria-pressed="true"] { outline:3px solid #e9c76b; outline-offset:-5px; background:#4d6444; }
.carry-empty { opacity:.45; font-size:26px; }
.profile-panel .profile-note { font:12px/1.7 monospace; color:var(--muted); margin-bottom:0; }
.item-inspect { align-self:center; padding:24px; border:3px solid; border-color:#85807d #d7c9e4 #d7c9e4 #85807d; background:#30243b; color:#f6ecff; min-height:150px; }
.item-inspect .profile-tag { color:#c8a4e8; }
.item-inspect a { color:#ded395; }
.setup-layout { display:grid; grid-template-columns:.85fr 1.15fr; }
.setup-scene { min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:25px; background:repeating-linear-gradient(0deg,#111f20 0 3px,#172829 3px 6px); border-right:3px solid var(--shade); }
.pixel-monitor { width:80%; max-width:240px; aspect-ratio:1.5; padding:12px; box-sizing:border-box; border:8px solid; border-color:#96a394 #35453c #35453c #96a394; background:#101b16; box-shadow:5px 5px #090e0c; display:grid; place-items:center; color:#b4e88a; font:14px/2 "Press Start 2P",monospace; }
.pixel-monitor b { animation:terminal-blink 1.2s steps(1) infinite; }
.pixel-stand { width:30px; height:24px; background:#6c7c6d; border-bottom:6px solid #98a591; }
.pixel-keyboard { width:65%; max-width:205px; height:30px; margin:10px 0 18px; transform:skewX(-12deg); border:4px solid #96a394; background:repeating-linear-gradient(90deg,transparent 0 12px,#263b2c 12px 15px),repeating-linear-gradient(0deg,#64745e 0 7px,#263b2c 7px 10px); }
.setup-scene-label { font:8px/1.8 "Press Start 2P",monospace; color:#8aa48b; }
.setup-specs { padding:28px; }
.profile-panel details { margin-top:12px; border-top:1px solid var(--shade); }
.profile-panel summary { padding:14px 0; }
.profile-panel dl { margin:0; }
.profile-panel dl > div { display:flex; justify-content:space-between; gap:14px; padding:8px 0; border-bottom:1px dashed #73846b66; }
.profile-panel dd { margin:0; text-align:right; }
.profile-panel dt { color:var(--muted); }
.garage-layout { display:grid; grid-template-columns:1.2fr 1fr; }
.garage-bay { position:relative; display:grid; place-items:center; margin:0; padding:30px; background:linear-gradient(0deg,#b9a95b22,transparent 40%),repeating-linear-gradient(90deg,#65716c22 0 1px,transparent 1px 40px),repeating-linear-gradient(0deg,#65716c22 0 1px,transparent 1px 40px),#202b29; border-right:3px solid var(--shade); }
.garage-bay img { width:100%; max-width:350px; height:auto; filter:drop-shadow(0 15px 5px #0006); transition:transform .25s ease; }
.garage-bay:hover img { transform:translateY(-4px); }
.garage-bay figcaption { font:8px/1.8 "Press Start 2P",monospace; color:#d6c879; border:2px solid #a99a4f; padding:8px 16px; }
.garage-info { padding:30px; }
.garage-info h3 { font-size:16px; line-height:2; }
.garage-info h3 strong { font-size:clamp(19px,3vw,28px); }
.profile-panel .profile-action { display:inline-block; padding:12px 14px; margin-top:18px; background:#3f5837; border:2px solid; border-color:#81956e #263c26 #263c26 #81956e; color:#f7efcf; text-decoration:none; }
.lore-layout { display:grid; grid-template-columns:190px 1fr; }
.lore-spine { padding:30px 18px; text-align:center; background:#533e31; color:#e7d3a0; border-right:5px solid #97764d; }
.lore-spine > span { display:block; margin:10px auto 25px; width:60px; padding:18px 0; border:2px solid #b7a16d; font-size:30px; }
.lore-spine p { font:11px/2 "Press Start 2P",monospace; }
.lore-spine small { font:12px/1.6 monospace; overflow-wrap:anywhere; }
.lore-entries { padding:8px 28px; }
.lore-entries article { padding:24px 0; }
.lore-unwritten { border-top:1px dashed var(--shade); }
.lore-unwritten p { color:var(--muted); }
body[data-theme="christmas"] .profile-panel { --panel:#d7e9eb; --edge:#f2ffff; --shade:#607f86; --text:#203e43; --muted:#4c656b; --accent:#316459; }
body[data-theme="christmas"] .profile-directory { background:#203f45; border-color:#8bb5bf; }
body[data-theme="christmas"] .quest-book { background:#e4e9d5; }
body[data-theme="christmas"] .profile-panel-heading { background:#355d58; }
@keyframes terminal-blink { 50% { opacity:0; } }
@media(max-width:700px) { .loadout-layout,.setup-layout,.garage-layout,.lore-layout { grid-template-columns:1fr; } .setup-scene,.garage-bay { border-right:0; border-bottom:3px solid var(--shade); } .setup-scene { min-height:230px; } .lore-spine { display:none; } .garage-bay img { max-width:280px; } .carry-grid { max-width:none; } .loadout-layout,.setup-specs,.garage-info { padding:20px; } .profile-panel-heading { font-size:7px; } .profile-section .section-title { flex-wrap:wrap; gap:12px; } }
@media(prefers-reduced-motion:reduce) { .pixel-monitor b { animation:none; } .carry-slot,.garage-bay img { transition:none; } }

/* Compact journal cards; details expand only when requested. */
.profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:1fr; gap:22px; align-items:stretch; }
.profile-grid > section { min-width:0; display:flex; flex-direction:column; }
.profile-grid > section > .profile-panel { flex:1; min-width:0; }
.profile-directory { margin:22px 0 18px; padding:10px 12px; gap:6px; }
.profile-section .section-title { margin:0 0 10px; gap:6px; flex-wrap:wrap; padding-bottom:6px; }
.profile-section .section-title h2 { font-size:12px; }
.profile-section .section-title > span { font-size:6px; }
.profile-panel p,.profile-panel dd,.profile-panel dt { font-size:14px; line-height:1.5; }
.profile-panel h3 { font-size:10px; line-height:1.6; }
.profile-panel-heading { gap:8px; padding:10px 14px; font-size:7px; }
.profile-kicker { margin:0 0 10px; }
.quest-filters { padding:10px 14px 0; gap:5px; }
.quest-filters button { padding:6px 8px; font-size:8px; }
.quest-list { padding:4px 14px 10px; }
.quest-list li { gap:10px; padding:10px 0; }
.quest-list h3 { margin:3px 0; }
.quest-mark { font-size:18px; padding-top:4px; }
.quest-empty { padding:4px 14px 14px; }
.loadout-layout { grid-template-columns:1fr; gap:12px; padding:14px; }
.carry-grid { grid-template-columns:repeat(6,minmax(0,1fr)); gap:5px; max-width:none; }
.carry-slot { min-width:0; height:58px; aspect-ratio:auto; gap:3px; }
.carry-slot span { font-size:24px; }
.carry-slot small { font-size:5px; }
.item-inspect { min-height:0; padding:12px; }
.item-inspect h3 { margin:6px 0; }
.item-inspect p { margin:6px 0; }
.profile-panel .profile-note { margin:8px 0 0; }
.setup-layout,.garage-layout { grid-template-columns:130px minmax(0,1fr); }
.setup-scene { min-height:0; padding:14px 8px; border-right:3px solid var(--shade); border-bottom:0; }
.pixel-monitor { width:100%; border-width:5px; padding:6px; font-size:9px; }
.pixel-stand { height:14px; width:20px; }
.pixel-keyboard { height:20px; width:80%; margin:7px 0 10px; }
.setup-scene-label { font-size:6px; }
.setup-specs,.garage-info { padding:14px; min-width:0; }
.profile-panel details { margin-top:8px; }
.profile-panel summary { padding:10px 0; font-size:8px; }
.profile-panel dl > div { gap:8px; padding:5px 0; flex-wrap:wrap; }
.profile-panel dd { overflow-wrap:anywhere; }
.garage-bay { padding:12px 6px; align-content:center; border-right:3px solid var(--shade); border-bottom:0; }
.garage-bay img { max-width:160px; }
.garage-bay figcaption { font-size:5px; padding:5px; }
.garage-info h3 { font-size:11px; margin:8px 0; }
.garage-info h3 strong { font-size:18px; }
.profile-panel .profile-action { padding:8px; margin-top:10px; font-size:7px; }
#server-lore { margin-top:24px; }
.lore-layout { grid-template-columns:115px minmax(0,1fr); }
.lore-spine { padding:12px 8px; }
.lore-spine > span { width:35px; padding:6px 0; margin:0 auto 10px; font-size:18px; }
.lore-spine p { font-size:8px; margin:8px 0; }
.lore-spine small { font-size:10px; }
.lore-entries { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:14px; }
.lore-entries article { padding:0; }
.lore-entries h3 { margin:8px 0; }
.lore-entries p { margin:8px 0; }
.lore-unwritten { border-top:0; border-left:1px dashed var(--shade); padding-left:18px !important; }
@media(max-width:950px) {
  .profile-grid { grid-template-columns:1fr; grid-auto-rows:auto; gap:20px; }
  .loadout-layout { grid-template-columns:1fr 1fr; }
  .carry-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .setup-layout,.garage-layout { grid-template-columns:150px minmax(0,1fr); }
}
@media(max-width:480px) {
  .loadout-layout { grid-template-columns:1fr; }
  .carry-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .carry-slot { height:48px; }
  .setup-layout,.garage-layout { grid-template-columns:90px minmax(0,1fr); }
  .pixel-monitor { font-size:7px; }
  .setup-scene-label { font-size:5px; }
  .garage-info h3 strong { font-size:14px; }
  .lore-layout { grid-template-columns:1fr; }
  .lore-entries { grid-template-columns:1fr; gap:12px; }
  .lore-unwritten { border-left:0; border-top:1px dashed var(--shade); padding:12px 0 0 !important; }
}
/* Small overview tiles open an advancement-style inspection window. */
.profile-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; grid-auto-rows:1fr; }
.profile-section-tile > .section-title { display:none; }
.profile-tile { width:100%; height:100%; box-sizing:border-box; display:grid; grid-template-columns:32px 1fr; align-content:center; align-items:center; gap:8px 10px; padding:16px; min-height:132px; border:3px solid; border-color:#e0e7cc #46543b #46543b #e0e7cc; background:#c4c9ad; color:#243025; text-align:left; cursor:pointer; box-shadow:3px 3px #142019; transition:transform .15s ease,filter .15s ease; }
.profile-tile-icon { grid-row:span 2; font:28px/1 monospace; color:#567537; }
.profile-tile strong { font:9px/1.7 "Press Start 2P",monospace; overflow-wrap:anywhere; }
.profile-tile small { font:12px/1.4 monospace; }
.profile-tile-hint { grid-column:2; color:#4b673a; font:7px/1.7 "Press Start 2P",monospace; }
.profile-tile:hover { filter:brightness(1.07); transform:translateY(-2px); }
.profile-tile:active { transform:translateY(1px); }
.profile-tile:focus-visible { outline:3px solid #eacb70; outline-offset:3px; }
body[data-theme="christmas"] .profile-tile { background:#d7e9eb; border-color:#f2ffff #607f86 #607f86 #f2ffff; color:#203e43; }
body[data-theme="christmas"] .profile-tile-icon,body[data-theme="christmas"] .profile-tile-hint { color:#316459; }
#server-lore.profile-section-tile .profile-tile { min-height:86px; grid-template-columns:32px 1fr auto; }
#server-lore.profile-section-tile .profile-tile-hint { grid-column:3; grid-row:1 / span 2; }
.profile-window-open { overflow:hidden; }
.profile-window { padding:0; width:min(740px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); box-sizing:border-box; overflow:auto; border:3px solid; border-color:#ddd #333 #333 #ddd; background:#292d29; color:#fff; box-shadow:6px 6px #1118; }
.profile-window::backdrop { background:#07100dc4; }
.profile-window[open] { animation:awards-arrive .18s ease-out both; }
.profile-window-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; position:sticky; top:0; z-index:1; background:#292d29; border-bottom:2px solid #555f4e; }
.profile-window-header h2 { font:11px/1.8 "Press Start 2P",monospace; color:#ffffaa; margin:0; }
.profile-window-header button { display:grid; place-items:center; width:36px; height:36px; flex-shrink:0; border:2px solid; border-color:#b7c1ab #414c39 #414c39 #b7c1ab; background:#69745f; color:#fff; cursor:pointer; font:25px/1 monospace; }
.profile-window-header button:focus-visible { outline:2px solid #ffffaa; outline-offset:2px; }
.profile-window-content { padding:12px; }
.profile-window .profile-panel { box-shadow:none; }
.profile-window .profile-detail { border-top:1px solid var(--shade); margin-top:12px; padding-top:6px; }
.profile-window .loadout-layout { grid-template-columns:1fr; }
.profile-window .carry-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
.profile-window .lore-layout { grid-template-columns:1fr; }
.profile-window .lore-spine { display:none; }
@media(max-width:950px) { .profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }
@media(max-width:480px) { .profile-tile { padding:12px; min-height:118px; grid-template-columns:24px 1fr; gap:6px; } .profile-tile strong { font-size:8px; } .profile-tile-icon { font-size:23px; } .profile-window .carry-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .profile-window-content { padding:6px; } }
@media(prefers-reduced-motion:reduce) { .profile-tile { transition:none; } .profile-window[open] { animation:none; } }
