.guild-archive { display:grid; gap:12px; min-width:0; color:var(--text-1,#eee4cc); }
.gh-nav { display:flex; flex-wrap:wrap; gap:5px; border-bottom:1px solid #8b724941; padding-bottom:9px; }
.gh-tab { appearance:none; font:inherit; font-weight:600; font-size:13px; cursor:pointer; color:var(--text-2,#bcb199); background:transparent; border:1px solid transparent; border-radius:4px; padding:8px 11px; }
.gh-tab:hover,.gh-tab[aria-pressed=true] { color:#f6d990; background:#b1924730; border-color:#aa8b454f; }
body.interface-shell #guildScr .guild-workspace .guild-archive :is(input,button,.gh-list):focus-visible,
body.interface-shell #guildScr .guild-workspace .guild-section-nav button:focus-visible { outline:2px solid #d7b66a; outline-offset:-3px; }
.gh-choice { flex:0 1 auto; max-width:100%; }
.gh-choice-trigger { display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:0; max-width:100%; min-height:36px; padding:6px 11px; text-align:left; color:var(--text-1,#eee4cc); border:1px solid var(--glass-border-b,#75603d); border-radius:5px; background:var(--guild-panel-fill,#211c14); font:600 13px/1.3 var(--font-ui,sans-serif); cursor:pointer; }
.gh-choice-trigger span { min-width:0; overflow-wrap:anywhere; }
.gh-choice-trigger::after { content:''; flex:none; width:6px; height:6px; margin:-3px 1px 0; border:solid #d8b878; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.gh-choice-trigger[aria-expanded=true]::after { margin:3px 1px 0; transform:rotate(225deg); }
.gh-choice-trigger:is(:hover,[aria-expanded=true]) { border-color:#b19150; }
body.interface-shell .gh-options.character-title-menu { box-sizing:border-box; min-width:0; padding:4px; color:var(--text-1,#eee4cc); background:linear-gradient(155deg,#282219,#161411); border:1px solid #947844; box-shadow:0 6px 24px #0009; }
body.interface-shell .gh-options [role=option] { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:35px; color:inherit; font:500 13px/1.35 var(--font-ui,sans-serif); overflow-wrap:anywhere; }
body.interface-shell .gh-options [aria-selected=true] { color:#f5d790; }
body.interface-shell .gh-options [aria-selected=true]::after { content:''; flex:none; width:5px; height:9px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(42deg); }
body.interface-shell .gh-options [role=option]:focus-visible { outline:1px solid #d7b66a; outline-offset:-2px; }
.gh-dates { max-width:100%; }
.gh-dates .gh-control { max-width:100%; }
.gh-card-head,.gh-row,.gh-group-head { box-sizing:border-box; }
.gh-filters,.gh-dates { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:end; }
.gh-control { display:grid; gap:4px; min-width:0; }
.gh-control>span,.gh-card-head small,.gh-identity small,.gh-description small,.gh-group-head small,.gh-when,.gh-meta,.gh-table-head,.gh-contribution-heading { color:#b5aa96; font-size:12px; }
.gh-control :is(input,select) { font:inherit; font-size:13px; width:auto; min-height:36px; max-width:100%; color-scheme:dark; padding:5px 9px; }
.gh-filters .dbtn { min-height:36px; }
.gh-content { display:grid; gap:12px; min-width:0; }
.guild-permissions section { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); gap:9px 16px; margin-block:14px; }
.guild-permissions h4 { grid-column:1/-1; margin:0; color:var(--gold-b,#dcbb77); }
.guild-permissions .gh-choice-trigger { width:100%; }
.guild-permissions output { color:var(--gold-b,#dcbb77); font-size:12px; }
.gh-row:is(.gh-conqueror,.gh-special) { display:block; }
.gh-tree-modes { display:inline-flex; align-items:stretch; border:1px solid var(--glass-border,#584a32); border-radius:5px; padding:2px; }
.gh-tree-modes .gh-tab { padding:6px 12px; }
.gh-tree-filters .guild-input { background:#1b1813; color:var(--text-1,#eee4cc); border:1px solid var(--glass-border,#655136); border-radius:4px; }
.gh-tree-filters button:disabled { opacity:.42; cursor:default; }
.gh-tree-period { display:block; margin-top:3px; }
.gh-tree-details > summary,.gh-tree-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,auto); align-items:center; gap:8px; }
.gh-tree-head { padding:7px 15px; font-size:12px; color:#c7b286; }
.gh-tree-head > :last-child { text-align:right; }
.gh-tree-details > summary { cursor:pointer; min-height:38px; overflow-wrap:anywhere; }
.gh-tree-details > summary .gh-identity::before { content:'▸'; color:#cab07a; }
.gh-tree-details[open] > summary .gh-identity::before { content:'▾'; }
.gh-tree-details .gh-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; }
.gh-tree-details .gh-card { margin:6px 0; }
.gh-card { border:1px solid var(--glass-border,#584a32); background:var(--guild-panel-fill,#201c15); border-radius:6px; min-width:0; overflow:hidden; }
.gh-card-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 12px; align-items:baseline; padding:13px 15px; border-bottom:1px solid var(--glass-border,#584a32); }
.gh-card-head h3 { font:600 18px/1.25 Georgia,serif; color:var(--text-1,#eee4cc); margin:0; }
.gh-list { max-height:clamp(200px,39vh,410px); overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:#857046 transparent; -webkit-overflow-scrolling:touch; }
.gh-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 12px; min-height:42px; padding:6px 15px; border-bottom:1px solid #9b835023; font-size:14px; }
.gh-row:last-child { border:0; }
.gh-group-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 10px; padding:9px 15px; background:#b1975910; border-bottom:1px solid #9b83502c; }
.gh-group-head strong { grid-column:1; }
.gh-contribution-heading { grid-column:2; grid-row:1/3; align-self:end; }
.gh-group-head strong { font-size:14px; color:#ead499; }
.gh-identity,.gh-spark-count,.gh-duel,.gh-loot { display:inline-flex; align-items:center; gap:7px; min-width:0; }
.gh-identity strong,.gh-description strong { font-weight:600; overflow-wrap:anywhere; }
.gh-identity small,.gh-description small { display:block; margin-top:3px; }
.gh-when { text-align:right; font-variant-numeric:tabular-nums; }
.gh-swords,.gh-emblem { width:18px; height:18px; flex:none; object-fit:contain; }
.gh-duel { flex-wrap:wrap; }
.gh-loot-list { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:5px; }
.gh-loot { border:1px solid #90795155; color:inherit; background:#0003; border-radius:4px; font:inherit; font-size:12px; text-align:left; padding:2px 6px 2px 2px; cursor:pointer; }
.gh-loot-icon { width:27px; height:27px; display:inline-grid; flex:none; position:relative; place-items:center; overflow:hidden; }
.gh-loot-icon img,.gh-loot-icon>* { width:100%; height:100%; object-fit:contain; }
.gh-duelists { grid-template-columns:minmax(0,1fr) minmax(4em,auto) minmax(4em,auto); }
.gh-duelists>*:not(:first-child),.gh-value { text-align:right; font-variant-numeric:tabular-nums; }
.gh-table-head { min-height:29px; position:sticky; top:0; background:#27241e; font-size:12px; }
.gh-value,.gh-spark-count { color:#eac77a; }
body.interface-shell #guildScr .guild-workspace .guild-spark-icon { --spark-size:40px; display:inline-grid; place-items:center; position:relative; box-sizing:border-box; width:var(--spark-size); height:var(--spark-size); flex:0 0 var(--spark-size); min-width:0; border-radius:4px; border:1px solid #887448; overflow:hidden; padding:3px; filter:none; }
body.interface-shell #guildScr .guild-archive .guild-spark-icon { --spark-size:27px; }
body.interface-shell #guildScr .guild-workspace .guild-spark-icon img { position:absolute; inset:3px; box-sizing:border-box; width:calc(100% - 6px); height:calc(100% - 6px); min-width:0; min-height:0; margin:0; padding:0; object-fit:contain; }
.gh-spark-count { flex:none; white-space:nowrap; }
.gh-spark-count b { min-width:3ch; text-align:right; font-variant-numeric:tabular-nums; }
.gh-value small { display:block; font-weight:400; }
.gh-status,.gh-more { margin:10px 15px; }
.gh-status { color:var(--text-2,#c6bba7); font-size:13px; }
.gh-status[hidden],.gh-more[hidden] { display:none; }
.guild-events-disclosure { margin-top:10px; }
.guild-events-disclosure summary { cursor:pointer; color:var(--text-2,#c6bba7); font-weight:600; padding:6px 0; }
.guild-events-disclosure .guild-history-card>h3 { display:none; }
@container guild (max-width:780px) {
  .gh-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gh-tab { min-height:42px; padding:6px; }
  .gh-control input,.gh-choice-trigger,.gh-filters .dbtn { min-height:42px; }
  body.interface-shell .gh-options [role=option] { min-height:42px; }
  .gh-dates input { min-width:0; }
  .gh-card-head,.gh-row,.gh-group-head { padding-left:10px; padding-right:10px; }
  .gh-pvp,.gh-hunts { grid-template-columns:minmax(0,1fr); }
  .gh-when { text-align:left; }
  .gh-list { max-height:min(48vh,360px); }
  .gh-loot { min-height:40px; }
}
