/* The Guild window (key G), after the original window: dark title bars with yellow text over beige panels, a fixed-size content, three tabs. All colours come from the theme variables. */
.gd-content { height: 428px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.gd-box { border-radius: 4px; background: var(--gf-paper); box-shadow: inset 0 0 0 1px var(--gf-tile-edge), 0 0 0 1px var(--gf-frame); min-height: 0; }
.gd-bar { display: flex; align-items: center; gap: 8px; padding: 2px 8px; font-size: var(--fs-body); font-weight: 700; color: var(--gf-title); background: var(--gf-plate-dark); border-radius: 3px 3px 0 0; }
.gd-bar .fr-sub { font-weight: 400; color: #bdbacf; }
.gd-bar .btn { margin-left: auto; }
.gd-title { font-weight: 800; font-size: var(--fs-lead); color: #5c5682; }
.gd-pad { padding: 5px 8px; }
.gd-btn, .gd-content .btn.small { padding: 2px 12px; font-size: var(--fs-body); }
.gd-content .btn:disabled { opacity: 0.45; cursor: default; }
/* Guilde tab */
.gd-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 6px; height: 156px; flex: none; }
.gd-info { padding: 5px 8px; display: flex; flex-direction: column; gap: 2px; }
.gd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.gd-line { display: flex; gap: 4px; font-size: var(--fs-body); line-height: 1.5; min-width: 0; }
.gd-k { flex: 0 0 auto; min-width: 64px; color: #464262; font-weight: 700; }
.gd-v { color: var(--gf-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.gd-lvl { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: var(--fs-body); font-weight: 700; }
.gd-lvl .xpbar { flex: 1; height: 8px; }
.gd-ann { display: flex; flex-direction: column; }
.gd-ann textarea { flex: 1; resize: none; margin: 4px; font-size: var(--fs-body); }
.gd-annText { flex: 1; padding: 5px 8px; font-size: var(--fs-body); white-space: pre-wrap; word-break: break-word; overflow-y: auto; }
.gd-annSave { align-self: flex-end; margin: 0 4px 4px; }
.gd-members { flex: 1; display: flex; flex-direction: column; }
.gd-off { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: var(--fs-body); cursor: pointer; }
.gd-table { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gd-trow { display: grid; grid-template-columns: 1.3fr 0.4fr 1fr 1fr 1.3fr 1.2fr; gap: 6px; padding: 2px 8px; font-size: var(--fs-body); align-items: center; }
.gd-trow > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-thead { font-weight: 800; color: var(--gf-ink); background: var(--gf-plate); border-bottom: 1px solid var(--gf-frame); }
.gd-rows { flex: 1; min-height: 0; overflow-y: auto; }
.gd-member { cursor: pointer; color: #7d7364; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.gd-member.on { color: var(--gf-ink); font-weight: 700; }
.gd-member:hover { background: var(--gf-tile); }
.gd-member.sel { background: var(--gf-plate); box-shadow: inset 3px 0 0 var(--gf-frame-hi); }
.gd-foot { display: flex; gap: 5px; flex: none; }
.gd-gap { flex: 1; }
/* rank gems */
.gd-badge { display: inline-block; width: 14px; height: 14px; flex: none; clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
/* Social tab */
.gd-social { flex: 1; min-height: 0; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 6px; }
.gd-left { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.gd-ranksbox, .gd-powbox { display: flex; flex-direction: column; }
.gd-ranks { padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.gd-rank { display: flex; align-items: center; gap: 8px; padding: 2px 8px; border-radius: 3px; background: var(--gf-plate-dark); color: #ebeaf1; font-size: var(--fs-body); font-weight: 700; }
.gd-rank .fr-sub { margin-left: auto; color: #c0bdd3; }
.gd-rank input { flex: 1; min-width: 0; }
.gd-treasure { display: flex; align-items: center; gap: 8px; padding: 3px 8px; font-size: var(--fs-body); font-weight: 700; border-top: 1px solid var(--gf-tile-edge); }
.gd-powbox { flex: 1; }
.gd-ptable { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 4px; }
.gd-prow { display: grid; grid-template-columns: 1.4fr repeat(6, 22px); align-items: center; gap: 2px; padding: 1px 2px; font-size: calc(11.5px * var(--ui-text)); }
.gd-pcell { display: flex; justify-content: center; }
.gd-phead { border-bottom: 1px solid var(--gf-tile-edge); padding-bottom: 3px; margin-bottom: 2px; }
.gd-pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-board { display: flex; flex-direction: column; }
.gd-plist { flex: 1; min-height: 0; overflow-y: auto; }
.gd-prow2 { display: grid; grid-template-columns: 30px 1fr 0.6fr 0.7fr; gap: 6px; padding: 3px 6px; font-size: var(--fs-body); cursor: pointer; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.gd-prow2:hover { background: var(--gf-tile); }
.gd-pthead { cursor: default; font-weight: 800; background: var(--gf-plate); border-bottom: 1px solid var(--gf-frame); }
.gd-pthead:hover { background: var(--gf-plate); }
.gd-ptitle, .gd-pauthor { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-new { color: #d11a1a; font-weight: 900; }
.gd-pdate { text-align: right; opacity: 0.75; }
.gd-pbody { padding: 4px 8px 6px 38px; background: var(--gf-paper-dark); }
.gd-ptext { white-space: pre-wrap; word-break: break-word; font-size: var(--fs-body); margin-bottom: 4px; }
.gd-form { display: flex; flex-direction: column; gap: 4px; padding: 4px 6px; border-top: 1px solid var(--gf-tile-edge); }
.gd-form textarea { resize: none; }
.gd-formbtns { display: flex; align-items: center; gap: 6px; }
.gd-boardfoot { display: flex; justify-content: space-between; align-items: center; padding: 3px 8px; border-top: 1px solid var(--gf-tile-edge); font-size: var(--fs-body); }
/* Exploits tab */
.gd-exploits { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 6px; }
.gd-exleft { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.gd-king { padding: 5px 8px; display: grid; grid-template-columns: 38px 1fr; gap: 2px 8px; align-items: center; }
.gd-king select { grid-column: 1 / -1; font-size: var(--fs-body); }
.gd-kname { font-weight: 800; font-size: var(--fs-strong); color: #5c5682; }
.gd-kdesc { font-size: calc(11.5px * var(--ui-text)); color: var(--gf-ink); line-height: 1.3; }
.gd-kicon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--gf-plate-dark); color: #b6b2cc; font-size: calc(20px * var(--ui-text)); font-weight: 800; }
.gd-kbar { display: flex; align-items: center; gap: 8px; padding: 3px 8px; font-size: calc(11.5px * var(--ui-text)); font-weight: 700; }
.gd-kbar .xpbar { flex: 1; height: 8px; }
.gd-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; }
.gd-tile { display: flex; align-items: center; gap: 6px; padding: 4px 6px; min-width: 0; border-radius: 4px; background: var(--gf-paper-dark); box-shadow: inset 0 0 0 1px var(--gf-tile-edge); cursor: pointer; font-size: calc(11.5px * var(--ui-text)); font-weight: 700; }
.gd-tile:hover { background: var(--gf-tile); }
.gd-tile.sel { box-shadow: inset 0 0 0 2px var(--gf-frame-hi); }
.gd-tile.on { background: rgba(120, 200, 90, 0.35); }
.gd-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-ticon { width: 32px; height: 32px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px var(--gf-frame); image-rendering: pixelated; }
.gd-tdetail { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.gd-tsub { font-size: var(--fs-body); padding: 4px 8px 0; }
.gd-tproc { font-size: var(--fs-small); font-style: italic; opacity: 0.8; padding: 2px 8px 0; }
.gd-tcost { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: calc(11.5px * var(--ui-text)); }
.gd-tcost .btn { margin-left: auto; }
.gd-prestige { display: flex; flex-direction: column; }
.gd-exlist { flex: 1; min-height: 0; overflow-y: auto; padding: 3px 8px; }
.gd-exhead { margin: 4px 0 2px; font-size: var(--fs-body); font-weight: 800; color: var(--gf-ink); border-bottom: 1px solid var(--gf-tile-edge); }
.gd-exrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: var(--fs-body); padding: 1px 0 1px 8px; }
.gd-exv { color: #4b466a; font-weight: 700; text-align: right; }
.gd-tstate { margin-left: auto; text-align: right; font-size: calc(11.5px * var(--ui-text)); opacity: 0.85; }
.gd-tstate.on { color: #2f7a22; opacity: 1; }
