

:root {
  --ws-side-width: 200px;
  --ws-top-height: 52px;
  
  --ws-side-bg: #1f1f25;
  --ws-active-bg: rgba(255, 255, 255, 0.07);
}


.ws { display: flex; flex: 1 0 auto; min-height: 0; width: 100%; }


.ws-side {
  flex: 0 0 var(--ws-side-width);
  background: var(--ws-side-bg);
  border-right: 1px solid var(--border, #333);
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; overflow-y: auto;
}
.ws-mark { display: flex; align-items: center; gap: 10px; padding: 8px 6px 14px; text-decoration: none; color: inherit; }
.ws-mark:hover { text-decoration: none; }
.ws-mark img { height: 40px; width: auto; display: block; }
.ws-badge {
  align-self: flex-start; margin: 0 0 10px 12px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--team-gold, #f0c040); border: 1px solid var(--team-gold, #f0c040);
  padding: 2px 8px; border-radius: 10px;
}

.ws-nav-item {
  appearance: none; background: transparent; border: none;
  color: var(--text, #e0e0e0); text-align: left;
  padding: 8px 12px; border-radius: var(--radius-md, 6px);
  font: inherit; font-size: 14px; cursor: pointer; position: relative;
  text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.ws-nav-item:hover { background: rgba(255, 255, 255, 0.05); text-decoration: none; color: var(--text, #e0e0e0); }

.ws-nav-item[aria-current="page"] { background: var(--ws-active-bg); color: var(--accent, #5b8def); }
html.new-design .ws-nav-item[aria-current="page"] { color: var(--text, #e0e0e0); }
html.new-design .ws-nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 2px; background: var(--brand, #d91f2a);
}


.ws-uc { display: inline-flex; align-items: center; flex: none; color: var(--warning, #ca4); }
.ws-uc svg { display: block; }

.ws-nav-item:has(.ws-uc:hover)::after {
  content: attr(data-uc-tip);
  position: absolute; left: 10px; right: 10px; top: calc(100% - 2px); z-index: 50;
  background: var(--bg-card, #22222a); color: var(--text, #e0e0e0);
  border: 1px solid var(--border, #333);
  padding: 6px 9px; border-radius: var(--radius-sm, 4px);
  font-size: 12px; font-weight: normal; line-height: 1.35;
  white-space: normal; text-align: left; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}


.ws-blog {
  display: block; text-align: center; margin: 10px 4px 0;
  font-size: 12px; color: var(--text-dim, #888); text-decoration: none;
}
.ws-blog:hover { color: var(--text, #e0e0e0); text-decoration: none; }

.ws-download { display: block; text-align: center; margin: 14px 4px 0; padding: 9px 12px; font-size: 13px; font-weight: 600; text-decoration: none; }
.ws-download:hover { text-decoration: none; }

.ws-discord {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 8px 4px 0; padding: 8px 12px;
  background: transparent;
  border: 1px solid color-mix(in srgb, #5865f2 45%, transparent);
  border-radius: var(--radius-md, 6px);
  color: #9aa4f0; font-size: 13px; font-weight: 500; text-decoration: none;
}
.ws-discord:hover {
  background: color-mix(in srgb, #5865f2 14%, transparent);
  border-color: color-mix(in srgb, #5865f2 75%, transparent);
  color: #c3c9ff; text-decoration: none;
}
.ws-discord svg { flex: none; display: block; }


.ws-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-top {
  height: var(--ws-top-height); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border, #333);
  position: relative;
  background: var(--bg-page, #1a1a1e);
}

html.new-design .ws-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand-hairline); pointer-events: none;
}
.ws-title { font-size: 16px; font-weight: 600; color: var(--text-secondary, #ccc); margin: 0; white-space: nowrap; }
.ws-top-slot { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ws-top-slot:empty { display: none; }

.ws-tab {
  height: 30px; padding: 0 12px; border-radius: var(--radius-md, 6px);
  border: 1px solid transparent; background: transparent;
  color: var(--text-tertiary, #aaa); font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.ws-tab:hover { background: var(--bg-hover, #2a2a32); color: var(--text, #e0e0e0); text-decoration: none; }
.ws-tab[aria-current="page"] { background: var(--accent-tint-selected); border-color: var(--accent-border); color: #fff; }


.ws-tz { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-right: 8px; }
.ws-tz-opt { appearance: none; background: none; border: none; padding: 0 2px; font: inherit; font-size: 12px; color: var(--text-muted, #666); cursor: pointer; }
.ws-tz-opt:hover { color: var(--text, #e0e0e0); }
.ws-tz-opt[aria-pressed="true"] { color: var(--accent, #5b8def); font-weight: 600; }
.ws-tz-sep { color: var(--text-faint, #555); }
.ws-who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-tertiary, #aaa); min-width: 0; }
.ws-who .ws-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; color: inherit; text-decoration: none; }
.ws-who .ws-user:hover { color: var(--text, #e0e0e0); text-decoration: none; }
.ws-who .ws-signout { color: var(--text-dim, #888); text-decoration: none; white-space: nowrap; }
.ws-who .ws-signout:hover { color: var(--text, #e0e0e0); text-decoration: none; }


.ws-body { padding: 24px 32px 48px; width: 100%; max-width: 1240px; margin: 0 auto; }


@media (max-width: 800px) {
  .ws { flex-direction: column; }
  .ws-side {
    flex: none; position: static; height: auto; width: 100%;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    border-right: none; border-bottom: 1px solid var(--border, #333);
    padding: 6px 10px; gap: 2px; overflow: visible;
  }
  .ws-mark { padding: 4px 6px 4px 0; }
  .ws-mark img { height: 32px; }
  .ws-badge, .ws-discord, .ws-blog { display: none; }
  .ws-download { margin: 0 0 0 auto; padding: 5px 10px; font-size: 12px; }
  .ws-nav-item { padding: 6px 10px; font-size: 13px; }
  html.new-design .ws-nav-item[aria-current="page"]::before { top: auto; bottom: 0; left: 10px; right: 10px; width: auto; height: 2px; }
  .ws-top { padding: 0 16px; gap: 10px; }
  .ws-body { padding: 16px 16px 40px; }
}
