.people-drawer-prototype #domain-dock{display:none}
.people-drawer-prototype :is(#goals,#side,#log,#card){right:118px;width:min(370px,calc(100vw - 142px));max-width:none;z-index:6}
.people-drawer-prototype #build:not(.folded){left:16px;right:118px;transform:none;width:auto;max-width:none;z-index:6}
.people-drawer-prototype :is(#goals,#side,#log,#card){background:linear-gradient(rgba(43,32,21,.89),rgba(43,32,21,.89)),url('./assets/illustrations/ui-scroll.png') 50% 46%/160% 170%;border-color:#a98750;color:#ead9b5;box-shadow:0 14px 40px #000a}
.people-drawer-prototype :is(#goals,#side,#log,#card) h2{color:#f0d79e;text-shadow:none}
.people-drawer-prototype :is(#goals,#side,#log,#card) p,.people-drawer-prototype :is(#goals,#side,#log,#card) .where,.people-drawer-prototype :is(#goals,#side,#log,#card) .row span,.people-drawer-prototype :is(#goals,#side,#log,#card) .sec h3,.people-drawer-prototype :is(#goals,#side,#log,#card) .sub,.people-drawer-prototype :is(#goals,#side,#log,#card) .adv,.people-drawer-prototype :is(#goals,#side,#log,#card) .ev{color:#c9b48b}
.people-drawer-prototype #goals .obj{color:#bda77d}.people-drawer-prototype #goals .obj b{color:#f0c36a}.people-drawer-prototype #goals li{color:#c9b48b;border-color:#80613a}.people-drawer-prototype #goals li.now{color:#f0d79e}.people-drawer-prototype #goals li.done{color:#8eb86d}
.people-drawer-prototype :is(#goals,#side,#log,#card) .btn,.people-drawer-prototype :is(#goals,#side,#log,#card) select{color:#ead9b5;background:#3b2a19;border-color:#80623b}
.people-drawer-prototype :is(#goals,#side,#log,#card) .fold,.people-drawer-prototype #card .x{color:#d7b56f}

#people-prototype-menu{position:fixed;right:14px;top:50%;z-index:12;display:flex;flex-direction:column;gap:3px;transform:translateY(-50%);padding:6px;background:rgba(28,21,14,.9);border:1px solid #8d6e3f;border-radius:4px;box-shadow:0 8px 24px #0008}
#people-prototype-menu button{position:relative;width:78px;padding:8px 6px;color:#dec79b;background:#3b2a19;border:1px solid #6d502d;border-radius:3px;font:12px/1.1 Georgia,serif;text-align:center;cursor:pointer}
#people-prototype-menu button:hover,#people-prototype-menu button[aria-pressed=true]{color:#261a0d;background:#d7b56f;border-color:#f1d38c}
#people-prototype-menu button:focus-visible{outline:2px solid #f0c36a;outline-offset:2px}
#people-prototype-menu .menu-badge{position:absolute;right:7px;top:50%;transform:translateY(-50%);color:#f07f65;font:16px/1 Georgia,serif;font-style:normal}

#people-drawer-prototype{position:fixed;top:14px;right:118px;bottom:auto;z-index:11;width:min(390px,calc(100vw - 142px));max-height:calc(100dvh - 28px);pointer-events:none}
#people-drawer-prototype[hidden]{display:none}
.people-drawer-surface{max-height:inherit;overflow:auto;scrollbar-width:thin;scrollbar-color:#80623b #2b2016;pointer-events:auto;color:#ead9b5;background:rgba(43,32,21,.97);border:1px solid #a98750;border-radius:4px;box-shadow:0 14px 40px #000a;font-family:Georgia,serif}
.people-drawer-surface::-webkit-scrollbar{width:9px}.people-drawer-surface::-webkit-scrollbar-track{background:#2b2016}.people-drawer-surface::-webkit-scrollbar-thumb{background:#80623b;border:2px solid #2b2016;border-radius:5px}.people-drawer-surface::-webkit-scrollbar-thumb:hover{background:#a98750}
.people-drawer-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:#352619;border-bottom:1px solid #8d6b3a}
.people-drawer-header small{display:block;color:#bda77d;font:10px/1.1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.people-drawer-header h2{margin:4px 0 0;color:#f0d79e;font:22px/1 Georgia,serif}
.people-drawer-header button{width:28px;height:28px;color:#e8d5a7;background:#4a3520;border:1px solid #987846;border-radius:3px;font:22px/24px Georgia,serif;text-align:center;cursor:pointer}
.people-drawer-header button:hover{color:#24180c;background:#d7b56f}
.people-drawer-header button:focus-visible{outline:2px solid #f0c36a;outline-offset:2px}
.people-drawer-content{padding:0 16px 18px}
.people-drawer-content .heritage-ledger{padding:0;background:none;border:0;color:#ead9b5;overflow:visible}
.people-drawer-content .ledger-heading small{display:none}
.people-drawer-content .ledger-heading h2{display:none}
.people-drawer-content .ledger-heading p,.people-drawer-content .ledger-note,.people-drawer-content .workforce-summary p{color:#c9b48b;font:13px/1.45 Georgia,serif}
.people-drawer-content .ledger-heading p{margin:14px 0 8px}
.people-drawer-content .ledger-warning{color:#f0a18b!important}
.people-drawer-content .workforce-summary{display:flex;flex-wrap:wrap;gap:7px 12px;padding:12px 0;border-top:1px solid #80613a;border-bottom:1px solid #80613a}
.people-drawer-content .workforce-summary span{color:#e5d1a7;font:13px/1.2 Georgia,serif}
.people-drawer-content .workforce-summary span b{color:#f0c36a}
.people-drawer-content .workforce-summary .btn{flex-basis:100%;width:max-content;margin-top:4px;padding:8px 10px;color:#2b1c0e;background:#d7b56f;border:1px solid #f0d38d;font:13px Georgia,serif;cursor:pointer}
.people-drawer-content .workforce-summary .btn:hover{background:#ebca84}
.people-drawer-content .resident-list{display:flex;flex-direction:column;gap:0}
.people-drawer-content .resident-row{display:grid;grid-template-columns:34px minmax(0,1fr) 104px;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #5c4529}
.people-drawer-content .resident-portrait{width:34px;height:40px;background-size:400% 400%;background-position:33.333% 66.667%;background-repeat:no-repeat;border-radius:2px}
.people-drawer-content .resident-row strong{display:block;color:#f0dfbc;font:14px/1.15 Georgia,serif}
.people-drawer-content .resident-row small,.people-drawer-content .resident-row p{display:block;margin:3px 0 0;color:#bca77e;font:11px/1.2 Georgia,serif}
.people-drawer-content .resident-row select{width:100%;padding:6px 5px;color:#f0dfbc;background:#3b2a19;border:1px solid #80623b;border-radius:3px;font:12px Georgia,serif}
.people-drawer-content .resident-row .find-home{color:#d7b56f;font:11px Georgia,serif;text-decoration:underline;cursor:pointer}
.people-drawer-toggle{display:block;width:100%;margin:12px 0 2px;padding:8px 10px;color:#2b1c0e;background:#d7b56f;border:1px solid #f0d38d;border-radius:3px;font:13px Georgia,serif;text-align:left;cursor:pointer}
.people-drawer-toggle:hover{background:#ebca84}
.people-drawer-toggle:focus-visible{outline:2px solid #f0c36a;outline-offset:2px}
.people-drawer-content .ledger{display:flex;flex-wrap:wrap;gap:6px 12px;padding:10px 0;border-bottom:1px solid #80613a;color:#c9b48b;font:11px Georgia,serif}
.people-drawer-content .ledger b{color:#f0d79e;font-weight:600}
.people-drawer-content .ledger .q{color:#ef9d82}
.people-drawer-content .bar{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.people-drawer-content .bar button{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-areas:'icon name' 'icon desc' 'icon costs';align-items:center;column-gap:10px;width:100%;min-height:66px;padding:7px 9px;color:#ead9b5;background:#3b2a19;border:1px solid #6d502d;border-radius:3px;text-align:left;cursor:pointer}
.people-drawer-content .bar button:hover,.people-drawer-content .bar button[aria-pressed=true]{background:#554025;border-color:#d7b56f}
.people-drawer-content .bar button.cant{opacity:.65}
.people-drawer-content .bar button .build-thumb{grid-area:icon;width:40px;height:48px;background-size:300% 400%;border-radius:2px}
.people-drawer-content .bar button .n{grid-area:name;color:#f0dfbc;font:15px/1.1 Georgia,serif;text-align:left}
.people-drawer-content .bar button .build-description{grid-area:desc;color:#bda77d;font:11px/1.2 Georgia,serif}
.people-drawer-content .bar button .build-costs{grid-area:costs;display:flex;gap:8px;align-items:baseline;color:#d7b56f;font:11px/1.2 Georgia,serif}
.people-drawer-content .bar button .build-costs b{font-weight:600;color:#f0c36a}
.people-drawer-content .bar button .build-costs small{color:#c9b48b;font:inherit}
.people-drawer-content .bar button .c{display:none}

/* Older paper rules must resolve to the same readable palette when the
   contextual panels are shown on the dark prototype surface. */
.people-drawer-prototype #side b,.people-drawer-prototype #side .row b{color:#f0d79e}
.people-drawer-prototype #side .job.short .k b{color:#ef8f78}
.people-drawer-prototype #side .job.over .k b{color:#f0c36a}
.people-drawer-prototype #card .cols h4{color:#c9b48b}
.people-drawer-prototype #card .cols div{color:#ead9b5}

.balance-drawer-content{color:#ead9b5;font:13px/1.35 Georgia,serif}
.balance-location{padding:2px 0 12px;border-bottom:1px solid #80613a}
.balance-location small{display:block;color:#bda77d;font:10px/1.1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase}
.balance-location strong{display:block;margin-top:4px;color:#f0d79e;font:20px/1.1 Georgia,serif}
.balance-location-tabs{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}
.balance-location-tabs button{padding:5px 8px;color:#c9b48b;background:#3b2a19;border:1px solid #6d502d;border-radius:3px;font:11px Georgia,serif;cursor:pointer}
.balance-location-tabs button[aria-pressed=true],.balance-location-tabs button:hover{color:#2b1c0e;background:#d7b56f;border-color:#f0d38d}
.balance-section{padding:12px 0;border-bottom:1px solid #80613a}
.balance-section h3{margin:0 0 9px;color:#f0d79e;font:15px/1.1 Georgia,serif}
.balance-forecast-grid,.balance-value-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}
.balance-forecast-grid div,.balance-value-grid div{display:flex;justify-content:space-between;gap:8px}
.balance-forecast-grid span,.balance-value-grid span{color:#c9b48b}
.balance-forecast-grid b,.balance-value-grid b{color:#f0d79e;font-weight:600;text-align:right}
.balance-section>p{margin:8px 0 0;color:#bda77d;font:11px/1.35 Georgia,serif}
.balance-meter-row{margin:9px 0 0}
.balance-meter-row>div:first-child{display:flex;justify-content:space-between;gap:8px}
.balance-meter-row span{color:#c9b48b}.balance-meter-row b{color:#f0d79e;font-weight:600}
.balance-meter{height:7px;margin-top:5px;background:#241b13;border:1px solid #6d502d;border-radius:2px;overflow:hidden}
.balance-meter i{display:block;height:100%;background:linear-gradient(90deg,#80623b,#d7b56f)}

@media(max-width:700px){
  #people-prototype-menu{right:7px}
  #people-prototype-menu button{width:62px;padding:8px 3px;font-size:11px}
  #people-drawer-prototype{right:80px;width:calc(100vw - 94px);top:8px;bottom:auto;max-height:calc(100dvh - 16px)}
  .people-drawer-content{padding-left:12px;padding-right:12px}
  .people-drawer-content .resident-row{grid-template-columns:28px minmax(0,1fr);gap:7px}
  .people-drawer-content .resident-portrait{width:28px;height:34px}
  .people-drawer-content .resident-row select{grid-column:2}
}
