.cw-window {
  --cw-line:#51493a; --cw-text:#e0d1b4; color-scheme:dark;
  position:fixed; z-index:1100; left:50%; top:max(4px,calc((100dvh - 650px)/2));
  transform:translateX(-50%); box-sizing:border-box; width:min(439px,calc(100vw - 8px));
  height:min(597px,calc(100dvh - 8px)); padding:4px; margin:0; overflow:hidden;
  display:flex; flex-direction:column; color:var(--cw-text); border:1px solid #938772;
  background:linear-gradient(110deg,#2b2926,#262421 60%,#302e29); box-shadow:0 1px 6px #000b,inset 0 0 0 2px #262522;
  outline:none; font:13px/1.3 Tahoma,Arial,sans-serif; text-align:left;
}
.cw-window * {box-sizing:border-box}
.cw-window :is(button,input,select,summary) {font:inherit;color:inherit;letter-spacing:normal;text-transform:none}
.cw-window button,.cw-window select {cursor:pointer;min-width:0;min-height:0;margin:0;padding:2px 8px;
  border:1px solid #655d4f;border-radius:1px;background:linear-gradient(#484139,#292622 65%,#242220);box-shadow:inset 0 0 0 1px #35312a;font-weight:400}
.cw-window button:disabled {cursor:default;color:#898377;filter:saturate(.45);opacity:.54}
.cw-window button:hover:enabled,.cw-window summary:hover {color:#fff0ce;filter:brightness(1.15)}
.cw-window :focus-visible {outline:1px solid #bf9b5b;outline-offset:-2px}
.cw-window .cw-header {flex:0 0 36px;display:flex;align-items:center;justify-content:center;position:relative;
  padding:0;color:#f4ede0;font:14px Tahoma,Arial,sans-serif;background:linear-gradient(90deg,#292825,#3b3530,#292825);
  border-bottom:1px solid #51483c;cursor:move;user-select:none;touch-action:none}
.cw-window .cw-header button {position:absolute;right:4px;border:0;box-shadow:none;padding:0;width:20px;height:20px;background:transparent center/contain no-repeat}
.cw-window .cw-header .cw-close {background-image:url("store/close.webp");background-size:18px 17px}
.cw-window .cw-header .cw-help {right:25px;background-image:url("store/help.webp");background-size:11px 16px}
.cw-window .cw-header .cw-bulletin {right:47px;background-image:url("clan/bulletin.webp");background-size:16px 19px}
.cw-tabs {flex:0 0 25px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:1px;padding:3px 6px 0}
.cw-tabs button {height:21px;padding:1px 0;font-size:11px;border-color:#514a40;background:linear-gradient(#393530,#24221f)}
.cw-tabs button[aria-pressed=true] {border-color:#af9573;border-bottom-color:#272520;background:linear-gradient(#6a5a45,#2b2824 27%,#282621);color:#f1e5ce}
.cw-body {flex:1;min-height:0;padding:9px;overflow:auto;scrollbar-width:thin;border:1px solid #675e4d;
  border-radius:3px;background:#272522;box-shadow:inset 0 0 0 2px #25231f;overscroll-behavior:contain}
.cw-body[data-view=info] {display:flex;padding:2px 6px 5px;overflow:hidden}
.cw-window .cw-information {width:100%;min-height:0;display:flex;flex-direction:column}
.cw-infohead,.cw-members-head,.cw-progress {display:flex;align-items:center;gap:4px;min-height:24px}
.cw-infohead>.cw-manage {margin-left:auto;width:106px;font-size:11px;background-image:url("clan/manage.webp"),linear-gradient(#433d33,#292723);
  background-repeat:no-repeat;background-position:3px center,center;height:23px}
.cw-name {display:flex;align-items:center;justify-content:center;gap:6px;height:44px;flex:none;text-align:center;font-size:16px}
.cw-name img {max-width:32px;max-height:20px;image-rendering:pixelated}
.cw-tools {display:grid;grid-template-columns:repeat(4,1fr);height:25px;flex:none;background:url("clan/toolbar.webp") center/100% 100%}
.cw-tools button {border:0;background:none;box-shadow:none;height:100%}
.cw-tools button:hover:enabled {background:#d3af6124}
.cw-progress {height:31px;flex:none;padding:2px 7px;gap:4px;border-block:1px solid #3b3830;font-size:11px}
.cw-progress b {width:24%;text-align:center;color:#cfa858}
.cw-xp-icon {width:22px;height:22px;background:url("clan/xp.webp") center/contain no-repeat}
.cw-meter {flex:1;min-width:0;text-align:center;font-size:10px;background:linear-gradient(90deg,#946b30 var(--xp,0%),#201f1c var(--xp,0%));border:1px solid #3b362d}
.cw-progress button {width:72px;font-size:11px}
.cw-members-head {height:27px;flex:none;align-items:end; padding:0 0 2px;border-bottom:1px solid #544b3d}
.cw-members-head small {margin-left:auto;color:#b19b72}
.cw-window .cw-online {width:20px;height:20px;padding:0;background:url("clan/online.webp") center/cover}
.cw-online[aria-pressed=true] {outline:1px solid #d3af61}
.cw-members {flex:1;min-height:0;display:flex;flex-direction:column}
.cw-columns {display:grid;grid-template-columns:minmax(0,1fr) 14% 11% 17% 19%;align-items:center;text-align:center;font-size:11px}
.cw-members>.cw-columns {height:19px;flex:none;border:1px solid #534b3d;background:linear-gradient(#403b32,#2b2823)}
.cw-columns>span+span {border-left:1px solid #464036}
.cw-roster {position:relative;flex:1;min-height:0;overflow:auto;scrollbar-width:thin;
  background:repeating-linear-gradient(#282623 0 22px,#252320 22px 44px);border:1px solid #37332c}
.cw-row {min-height:22px;color:#e0d5bd}
.cw-row button {border:0;background:transparent;box-shadow:none;padding:3px;white-space:normal;overflow-wrap:anywhere}
.cw-row button:first-child {text-align:left}
.cw-on {color:#c6cf98}
.cw-summary {height:47px;flex:none;border:1px solid #35322c;padding:5px;color:#c8b99b;font-size:11px}
.cw-no-clan :is(.cw-infohead,.cw-name,.cw-progress,.cw-members-head,.cw-members>.cw-columns) {opacity:.30}
.cw-guidance {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 21px 57px;
  font:14px/1.36 Tahoma,Arial,sans-serif;text-align:center;color:#cdb995;overflow:auto}
.cw-guidance p {margin:0 0 16px}.cw-guidance p:last-child {margin:0}
.cw-footer {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;gap:5px;height:32px;flex:none;padding:3px 1px 1px}
.cw-footer button {min-height:23px;padding:1px 2px;font-size:11px}
.cw-footer button:disabled {opacity:.82}
.cw-information:not(.cw-no-clan) .cw-tools {filter:brightness(1.45)}
.cw-status:empty {display:none}.cw-status {padding:4px 8px;color:#f3d291;font-size:12px}
.cw-subhead,.cw-line,.cw-product,.cw-form,.cw-pages {display:flex;gap:8px;align-items:center}
.cw-subhead {border-bottom:1px solid var(--cw-line);padding-bottom:6px;margin-bottom:8px}
.cw-line,.cw-product {min-height:31px;padding:5px 2px;border-bottom:1px solid #39362f;flex-wrap:wrap}
.cw-line strong {margin-left:auto;font-weight:400;color:#f0d8a8}
.cw-window input,.cw-window select {max-width:100%;padding:4px;background:#211f1c;border:1px solid #655c4e}
.cw-form {margin:6px 0}.cw-form input {flex:1;min-width:0}
.cw-entry {display:grid;width:100%;gap:3px;text-align:left}.cw-entry span {color:#bdaf95}
.cw-empty {color:#b8ab93;text-align:center;padding:16px}
.cw-pages {justify-content:center;padding:8px}.cw-pages button {padding:1px 5px}
.cw-specialties {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:8px}
.cw-specialties details {background:#312e28;border:1px solid #504636;padding:6px;font-size:11px}
.cw-window summary {cursor:pointer}.cw-learned summary {color:#e5bc70}
.cw-body>details {margin:8px 0}.cw-body>details label {display:inline-block;padding:3px}
.cw-product {display:grid;grid-template-columns:1fr auto}.cw-product small {grid-column:1;color:#bdaf95}
.cw-product button {grid-column:2;grid-row:1/3}.cw-body p {overflow-wrap:anywhere}
@media(max-height:460px) {.cw-header {max-height:26px}.cw-name {height:26px}.cw-summary {height:20px}.cw-guidance {position:static;padding:7px;font-size:12px}.cw-guidance p {margin-bottom:5px}}
