/* The look of the two pages people use: the public page and the admin page.
   (The broadcast has its own, style.css.) Chunky cards, hard shadows, pixel headings. */
:root { --bg: #141019; --panel: #1d1724; --line: #3a2f47; --text: #ece6f2; --dim: #9a8fa8; --gold: #f2c94c; --red: #ff5a5a; --cyan: #6ad7e8; --green: #53fc18; --px: 'Press Start 2P', monospace; }
* { box-sizing: border-box; margin: 0; }
/* Scrollbars in the pages' own colours: a square gold grip on a dark track, like the cards' hard edges. */
* { scrollbar-color: var(--line) #0f0c14; scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #0f0c14; border-left: 2px solid var(--line); }
::-webkit-scrollbar-thumb { background: var(--line); border: 2px solid #0f0c14; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
::-webkit-scrollbar-corner { background: #0f0c14; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, sans-serif; min-height: 100vh;
  background-image: radial-gradient(circle at 20% 0%, #2a1f38 0, transparent 45%), radial-gradient(circle at 100% 100%, #241a2e 0, transparent 40%); background-attachment: fixed; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 18px 32px; border-bottom: 4px solid var(--line); background: #0f0c14; }
header.top h1 { font-family: var(--px); font-size: 22px; color: var(--gold); text-shadow: 3px 3px 0 #000; margin-right: auto; }
header.top h1 small { font-size: 11px; color: var(--dim); margin-left: 14px; text-shadow: none; }
header.top a { color: var(--dim); font-size: 13px; }
/* The signed-in viewer's points, beside their name. */
.points { font-family: var(--px); font-size: 11px; color: var(--gold); display: flex; gap: 8px; align-items: center; margin-left: auto; white-space: nowrap; }
.points i { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.3); }
.points small { font-size: 7px; color: var(--dim); letter-spacing: 1px; }
/* Who is signed in: their Kick picture in a green frame, a KICK tag over their name, and sign out. */
#account { display: flex; align-items: center; gap: 12px; }
#account img { width: 40px; height: 40px; object-fit: cover; border: 3px solid var(--green); box-shadow: 3px 3px 0 #000; }
#account .who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#account .who small { font-family: var(--px); font-size: 7px; letter-spacing: 1px; color: var(--green); }
#account .who b { font-family: var(--px); font-size: 11px; font-weight: normal; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#account .btn { margin-left: 6px; color: var(--dim); }
#account .btn:hover { color: var(--text); border-color: var(--dim); }
a.kick { font-family: var(--px); font-size: 10px; color: #0a1406; background: var(--green); padding: 12px 14px; text-decoration: none; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
a.kick:hover { background: #7dff52; }
a.kick:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }

.page { padding: 22px 32px 40px; max-width: 1400px; margin: 0 auto; display: grid; gap: 22px; }
.banner { padding: 16px 20px; border: 3px solid var(--green); background: #0d1a0a; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; box-shadow: 5px 5px 0 #000; }
.banner b { font-family: var(--px); font-size: 13px; color: var(--green); line-height: 1.6; }
.banner.quiet { border-color: var(--line); background: var(--panel); }
.banner.quiet b { color: var(--gold); }
.banner:empty { display: none; }

.card { background: var(--panel); border: 3px solid var(--line); box-shadow: 6px 6px 0 #000; min-width: 0; }
section.card { padding: 18px 22px 20px; }
.card h3 { font-family: var(--px); font-size: 11px; color: var(--gold); letter-spacing: 1px; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 10px; line-height: 1.5; }
.card h3 em { font-style: normal; color: var(--dim); }
/* Your own citizen: the money statement and their live feed, side by side. */
.life-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.life-grid[hidden] { display: none; }
.life-grid ul { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; background: var(--bg); border: 2px solid var(--line); }
.life-grid li { padding: 9px 12px; border-bottom: 1px solid #2a2236; font-size: 13px; line-height: 1.4; }
.life-grid li:last-child { border-bottom: 0; }
.life-grid li.empty { color: var(--dim); font-style: italic; }
.life-grid time { font-family: var(--px); font-size: 8px; color: var(--dim); white-space: nowrap; }
.life-grid h3 b { font-weight: normal; margin-left: 10px; }
.ledger li { display: grid; grid-template-columns: 74px 84px 1fr auto; gap: 10px; align-items: baseline; }
.ledger li b { font-family: var(--px); font-size: 10px; font-weight: normal; text-align: right; }
.ledger li i { font-style: normal; font-family: var(--px); font-size: 8px; color: var(--dim); }
.pos { color: var(--green); } .neg { color: var(--red); }
.myfeed li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; }
.myfeed li .ico { font-size: 14px; }
.myfeed li.new { animation: feed-in 2.4s ease-out; }
.myfeed .why { display: inline-block; font-style: normal; font-weight: 700; font-size: 11px; letter-spacing: .04em; color: #1a1420; background: var(--gold); padding: 1px 5px; margin-right: 6px; vertical-align: 1px; }
@keyframes feed-in { 0% { background: #3a3010; box-shadow: inset 4px 0 0 var(--gold); } 100% { background: transparent; box-shadow: inset 4px 0 0 transparent; } }
.on-air { display: flex; align-items: center; gap: 6px; color: var(--red) !important; font-size: 9px; }
.on-air i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
@media (max-width: 900px) { .life-grid { grid-template-columns: 1fr; } .ledger li { grid-template-columns: 64px 76px 1fr; } .ledger li i { display: none; } }
.note { font-size: 12px; color: var(--dim); margin-top: 12px; }
.note:empty { display: none; }
.dim { color: var(--dim); } .bad { color: var(--red); } .good { color: #7ee07e; }
.note.bad { color: var(--red); } .note.good { color: #7ee07e; }

.btn { font-family: var(--px); font-size: 12px; padding: 16px; border: 3px solid #000; cursor: pointer; box-shadow: 4px 4px 0 #000; color: var(--text); background: #2a2236; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.go { background: var(--gold); color: #1a1420; }
.btn.ghost { border-color: var(--line); }
.btn.danger { background: #3a1418; color: var(--red); border-color: #6a2a30; }
.btn.on { background: var(--gold); color: #1a1420; }
.btn.sm { font-size: 9px; padding: 10px 11px; box-shadow: 3px 3px 0 #000; }

input[type=text], input[type=number], input[type=password], input[type=search], select, textarea { font: inherit; color: var(--text); background: #000; border: 2px solid var(--line); padding: 9px 10px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type=range] { accent-color: var(--gold); }

/* ---------------------------------------------------------------- the character creator */
.creator { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 980px) { .creator { grid-template-columns: minmax(0, 1fr); } .creator-left { position: static !important; } }
.creator-left { position: sticky; top: 20px; }
.creator .preview { display: block; width: 100%; height: 300px; image-rendering: pixelated; border-bottom: 3px solid var(--line); }
.creator .who { padding: 18px 20px 20px; }
.creator .who h2 { font-family: var(--px); font-size: 15px; color: var(--gold); line-height: 1.5; overflow-wrap: anywhere; }
.creator .who p { font-family: var(--px); font-size: 9px; color: var(--dim); margin: 10px 0 12px; line-height: 1.6; }
.creator .tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 26px; }
.creator .tags span { font-size: 12px; padding: 4px 10px; background: #2a2236; border: 1px solid var(--line); }
/* The card's summary of everything chosen beyond the look. */
.creator .summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 14px 0 0; padding-top: 12px; border-top: 2px solid var(--line); }
.creator .summary:empty { display: none; }
.creator .summary dt { font-family: var(--px); font-size: 7px; color: var(--dim); padding-top: 3px; }
.creator .summary dd { margin: 0; font-family: var(--px); font-size: 8px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
/* The steps: one section at a time, the steps along the top, BACK and NEXT under it. */
.creator .steps { display: flex; flex-wrap: wrap; gap: 6px; }
.stepb { font-family: var(--px); font-size: 8px; padding: 9px 11px; background: #000; color: var(--dim); border: 2px solid var(--line); cursor: pointer; }
.stepb:hover { color: var(--text); }
.stepb.on { color: var(--gold); border-color: var(--gold); background: #1f1a10; }
.creator-right > section.step-off { display: none !important; }
.creator .step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.creator .step-nav span { font-family: var(--px); font-size: 8px; color: var(--dim); text-align: center; line-height: 1.6; }
.creator .step-nav .btn:disabled { opacity: 0.35; cursor: default; }
.creator .actions { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 20px; }
.creator .actions .note { margin-top: 2px; font-size: 13px; }
.creator-right { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.creator .row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 12px; }
@media (max-width: 560px) { .creator .row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.creator .row label { font-family: var(--px); font-size: 8px; color: var(--dim); }
.creator .names { display: flex; gap: 10px; }
.creator .names input { flex: 1; font-family: var(--px); font-size: 12px; padding: 12px; }
.creator .dice { width: 48px; font-size: 20px; background: #2a2236; border: 2px solid var(--line); color: var(--gold); cursor: pointer; }
.creator .age { display: flex; align-items: center; gap: 16px; }
.creator .age b { font-family: var(--px); font-size: 22px; color: var(--gold); width: 54px; }
.creator .age i { font-family: var(--px); font-size: 8px; color: var(--cyan); font-style: normal; line-height: 1.5; }
.creator .age input { flex: 1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; background: var(--c); border: 3px solid #000; cursor: pointer; box-shadow: inset 0 -4px 0 rgba(0,0,0,0.25); }
.sw.on { outline: 3px solid var(--gold); outline-offset: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px 7px; background: #000; border: 2px solid var(--line); cursor: pointer; color: var(--dim); min-width: 74px; }
.chip img { width: 48px; image-rendering: pixelated; }
.chip span { font-family: var(--px); font-size: 7px; }
.chip.on { border-color: var(--gold); color: var(--gold); background: #1f1a10; }
.chip.text { justify-content: center; min-height: 40px; padding: 10px 14px; }
.chip.text span { font-size: 8px; }
.creator .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.trait, .reason { text-align: left; padding: 10px 12px; background: #000; border: 2px solid var(--line); cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 5px; font: inherit; }
.trait b, .reason b { font-family: var(--px); font-size: 9px; line-height: 1.4; }
.trait i, .reason i { font-style: normal; font-size: 12px; color: var(--dim); }
.trait.on, .reason.on { border-color: var(--gold); background: #1f1a10; }
.trait.on b, .reason.on b { color: var(--gold); }
.trait:disabled, .reason:disabled { opacity: 0.35; cursor: default; }
/* The house: a plan of town to pick a plot on, and the house as it will look. */
.creator .house-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: 18px; align-items: start; margin-bottom: 14px; }
@media (max-width: 760px) { .creator .house-pick { grid-template-columns: minmax(0, 1fr); } }
.creator .plan, .creator .house-pic { display: block; width: 100%; image-rendering: pixelated; border: 3px solid var(--line); background: #000; }
.creator .plan-count { font-family: var(--px); font-size: 10px; color: #57d957; margin-bottom: 10px; line-height: 1.5; }
.creator .plan-key { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-family: var(--px); font-size: 8px; color: var(--dim); }
.creator .plan-key span { display: flex; align-items: center; gap: 7px; }
.creator .plan-key i { width: 14px; height: 14px; background: var(--c); border: 2px solid var(--e, #000); }
.creator .plan-key i.hatch { background: repeating-linear-gradient(45deg, var(--c) 0 3px, #2e2e26 3px 5px); }
.creator .house-view .row { grid-template-columns: 74px minmax(0, 1fr); }
.creator .house-view .sw { width: 22px; height: 22px; border-width: 2px; }
/* The car: a picture of it beside the kinds, the paint and where they sleep. */
.creator .car-pick { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .creator .car-pick { grid-template-columns: minmax(0, 1fr); } }
.creator .car-pic { display: block; width: 100%; image-rendering: pixelated; border: 3px solid var(--line); background: #3a3a42; }
.creator .car-pick .grid { margin-bottom: 6px; }
/* PULL THE STRINGS: one row per thing that can be done, with what it costs and its button. */
.string { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 2px solid var(--line); }
.string:first-child { border-top: 0; }
.string b { font-family: var(--px); font-size: 10px; display: block; margin-bottom: 6px; }
.string i { font-style: normal; font-size: 13px; color: var(--dim); display: block; }
.string em { font-family: var(--px); font-size: 9px; color: var(--gold); font-style: normal; white-space: nowrap; }
.string em.off { color: var(--dim); }
.string select, .string input { margin-top: 10px; max-width: 100%; }
.string .pair { display: flex; gap: 8px; flex-wrap: wrap; }
.string .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; margin-top: 10px; }
@media (max-width: 560px) { .string { grid-template-columns: minmax(0, 1fr); } }
.creator .house-view .names b { font-family: var(--px); font-size: 10px; color: var(--gold); align-self: center; min-width: 70px; text-align: center; }
/* What they bring: a cash slider and a card for each thing, with how many are packed. */
.creator .age.cash b { width: 96px; }
.bring-item em { font-style: normal; font-family: var(--px); font-size: 9px; color: var(--cyan); }
.bring-item.drug.on { border-color: #c8302a; background: #1f1010; }
.bring-item.drug.on b { color: #ff7a6a; }

/* ---------------------------------------------------------------- finding a citizen, and a citizen's profile */
#search { width: 100%; padding: 11px 12px; }
/* Find a Civ: the search in the top bar, and the profile it opens over the page. */
header.top .find { flex: 0 1 320px; min-width: 180px; }
header.top .find input { font-family: var(--px); font-size: 9px; }
.lookup { position: fixed; inset: 0; z-index: 40; background: rgba(8, 6, 12, 0.72); display: flex; justify-content: center; align-items: flex-start; padding: 70px 16px 30px; overflow-y: auto; }
.lookup[hidden] { display: none; }
.lookup-box { position: relative; width: min(680px, 100%); }
.lookup-close { position: absolute; top: 12px; right: 12px; }
#count { color: var(--dim); font-size: 13px; margin-top: 8px; }
/* The citizen picker (client/picker.ts): best matches drop down under the box as you type; an empty box shows recent picks. */
.picker { position: absolute; z-index: 50; list-style: none; padding: 4px 0; margin: 0; display: none; max-width: 420px; background: #000; border: 2px solid var(--line); box-shadow: 5px 5px 0 #000; }
.picker.show { display: block; }
.picker li { display: flex; justify-content: space-between; gap: 14px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.picker li.on, .picker li:hover { background: #2a2236; }
.picker li span { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker li.head { font-family: var(--px); font-size: 7px; letter-spacing: 2px; color: var(--dim); cursor: default; padding-bottom: 2px; }
.picker li.more { color: var(--dim); cursor: default; font-size: 13px; }
.picker li.head:hover, .picker li.more:hover { background: none; }
/* Recently viewed, under the search box on the public page. */
#recent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#recent:empty { display: none; }
#recent a { font-size: 13px; padding: 4px 10px; background: #2a2236; border: 1px solid var(--line); color: var(--text); cursor: pointer; }
#recent a:hover { border-color: var(--gold); }
a[data-id] { color: var(--cyan); cursor: pointer; }
a[data-id]:hover { text-decoration: underline; }
.profile:empty { display: none; }
.profile { max-width: 640px; }
#profile { margin-top: 14px; border-top: 2px solid var(--line); padding-top: 4px; }
.profile .portrait { float: right; width: 110px; image-rendering: pixelated; border: 3px solid var(--gold); box-shadow: 4px 4px 0 #000; margin: 12px 0 8px 12px; }
.profile h3 { display: block; font-size: 13px; margin: 14px 0 6px; }
.profile h4 { font-family: var(--px); font-size: 9px; color: var(--dim); margin: 14px 0 6px; letter-spacing: 1px; }
.profile p { margin: 2px 0; }
.profile .chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.profile .chips span { font-size: 12px; padding: 2px 8px; background: #2a2236; border: 1px solid var(--line); }
.profile ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.profile li { display: flex; justify-content: space-between; gap: 8px; }
.profile li i { font-style: normal; color: var(--dim); font-size: 12px; }
.profile .today li { display: block; font-size: 14px; color: var(--dim); }
/* The family tree: laid out in profile.ts (positions in px), lines in an SVG underneath. The
   broadcast's copy of these rules is in style.css; keep the two in step. */
.profile .fact { display: flex; gap: 10px; align-items: baseline; }
.profile .fact b { flex: none; font-family: var(--px, var(--pixel)); font-size: 8px; letter-spacing: 1px; color: var(--dim); min-width: 62px; font-weight: normal; }
.profile .life { margin: 12px 0 2px; background: #1d1724; border: 2px solid var(--line); box-shadow: 3px 3px 0 #000; }
.profile .life .fact { margin: 0; padding: 6px 10px 5px; line-height: 1.35; }
.profile .life .fact + .fact { border-top: 1px solid #2a2236; }
.profile .life .fact b { color: var(--gold); min-width: 64px; }
.profile .tree { position: relative; width: 352px; margin: 0; background: #1d1724; border: 2px solid var(--line); box-shadow: 3px 3px 0 #000; box-sizing: content-box; }
.profile .tree svg { position: absolute; left: 0; top: 0; }
.profile .tree line { stroke: var(--gold); stroke-width: 2; }
.profile .tree line.dating { stroke: #ff7ac8; }
.profile .tree line.skip { stroke-dasharray: 4 4; opacity: 0.7; } /* a generation not in town */
.profile .tree .at { position: absolute; width: 58px; display: flex; justify-content: center; }
.profile .tree .node { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 54px; color: var(--text); text-decoration: none; }
.profile .tree .node:hover { text-decoration: none; }
.profile .tree .node:hover img { border-color: var(--cyan); }
.profile .tree .node img { display: block; width: 40px; height: 40px; object-fit: cover; object-position: top; image-rendering: pixelated; background: #2a2236; border: 2px solid #c8bfd4; box-shadow: 2px 2px 0 #000; }
.profile .tree .node b { max-width: 54px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--px); font-size: 7px; font-weight: normal; line-height: 9px; }
.profile .tree .node.side img { border-color: var(--line); filter: brightness(0.8); }
.profile .tree .node.side b { color: var(--dim); }
.profile .tree .node.me img { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: 1px; }
.profile .tree .node.me b { color: var(--gold); }
.profile .tree .node.wed img { border-color: var(--gold); }
.profile .tree .node.dating img { border-color: #ff7ac8; }
.profile .tree .node.dead img { filter: grayscale(1) brightness(0.6); border-style: dashed; border-color: #6a5f78; }
.profile .tree .node.dead b { color: #6a5f78; text-decoration: line-through; }
@media (max-width: 480px) {
  /* phones: tighter margins, and the family tree (laid out 352px wide) scaled to fit the card */
  header.top { padding: 14px 16px; }
  header.top h1 small { display: block; margin: 8px 0 0; }
  .page { padding: 14px 12px 30px; gap: 14px; }
  section.card { padding: 14px 14px 16px; }
  .profile .tree { zoom: 0.86; }
}
@media (max-width: 360px) { .profile .tree { zoom: 0.76; } }
.profile .tree .more { position: absolute; width: 24px; text-align: center; font-family: var(--px); font-size: 8px; color: var(--dim); }

/* ---------------------------------------------------------------- the admin page */
/* Columns, not a grid: cards of different heights pack under each other with no holes. */
.cards { columns: 340px 3; column-gap: 22px; }
.cards > .card { break-inside: avoid; margin: 0 6px 22px 0; display: block; }
.cards .wide { column-span: all; }
.cards[hidden] { display: none; }
/* The admin page's tabs, in the header. */
header.top .tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { font-family: var(--px); font-size: 9px; padding: 10px 14px; background: #000; color: var(--dim); border: 2px solid var(--line); cursor: pointer; box-shadow: 3px 3px 0 #000; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold); border-color: var(--gold); background: #1f1a10; }
/* The admin page's price list: a heading over each kind of thing. */
#prices tr.group th { font-family: var(--px); font-size: 9px; color: var(--gold); text-align: left; padding-top: 18px; border-bottom: 2px solid var(--line); }
#prices td:first-child { max-width: 640px; }
.ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ctl:last-child { margin-bottom: 0; }
.ctl label { font-family: var(--px); font-size: 8px; color: var(--dim); }
.ctl .grow { flex: 1 1 130px; }
.ctl .num { width: 84px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.big { font-family: var(--px); font-size: 16px; color: var(--gold); }
/* Tables show in full: no box of their own to scroll inside. A table too wide for its card scrolls sideways only. */
.scroll { overflow-x: auto; overflow-y: visible; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--dim); font-weight: 500; background: var(--panel); }
th, td { padding: 5px 8px 5px 0; vertical-align: top; }
td:last-child, th:last-child { padding-right: 0; }
td.num, th.num { white-space: nowrap; }
/* The rich list: the richest and the brokest side by side. */
.rich { display: grid; grid-template-columns: 3fr 2fr; gap: 0 32px; align-items: start; }
.rich h4 { font-family: var(--px); font-size: 9px; letter-spacing: 2px; color: var(--dim); margin: 0 0 8px; }
@media (max-width: 900px) { .rich { grid-template-columns: 1fr; } }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* The admin page's look at one citizen: facts on the left, their two inventories on the right. */
.person { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px 26px; }
.person h4 { font-size: 10px; letter-spacing: 2px; margin: 0 0 8px; opacity: 0.7; }
.person p { margin-bottom: 5px; }
.person ul, ul.plain { list-style: none; padding: 0; margin: 0; }
.person li, ul.plain li { padding: 3px 0; }
tr[data-view] { cursor: pointer; }
tr[data-view]:hover td { text-decoration: underline; }
@media (max-width: 900px) { .person { grid-template-columns: 1fr; } }
.dilemma { border-top: 2px solid var(--line); padding: 12px 0; }
.dilemma:first-child { border-top: none; padding-top: 0; }
.dilemma p { margin-bottom: 6px; }
#log { list-style: none; padding: 0; font-size: 13px; max-height: 190px; overflow: auto; }
#log li { padding: 2px 0; } #log time { color: var(--dim); margin-right: 8px; }
textarea { width: 100%; height: 76px; font-family: ui-monospace, monospace; font-size: 13px; }
#offline { display: none; color: var(--red); font-family: var(--px); font-size: 9px; } body.offline #offline { display: inline; }
details.card > summary { cursor: pointer; padding: 18px 22px; font-family: var(--px); font-size: 11px; color: var(--gold); letter-spacing: 1px; list-style: none; display: flex; justify-content: space-between; }
details.card > summary::after { content: 'OPEN'; color: var(--dim); }
details.card[open] > summary::after { content: 'CLOSE'; }
details.card > .inside { padding: 0 22px 22px; }

/* Attributes (pips, 1 to 10) and skills (a bar, 0 to 100, and the level): client/abilities.ts. */
.abilities { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; margin: 6px 0 4px; }
.abilities .abs { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.abilities .ab { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 2px 8px; }
.abilities .ab b { font-family: var(--px); font-size: 7px; color: var(--dim); letter-spacing: 1px; font-weight: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abilities .ab em { font-style: normal; font-family: var(--px); font-size: 8px; color: var(--gold); min-width: 34px; text-align: right; }
.abilities .ab small { grid-column: 1 / -1; font-size: 11px; color: var(--dim); margin-top: -3px; }
.abilities .pips { display: flex; gap: 2px; }
.abilities .pips i { width: 7px; height: 9px; background: #2a2236; border: 1px solid #000; }
.abilities .pips i.on { background: var(--gold); }
.abilities .bar { width: 82px; height: 9px; background: #2a2236; border: 1px solid #000; }
.abilities .bar i { display: block; height: 100%; background: #6fc3e0; }
.abilities .more { font-size: 12px; color: var(--dim); margin: 2px 0 0; }
@media (max-width: 560px) { .abilities { grid-template-columns: 1fr; } }
.person .wide { grid-column: 1 / -1; }

/* How a pull of the strings went, in its own row (client/strings.ts). */
.string .said { grid-column: 1 / -1; margin: 2px 0 0; padding: 10px 12px; font-size: 13px; line-height: 1.45; border: 2px solid var(--line); border-left-width: 6px; background: #1a1520; }
.string .said.good { color: #a6f0a6; border-color: #3f7a3f; background: #142014; }
.string .said.bad { color: #ffb3ad; border-color: #8a3a35; background: #241414; }
.string .said.wait { color: var(--dim); }
.string .btn[data-busy] { opacity: 0.45; pointer-events: none; }
/* The page's own yes-or-no box (client/dialog.ts), in place of the browser's. */
.dialog { position: fixed; inset: 0; z-index: 60; background: rgba(8, 6, 12, 0.78); display: flex; align-items: center; justify-content: center; padding: 16px; animation: dialog-in 0.12s ease-out; }
.dialog-box { width: min(460px, 100%); margin: 0; box-shadow: 6px 6px 0 #000; }
.dialog-box h3 { margin-bottom: 14px; }
.dialog-text p { margin: 0 0 10px; font-size: 15px; line-height: 1.5; color: var(--text); }
.dialog-text b { color: var(--gold); font-weight: normal; }
.dialog-text .cost { font-size: 13px; color: var(--dim); }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
@keyframes dialog-in { from { opacity: 0; } to { opacity: 1; } }

/* The creator's abilities step: attribute and skill sliders reuse the age slider's row; the points left in gold. */
.creator h4.sub { font-family: var(--px); font-size: 9px; color: var(--dim); letter-spacing: 1px; margin: 18px 0 10px; font-weight: normal; }
.creator h4.sub:first-of-type { margin-top: 4px; }
.creator h4.sub b { color: var(--text); font-weight: normal; }
.creator h4.sub b.left { color: var(--gold); }
.creator .age.attr { display: grid; grid-template-columns: 64px minmax(80px, 1fr) 210px; gap: 14px; }
.creator .age.attr b { width: auto; font-size: 14px; white-space: nowrap; }
.creator .age.attr i { font-size: 7px; min-width: 0; }
@media (max-width: 700px) { .creator .age.attr { grid-template-columns: 64px minmax(0, 1fr); } .creator .age.attr i { grid-column: 1 / -1; } }
.creator [data-is="skilllevels"] { margin-top: 12px; }
