/* Palace court uses the existing game dialog and its focus and scrolling model. */
.court-entry,.court-screen{--court-pine:#153c35;--court-brass:#bb8b45;--court-ink:#193c33}
.court-entry{
  display:grid;grid-template-columns:26px minmax(0,1fr) fit-content(40%) 14px;align-items:center;gap:.7rem;
  width:100%;min-height:52px;padding:.5rem .9rem;border:1px solid #bc985c;border-radius:11px;
  background:linear-gradient(115deg,#214f44,#163730);color:#fff3cc;text-align:start;font:inherit;cursor:pointer;
}
.court-entry strong,
.court-entry small{min-inline-size:0;overflow-wrap:anywhere}
.court-entry :is(strong,small){min-inline-size:0;overflow-wrap:anywhere}
.court-entry small{color:#f0dba6;text-align:end}
.court-sigil{display:grid;place-items:center;block-size:26px;color:#f7c66d;font-size:1.65rem;line-height:1}
.court-chevron{justify-self:center;direction:ltr;font-size:1.4rem}[dir=rtl] .court-chevron{transform:rotate(180deg)}
.court-screen{color:var(--court-ink);display:grid;gap:12px;min-width:0}.court-screen h3{color:inherit;margin:0;font-size:1.05rem;line-height:1.3}
.court-intro,.court-task-intro{display:grid;gap:6px;padding:14px 16px;border:1px solid #c39c60;border-radius:12px;background:linear-gradient(115deg,#184e43,#153831);color:#ffefcc}.court-intro strong{font-size:1.15rem;color:#f8d399}.court-intro span,.court-task-intro small{font-size:.86rem;line-height:1.5;color:#f2e9d4}
.court-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.court-card{position:relative;isolation:isolate;overflow:hidden;min-width:0;padding:0;border:1px solid #b08a54;border-radius:10px;background:#143d35;color:#fff8e4;text-align:start;font:inherit;cursor:pointer;display:flex;flex-direction:column}
.court-portrait{width:100%;height:auto;display:block;aspect-ratio:1;object-fit:cover}.court-card-copy{flex:1;display:flex;flex-direction:column;gap:4px;padding:8px 9px 9px;background:linear-gradient(160deg,#205046,#15352e);width:100%;box-sizing:border-box}
.court-card-copy strong{font-size:.94rem;line-height:1.23;overflow-wrap:anywhere;color:#fff5dd}.court-card-copy small{color:#f1d39c;font-size:.76rem}
.court-role{position:absolute;inset-block-start:6px;inset-inline-start:6px;border-radius:5px;background:#152e29ec;border:1px solid #c0a16a;color:#fff5dd;padding:3px 6px;font-size:.67rem;font-weight:bold}
.court-meter{display:block;appearance:none;-webkit-appearance:none;width:100%;height:5px;overflow:hidden;border:none;border-radius:99px;color:#cea75d;background:#d5ccb5}.court-meter::-webkit-progress-bar{background:#d5ccb5}.court-meter::-webkit-progress-value{background:#c59540}.court-meter::-moz-progress-bar{background:#c59540}.court-card .court-meter{position:absolute;bottom:0;border-radius:0;height:3px}
.court-hero{display:flex;align-items:center;gap:16px;padding:10px;background:linear-gradient(115deg,#114239,#153a34 74%,#285146);color:#fff6de;border-radius:12px;border:1px solid #b18c54}
.court-hero .court-portrait{width:clamp(85px,27%,140px);flex:none;border:1px solid #bd9e65;border-radius:7px}.court-hero h3{font-size:clamp(1.04rem,4vw,1.45rem);overflow-wrap:anywhere}.court-hero small,.court-hero p{color:#f1d59e}.court-hero p{margin:4px 0 0;font-size:.9rem}
.court-panel,.court-command{border:1px solid #d8c8a8;border-radius:12px;padding:13px;background:#fbf4e4}
.court-section-title,.court-numbers,.court-stat,.court-payment{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.court-section-title{margin-bottom:9px}.court-section-title span,.court-note,.court-numbers small{color:#4e6457}.court-note,.court-numbers,.court-numbers small{font-size:.82rem;line-height:1.45}.court-note{margin:7px 0 0}.court-numbers{margin-top:6px;flex-wrap:wrap}
.court-actions{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}.court-actions:not(:empty){margin-top:10px}.court-actions .btn{flex:1;white-space:normal;min-width:100px}.court-ok{color:#316047;display:inline-block;margin-top:5px}
.court-stat-list{padding:0;margin:4px 0}.court-stat{padding:.4rem 0;border-block-end:1px solid #e2d8c0;font-size:.88rem}.court-stat dt{color:#536052}.court-stat dd{color:#1b4137;margin:0;font-weight:700;text-align:end}.court-stat:last-child{border:0}
.court-panel .field{margin:10px 0;display:grid;gap:5px}.court-panel input,.court-panel select{font:inherit;min-height:44px;min-width:0;max-width:100%;box-sizing:border-box}
.court-payment{margin:4px 0}.court-payment strong{font-size:1.3rem}.court-effect{font-weight:700;color:#225442;margin:.5em 0}.court-effect:empty{display:none}
.court-screen :focus-visible,.court-entry:focus-visible{outline:3px solid #bd842c;outline-offset:2px}
.court-choices{display:grid;gap:8px}.court-choices button{border:1px solid #bca47b;border-radius:9px;color:#204639;background:#fcf6e9;min-height:48px;padding:12px 14px;text-align:start;font:inherit;cursor:pointer}
.court-choices b,.court-choices span{display:block}.court-choices span{font-size:.86rem;color:#536052;margin-top:2px}.court-task-intro p{margin:0;color:#fff4dd}
.court-command{margin:10px 0}.court-march{gap:8px;flex-wrap:wrap}
@media(max-width:600px){.court-roster{grid-template-columns:repeat(2,minmax(0,1fr))}.court-panel{padding:11px}.court-actions .btn{font-size:.87rem}.court-hero{gap:10px}}
@media(prefers-reduced-motion:no-preference) and (hover:hover){.court-card:hover{border-color:#f0c476;box-shadow:0 2px 8px #3e2c192a}.court-entry:hover,.court-choices button:hover{filter:brightness(1.04)}}
.court-intro small{color:#ead196;font-size:.8rem}.court-province{margin-block:8px}
.court-hero .court-art-note{font-size:.65rem;color:#e9dfc8}
.court-biography p{font-size:.88rem;line-height:1.6;margin:6px 0;color:#3a5145}
.court-insignia{display:flex;align-items:center;gap:10px;padding-bottom:9px;margin-bottom:10px;border-block-end:1px solid #d9caaa}.court-insignia img{height:43px;width:43px;border-radius:50%;border:2px solid #bb9152;object-fit:cover}.court-insignia small,.court-insignia b{display:block}.court-insignia small{color:#615d45;font-size:.72rem}
.court-medals,.court-record ol{display:grid;gap:5px;padding:0;list-style:none;margin:8px 0 0}.court-medals{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}.court-medals li{min-width:0;text-align:center}.court-medals img{display:block;width:min(100%,74px);height:64px;object-fit:contain;margin:0 auto 3px}.court-medals li.is-locked img{filter:grayscale(.95);opacity:.65}.court-medals b,.court-medals small{display:block;font-size:.82rem;overflow-wrap:anywhere}.court-medals small{color:#526054;font-size:.7rem;line-height:1.4;margin-top:3px}
.court-record{margin-top:12px}.court-record h4{font:inherit;font-weight:700;margin:0}.court-record li{padding:5px 0;border-block-end:1px solid #e3d8bf;font-size:.85rem}.court-record small,.court-record p{color:#526054;font-size:.76rem}.court-record p{margin:.3em 0}
.court-effect span,.court-effect strong{display:block;font-size:.85rem}.court-effect span{color:#75583f;font-weight:500}.court-effect strong{margin-top:2px}
.court-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 9px}.court-filters input,.court-filters select{box-sizing:border-box;min-width:0;width:100%;min-height:42px;padding:7px 10px;font:inherit;font-size:.9rem;color:#1b4137;background:#fffaf0;border:1px solid #bcab88;border-radius:8px}.court-filters input{grid-column:1/-1}.court-filters label{display:grid;gap:2px}.court-filters label span{font-size:.75rem;color:#516054}
.court-pagination,.court-pagination div{display:flex;align-items:center;gap:8px}.court-pagination{justify-content:space-between;color:#325146;margin-bottom:7px}.court-pagination small,.court-pagination bdi{font-size:.82rem}.court-pagination button{width:42px;height:42px;border:1px solid #b8a071;border-radius:8px;background:#f7eedb;color:#254d40;font:bold 1.25rem/1 sans-serif;cursor:pointer}.court-pagination button:disabled{opacity:.4;cursor:default}[dir=rtl] .court-pagination button{direction:ltr;transform:scaleX(-1)}.court-no-match{text-align:center;padding:14px 4px}
.court-pagination select{max-width:45%;min-width:0;min-height:36px;border:1px solid #b9a77d;border-radius:7px;background:#fbf5e7;color:#2e4d3e;font:inherit;font-size:.74rem;padding:4px}.court-card-copy .court-card-cost{color:#f2ddae;font-size:.7rem}.court-pagination{gap:4px}.court-pagination div{gap:4px}
@media(max-width:375px){.court-pagination button{width:34px}.court-pagination select{max-width:39%}}

.court-card-skill{color:#d7f0dd;font-size:.79rem;line-height:1.35;overflow-wrap:anywhere}
.court-dossier{display:grid;gap:8px;min-width:0}.court-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;border:1px solid #bfab82;border-radius:10px;background:#eee4cd}
.court-tabs [role=tab]{min-width:0;min-height:42px;padding:5px 3px;border:1px solid transparent;border-radius:7px;background:transparent;color:#435c4f;font:inherit;font-size:.83rem;font-weight:650;line-height:1.25;overflow-wrap:anywhere;cursor:pointer}.court-tabs [aria-selected=true]{border-color:#927345;background:#1c4a3f;color:#fff4d3;box-shadow:0 1px 3px #222b1a20}
.court-tabpanel{display:grid;gap:8px;min-width:0}.court-tabpanel[hidden]{display:none}.court-signature{display:block;color:#21543d;font-size:.93rem;line-height:1.45}.court-traits details{margin-top:6px;border-top:1px solid #d6c6a6}.court-traits summary{padding:9px 0 4px;color:#45654e;font-size:.82rem;cursor:pointer}
.court-actions.court-dossier-actions{position:sticky;bottom:0;z-index:2;margin:0;padding:5px 0 2px;background:#fff9ed;border-radius:9px}.court-hero>div{min-width:0}.court-stat dt{flex:0 0 auto;max-width:42%}.court-tabpanel .court-record li,.court-stat dd{overflow-wrap:anywhere}
.court-card-technique{color:#f1cc85;font-size:.83rem;font-weight:680;line-height:1.25;overflow-wrap:anywhere}.court-skill-title{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-bottom:5px}.court-skill-title b{font-size:1rem;color:#24513e}.court-skill-title small{font-size:.72rem;font-weight:650;color:#705321;border:1px solid #d0b372;border-radius:5px;background:#f7e9c9;padding:2px 5px}.court-signature small{display:block;color:#536956;font-size:.77rem;margin-top:3px}
[data-court-rotation]:empty{display:none}.court-offer-head{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#f7ecd6;border:1px solid #c9ae79;border-radius:10px;padding:7px 9px}.court-offer-head strong,.court-offer-head small{display:block}.court-offer-head strong{font-size:.87rem}.court-offer-head small,.court-quote-person small{color:#53634f;font-size:.76rem}.court-offer-head button{padding:4px 8px;min-height:42px;font-size:.81rem;flex-shrink:0}.court-quote-person{display:flex;gap:12px;align-items:center;margin-bottom:10px}.court-quote-person img{width:64px;height:64px;border-radius:7px;border:1px solid #b19663}.court-quote-warning{font-size:.84rem;color:#874d28}
.court-rotation-rules{font-size:.78rem;color:#495d4e}.court-rotation-rules summary{padding:5px 0;cursor:pointer}.court-rotation-rules p{margin:1px 0 3px;line-height:1.45}
.court-offer-head{display:grid;grid-template-columns:minmax(0,1fr) auto}.court-offer-head .btn{display:grid;align-content:center;justify-items:center;gap:1px;white-space:normal;text-align:center;max-width:142px}.court-offer-head>div{min-width:0}.court-pagination div bdi{white-space:nowrap}
@media(max-width:375px){.court-offer-head{grid-template-columns:minmax(0,1fr) minmax(70px,39%)}.court-offer-head .btn{min-width:0}.court-pagination{gap:3px}.court-pagination select{max-width:34%}.court-pagination div{gap:3px}.court-pagination button{width:30px}}
.court-offer-head .court-rush-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 6px;white-space:normal;min-width:0;min-height:44px;cursor:pointer;border:1px solid #aa8a50;border-radius:8px;background:#fcefcd;color:#52401c;font:inherit;font-size:.8rem;line-height:1.25}.court-rush-button small{direction:ltr;white-space:nowrap;font:inherit;font-size:.72rem;color:#594321}

.court-recruit-board{margin-block:0 12px}
.court-recruit-board h2{margin:0 0 8px}
.court-recruit-list{display:grid;gap:6px;min-width:0}
.court-recruit-row{display:flex;align-items:center;gap:10px;width:100%;min-width:0;min-height:54px;padding:5px 9px;border:1px solid #cfbd9a;border-radius:9px;background:#faf4e6;color:#193a32;text-align:start;font:inherit;cursor:pointer}
.court-recruit-row:focus-visible{outline:3px solid #1b735d;outline-offset:1px}
.court-recruit-row .court-portrait{width:40px;height:40px;flex:0 0 40px;border-radius:7px;object-fit:cover}
.court-recruit-row>span{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}
.court-recruit-row small{font-size:.78rem;color:#54645a}
.court-recruit-row[data-court-unread]{border-inline-start:3px solid #c42a34}
.court-recruit-row[data-court-unread]::after{content:"";width:9px;height:9px;flex:0 0 9px;margin-inline-start:auto;border-radius:50%;background:#c42a34}
.court-credit-more>summary{padding-block:12px;color:#225747;cursor:pointer;font-weight:700}

.court-scopes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid #bfab82;
  border-radius: 10px;
  background: #eee4cd;
}
.court-scopes button {
  min-width: 0;
  min-height: 44px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #314c40;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}
.court-scopes button[aria-pressed="true"] {
  border-color: #927345;
  background: #1c4a3f;
  color: #fff4d3;
}
.court-scopes button:focus-visible {outline: 2px solid #926e31; outline-offset: 1px}
.court-filters[hidden] {display: none}

.court-palace-entries { display:grid; gap:6px; margin-block:8px; }
.court-posts-emblem { width:26px; height:26px; object-fit:contain; flex:none; }
.court-appointments { min-inline-size:0; }
.court-appointments .field { min-inline-size:0; grid-template-columns:minmax(0,1fr); }
/* The commander list expands within the dispatch form in both march modes. */
.court-command-title { display:block; margin-block-end:5px; color:#344b40; font-size:.82rem; font-weight:700; }
.court-command-picker { min-inline-size:0; border:1px solid #789887; border-radius:9px; background:#f6f9f1; color:#20493d; }
.court-command-picker > summary, .court-command-choices > button, .court-command-empty {
  box-sizing:border-box; display:flex; align-items:center; gap:10px; inline-size:100%; min-block-size:44px;
  padding:8px 12px; font:inherit; font-weight:650; text-align:start; overflow-wrap:anywhere;
}
.court-command-picker { -webkit-tap-highlight-color:transparent; }
.court-command-picker > summary:active, .court-command-choices > button:active { background:#dbeadb; }
.court-command-picker > summary { cursor:pointer; list-style:none; justify-content:space-between; }
.court-command-picker > summary::-webkit-details-marker { display:none; }
.court-command-picker > summary::after {
  content:''; flex:none; width:8px; height:8px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); margin-inline:4px;
}
.court-command-picker[open] > summary::after { transform:rotate(225deg); }
.court-command-choices { display:grid; border-block-start:1px solid #bdcebd; }
.court-command-choices > button { border:0; border-radius:0; background:transparent; color:inherit; cursor:pointer; }
.court-command-choices > button + button { border-block-start:1px solid #d9e2d5; }
.court-command-choices > button:last-child { border-end-start-radius:8px; border-end-end-radius:8px; }
.court-command-choices > button[aria-pressed="true"] { background:#dbeadb; }
.court-command-choices > button[aria-pressed="true"]::after {
  content:''; flex:none; width:7px; height:12px; margin-inline-start:auto; margin-inline-end:4px;
  border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg);
}
.court-command-picker > summary:focus-visible, .court-command-choices > button:focus-visible { outline:2px solid #21694f; outline-offset:-3px; }
:root[data-family-input="pointer"] .court-command-picker > summary:focus { outline:none; }
.court-command-empty { border:1px solid #c4cdc0; border-radius:9px; background:#ebeee6; color:#536157; }
.court-appointments select { inline-size:100%; }
#modal-body .court-screen select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  min-block-size: 44px;
  max-inline-size: 100%;
  min-inline-size: 0;
  padding-block: 7px;
  padding-inline: 12px 47px;
  border: 1px solid #538373;
  border-radius: 9px;
  background: #f1f8ed url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Crect width='26' height='26' rx='7' fill='%23d4e7d9'/%3E%3Cpath d='m8 11 5 5 5-5' fill='none' stroke='%23235145' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 8px center / 26px 26px no-repeat;
  color: #20493d;
  cursor: pointer;
  font-weight: 650;
  text-overflow: ellipsis;
}
[dir="rtl"] #modal-body .court-screen select { background-position: left 8px center; }
#modal-body .court-screen select:enabled:hover { border-color: #316b57; }
#modal-body .court-screen select:disabled {
  padding-inline-end: 12px;
  border-color: #c4cdc0;
  background: #ebeee6;
  color: #536157;
  -webkit-text-fill-color: #536157;
  cursor: default;
  opacity: 1;
}
@media (forced-colors: active) {
  #modal-body .court-screen select {
    appearance: auto;
    -webkit-appearance: auto;
    padding-inline-end: 8px;
    background-image: none;
  }
  #modal-body .court-screen select:disabled { -webkit-text-fill-color: GrayText; }
}

.court-incumbent {
  display:flex; align-items:center; gap:10px; min-inline-size:0; min-height:50px;
  padding:8px 10px; border-inline-start:3px solid #b59359; border-radius:5px;
  background:#e9eddf; color:#203d31;
}
.court-incumbent .court-portrait { width:42px; height:42px; flex:none; border:1px solid #a68a56; border-radius:50%; }
.court-incumbent > div { display:grid; gap:2px; min-inline-size:0; overflow-wrap:anywhere; }
.court-incumbent small,.court-incumbent span { font-size:.79rem; color:#455e4c; }
.court-incumbent > div { flex:1; }
.court-incumbent .court-release { flex:none; min-block-size:44px; padding-inline:10px; margin-inline-start:auto; }
.court-current-post .court-section-title { flex-wrap: wrap; margin: 0; }
.court-current-post .court-section-title strong {
  margin-inline-start: auto;
  min-inline-size: 0;
  max-inline-size: 100%;
  text-align: end;
  overflow-wrap: anywhere;
  color: #21473b;
}
.court-current-post .court-stat-list { margin: 8px 0 0; }
.court-current-post .court-stat dt { flex: 1 1 auto; max-width: none; }
.court-current-post .court-stat dd { min-inline-size: 0; }

.public-court-collection {
  margin-block: 16px;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid #9db7a4;
  border-radius: 14px;
  background: #f7f8ef;
  color: #1b423c;
}
.public-court-collection > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 10px;
}
.public-court-collection h2 { margin: 0; font-size: 1.07rem; line-height: 1.4; color: #183f37; }
.public-court-collection > header > span { color: #496354; font-size: .84rem; font-variant-numeric: tabular-nums; }
.public-court-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}
.public-court-figure {
  min-inline-size: 0;
  border: 1px solid #c6cbb6;
  border-radius: 9px;
  background: #fffdf5;
}
.public-court-collection summary {
  list-style: none;
  cursor: pointer;
  border-radius: 8px;
}
.public-court-collection summary::-webkit-details-marker { display: none; }
.public-court-figure > summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-block-size: 60px;
  padding: 6px 9px;
  box-sizing: border-box;
}
.public-court-figure .court-portrait {
  inline-size: 46px;
  block-size: 46px;
  box-sizing: border-box;
  border: 1px solid #b99960;
  border-radius: 8px;
}
.public-court-caption { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.public-court-caption bdi { font-size: .89rem; font-weight: 700; color: #183f37; }
.public-court-caption small { font-size: .75rem; color: #4c6154; }
.public-court-figure > p, .public-court-empty {
  margin: 0;
  line-height: 1.6;
  font-size: .86rem;
  color: #3c5548;
  overflow-wrap: anywhere;
}
.public-court-figure > p { padding: 8px 12px 12px; border-block-start: 1px solid #e6e6d9; }
.public-court-collection summary::after {
  content: "";
  display: block;
  inline-size: 7px;
  block-size: 7px;
  border-right: 2px solid #657b67;
  border-bottom: 2px solid #657b67;
  transform: rotate(45deg);
}
.public-court-collection details[open] > summary::after { transform: rotate(225deg); }
.public-court-collection summary:focus-visible { outline: 3px solid #986e2a; outline-offset: 1px; }
.public-court-more { margin-block-start: 6px; }
.public-court-more > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 44px;
  color: #285647;
  font-weight: 650;
  font-size: .86rem;
}
.public-court-more:not([open]) > summary .public-court-collapse,
.public-court-more[open] > summary .public-court-expand { display: none; }
@media (max-width: 760px) {
  .public-court-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .public-court-grid { grid-template-columns: minmax(0, 1fr); }
}

/* The palace groups land and buildings into seats of the same court. */
.court-post-board,
.court-post-editor {
  display: grid;
  min-inline-size: 0;
  gap: 12px;
}
.court-post-group { min-inline-size: 0; }
.court-post-group > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 8px;
  color: #224c40;
  font-size: .99rem;
}
.court-post-group > h3::after {
  content: "";
  flex: 1;
  block-size: 1px;
  background: #c6be99;
}
.court-post-grid,
.court-candidates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 7px;
  min-inline-size: 0;
}
.court-post-slot,
.court-candidate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-block-size: 57px;
  min-inline-size: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #c8cbb7;
  border-radius: 9px;
  background: #f8f7ec;
  color: #204639;
  text-align: start;
  line-height: 1.32;
  font-family: inherit;
}
button.court-post-slot,
button.court-candidate {
  border-color: #86a894;
  background: #f1f6e9;
  cursor: pointer;
}
button.court-post-slot::after {
  content: "";
  flex: none;
  inline-size: 6px;
  block-size: 6px;
  margin-inline-start: auto;
  border-inline-end: 2px solid #48725d;
  border-block-start: 2px solid #48725d;
  transform: rotate(45deg);
}
[dir="rtl"] button.court-post-slot::after { transform: rotate(-45deg); }
@media (hover: hover) {
  button.court-post-slot:hover,
  button.court-candidate:hover { border-color: #487c65; background: #e7efdf; }
}
.court-candidate[aria-pressed="true"],
.court-candidate[aria-checked="true"] {
  background: #dcebdc;
  border-color: #2e6c54;
  box-shadow: inset 0 0 0 1px #2e6c54;
}
.court-post-landmark {
  position: relative;
  display: block;
  flex: none;
  inline-size: 65px;
  block-size: 52px;
  min-inline-size: 0;
  margin-inline-end: 3px;
}
.court-post-landmark > img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border: 1px solid #c8ba93;
  border-radius: 6px;
  object-fit: cover;
  background: linear-gradient(145deg, #eee4c2, #dfd6b9);
}
.court-post-slot[data-post-key^="province:"] .court-post-landmark > img { object-fit: contain; }
.court-post-landmark .court-post-avatar {
  position: absolute;
  inset-inline-end: -4px;
  inset-block-end: -3px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 25px;
  height: 25px;
  overflow: hidden;
  border: 1.5px solid #eace8d;
  border-radius: 50%;
  background: #34473a;
  color: #fff2c8;
  box-shadow: 0 1px 3px #19342c99;
}
.court-post-slot[data-post-state="vacant"] .court-post-avatar {
  width: 21px;
  height: 21px;
  border-style: dashed;
}
.court-post-avatar .court-vacant-glyph {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
}
.court-post-avatar .court-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.court-post-slot[data-post-state="locked"] { background: #f1f1e8; border-color:#d3d6c9; }
.court-post-slot[data-post-state="sanctuary"] { background: #f5edda; border-color: #c9b785; }
.court-candidate > .court-portrait {
  display: block;
  flex: none;
  box-sizing: border-box;
  inline-size: 42px;
  block-size: 42px;
  border: 2px solid #b99a61;
  border-radius: 50%;
  object-fit: cover;
}
.court-post-copy,
.court-candidate > span:not(.court-post-avatar),
.court-candidate > div:not(.court-post-avatar){
  display: grid;
  min-inline-size: 0;
  gap: 2px;
  overflow-wrap: anywhere;
}
.court-post-copy,
.court-candidate > :is(span,div):not(.court-post-avatar) {
  display: grid;
  min-inline-size: 0;
  gap: 2px;
  overflow-wrap: anywhere;
}
.court-post-copy strong,
.court-candidate strong { font-size: .86rem; font-weight: 720; }
.court-post-copy b { font-size: .8rem; font-weight: 650; color: #36584b; }
.court-post-copy small,
.court-candidate small { color: #526455; font-size: .74rem; line-height: 1.4; }
.court-post-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 7px;
  min-inline-size: 0;
}
.court-post-filters > * { flex: 1 1 9rem; min-inline-size: 0; }
.court-post-filters label { display: grid; gap: 4px; font-size: .83rem; font-weight: 650; }
.court-post-filters input,
.court-post-filters select{ width: 100%; box-sizing: border-box; }
.court-post-filters :is(input,select) { width: 100%; box-sizing: border-box; }
.court-comparison {
  min-inline-size: 0;
  overflow-wrap: anywhere;
  border: 1px solid #abbba3;
  border-radius: 9px;
  padding: 10px;
  background: #f3f6e9;
}
.court-compare-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  padding-block: 9px;
  font-size: .83rem;
  line-height: 1.45;
}
.court-compare-row + .court-compare-row { border-block-start: 1px solid #c9d4c0; }
.court-compare-row > strong,
.court-compare-row > small{
  grid-column: 1 / -1;
  min-inline-size: 0;
}
.court-compare-row > :is(strong,small) {
  grid-column: 1 / -1;
  min-inline-size: 0;
}
.court-compare-row > small { color: #536351; }
.court-compare-row > span {
  display: block;
  min-inline-size: 0;
  text-align: start;
}
.court-compare-row:last-child { margin-block-start: 6px; border-block-start: 1px solid #b8c5ab; }
.court-net { font-weight: 750; font-variant-numeric: tabular-nums; }
.court-net[data-gain="up"] { color: #176743; }
.court-net[data-gain="down"] { color: #9b4024; }
.court-net[data-gain="equal"] { color: #526455; }
@media (max-width: 420px) {
  .court-post-slot, .court-candidate { padding: 7px 9px; }
  .court-post-editor .court-incumbent { flex-wrap: wrap; }
  .court-post-editor .court-incumbent > div { min-inline-size: min(7.5rem, 58%); }
}
@media (max-width: 520px) {
  .court-compare-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .court-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .court-post-slot:not([data-post-state="locked"]) { grid-column: 1 / -1; }
  .court-post-slot[data-post-state="locked"] {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }
  .court-post-slot[data-post-state="locked"] .court-post-landmark {
    inline-size: 100%;
    block-size: 45px;
    margin: 0;
  }
  .court-candidates { grid-template-columns: minmax(0, 1fr); }
}

.court-siege-talent {
  display: grid;
  gap: 3px;
  margin-block: 9px;
  padding-inline-start: 9px;
  border-inline-start: 3px solid #b48947;
  color: #234b42;
  font-size: .86rem;
  overflow-wrap: anywhere;
}
.court-siege-talent small,
.court-siege-summary > small { color: #4d655c; }
.court-siege-summary {
  margin-block: 10px;
  padding: 10px 12px;
  border: 1px solid #bfcaaf;
  border-radius: 10px;
  background: #f4f5e9;
  color: #233f35;
  font-size: .86rem;
  line-height: 1.45;
  text-align: start;
  overflow-wrap: anywhere;
}
.court-siege-summary h4, .court-siege-summary dd,
.court-siege-summary p { margin: 0; }
.court-siege-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0;
}
.court-siege-summary dl > div {
  padding: 5px 7px;
  border-inline-start: 2px solid #a88b5a;
  background: #e9eddd;
}
.court-siege-summary dt, .court-siege-summary .court-siege-attack { font-size: .76rem; }
.court-siege-summary dd:first-of-type { font-size: 1.05rem; font-weight: 740; }
.court-siege-summary .court-breach { margin-block: 4px; font-weight: 700; }
.court-siege-summary [data-siege-result="breach"] { color: #1b654b; }
.court-siege-summary [data-siege-result="held"] { color: #754d2b; }
.court-siege-summary summary { padding-block: 7px; cursor: pointer; font-weight: 650; }
.court-siege-summary ul { margin: 0; padding: 0; list-style: none; }
.court-siege-summary li { display: grid; gap: 2px; padding-block: 4px; }

/* Emblems and service medals expand in the open character card. */
.court-dossier .court-insignia,
.court-dossier .court-medal-toggle {
  appearance: none;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 7px 10px;
  border: 1px solid #c8b68d;
  border-radius: 10px;
  box-shadow: none;
  background: #fffaf0;
  color: #173f39;
  font: inherit;
  cursor: pointer;
}
.court-dossier .court-insignia { text-align: start; margin: 0 0 10px; }
.court-dossier .court-insignia::after,
.court-dossier .court-medal-toggle::after {
  content: '';
  display: block;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border: solid #796131;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.court-dossier .court-insignia::after { margin-inline-start: auto; margin-inline-end: 4px; }
.court-dossier .court-medal-toggle { display: grid; justify-items: center; align-content: start; gap: 2px; height: 100%; text-align: center; }
.court-dossier .court-medals { align-items: stretch; }
.court-dossier .court-medal-toggle::after { margin: 3px auto 2px; }
.court-dossier [data-court-explain][aria-expanded="true"] { background: #e8f0e3; border-color: #527763; }
.court-dossier [data-court-explain][aria-expanded="true"]::after { transform: rotate(225deg); }
.court-dossier [data-court-explain]:focus-visible { outline: 2px solid #216652; outline-offset: 2px; }
.court-dossier .court-symbol-note { padding: 10px 12px; margin-block: 8px 12px; border-inline-start: 3px solid #af8944; border-radius: 5px; background: #f3edda; color: #183b35; text-align: start; overflow-wrap: anywhere; line-height: 1.55; }
.court-dossier .court-symbol-note[hidden] { display: none; }
.court-dossier .court-symbol-note p { color: inherit; margin: 0; }
.court-dossier .court-symbol-note small { display: block; margin-block-start: 4px; color: #475d50; }

.court-fallen .court-portrait { filter: grayscale(1); }

.court-roster.court-recruit-rows { grid-template-columns: 1fr; }
.court-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 8px;
  padding: 6px;
  border: 1px solid #c6ab7d;
  border-radius: 10px;
  background: #f7f1df;
}
.court-offer-row .court-card {
  min-height: 70px;
  flex-direction: row;
  align-items: center;
  border-radius: 7px;
}
.court-offer-row .court-card:only-child { grid-column: 1 / -1; }
.court-offer-row .court-card > .court-portrait {
  align-self: stretch;
  inline-size: clamp(50px, 16vw, 76px);
  block-size: auto;
  object-position: center 24%;
}
.court-offer-row .court-role, .court-offer-row .court-card-skill { display: none; }
.court-offer-row .court-card-copy { min-inline-size: 0; gap: 2px; }
.court-inline-trigger { max-inline-size: 7rem; }
.court-inline-pledge:not([hidden]) {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px;
  padding: 9px 3px 3px;
}
.court-inline-pledge[hidden] { display: none; }
.court-pledge-balance, .court-inline-pledge > small { flex-basis: 100%; }
.court-pledge-balance, .court-inline-pledge label span { font-size: .78rem; color: #485c4e; }
.court-inline-pledge label { flex: 1 1 6rem; display: grid; gap: 3px; min-width: 0; }
.court-inline-pledge input { inline-size: 100%; min-inline-size: 0; box-sizing: border-box; min-height: 42px; }
.court-inline-pledge .btn, .court-inline-trigger { min-height: 44px; font-size: .82rem; padding: 6px 9px; }
.court-pledge-receipt { display: grid; gap: 3px; padding: 9px 12px; border-inline-start: 3px solid #4b826b; background: #e4eedf; color: #224a3d; }
.court-pledge-receipt small { font-variant-numeric: tabular-nums; }
.public-court-caption .court-life-link { color: #266247; text-decoration: underline; text-underline-offset: 2px; }
.court-board-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.court-board-filters button {
  flex: 1 1 auto; padding: 5px 8px; min-height: 44px; color: #254f43; background: #eff2e7;
  border: 1px solid #adc3ab; border-radius: 8px; font: inherit; font-size: .84rem; cursor: pointer;
}
.court-board-filters button[aria-pressed="true"] { background: #245447; color: #fff5da; border-color: #245447; }
.court-candidate-rate { color: #1a6047; font-size: .83rem; }
.court-compare-row.court-compare-offices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.court-compare-offices > span { display: grid; gap: 2px; align-content: start; }
.court-compare-offices > span > small { color: #526455; }
.court-compare-offices > span > b { color: #254f43; }
.court-offer-row > .court-pledge-receipt { grid-column: 1 / -1; margin-block-start: 6px; }
.court-command-detail summary { display: list-item; padding-block: 10px; color: #285d4a; cursor: pointer; font-size: .85rem; font-weight: 650; }

.court-screen[data-court-screen="roster"] {
  container: court-roster / inline-size;
  grid-template-columns: minmax(0, 1fr);
}
.court-filters label { min-inline-size: 0; grid-template-columns: minmax(0, 1fr); }
.court-offer-head { flex-wrap: wrap; }
.court-pagination { flex-wrap: wrap; }
@container court-roster (max-width: 18rem) {
  .court-filters, .court-offer-row { grid-template-columns: minmax(0, 1fr); }
  .court-inline-trigger { justify-self: end; margin-block-start: 5px; }
  .court-offer-head > div { flex-basis: 100%; }
  .court-rush-button { flex-direction: row; gap: 6px; }
}
