/* ==========================================================================
   Хроники Кракена 888 — Kraken Chronicles design system.

   Minimalist dark theme: one neutral surface scale, one accent, hairline
   borders, no gradients / glows / decorative shadows. Every class name of the
   previous ornate theme is kept, so all pages restyle without touching JS.
   ========================================================================== */

:root {
  /* surfaces */
  --bg:         #0c0d0e;
  --bg-2:       #101213;
  --surface:    #121415;
  --surface-2:  #171a1b;
  --surface-3:  #1d2122;

  /* lines */
  --line:       rgba(255,255,255,.08);
  --line-2:     rgba(255,255,255,.14);
  --line-3:     rgba(255,255,255,.22);

  /* text */
  --text:       #e9ebeb;
  --text-dim:   #b6bcbc;
  --muted:      #a0aaaa;
  --muted-2:    #959f9f;

  /* accent — the single colour the brand keeps */
  --accent:     #d8b45d;
  --accent-dim: #a98a3e;
  --accent-ink: #14100a;
  --accent-bg:  rgba(216,180,93,.10);

  /* status */
  --danger:     #e08a80;
  --success:    #79c79b;
  --warn:       #d9b25f;
  --info:       #7fb6c9;

  /* legacy aliases kept so older rules and inline styles still resolve */
  --ink: var(--bg); --ink-2: var(--bg-2); --ink-3: var(--surface);
  --gold: var(--accent); --gold-soft: var(--accent); --gold-bright: var(--text);
  --gold-dim: var(--muted); --teal: var(--info); --teal-soft: var(--info);
  --teal-dim: var(--muted); --panel: var(--surface); --panel-soft: var(--surface-2);
  --panel-flat: var(--surface-2); --line-strong: var(--line-2); --line-teal: var(--line);
  --shadow: none; --shadow-lg: none;

  --radius:     12px;
  --radius-sm:  9px;
  --radius-xs:  7px;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif:      var(--sans);
  --mono:       ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h:   58px;
  --maxw:       1320px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--sans); color: var(--text); margin: 0 0 .5em;
  line-height: 1.2; letter-spacing: -.01em; font-weight: 600;
}
h1 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -.025em; font-weight: 600; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; }
p  { margin: 0 0 1em; }
small { font-size: 11.5px; }
code, kbd { font-family: var(--mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

::selection { background: rgba(216,180,93,.24); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #262b2c; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #343a3b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.kc-boot { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.kc-boot-mark { width: 56px; height: 56px; opacity: .5; animation: kc-pulse 1.4s ease-in-out infinite; }
@keyframes kc-pulse { 0%,100% { opacity: .15; } 50% { opacity: .45; } }
.kc-noscript { max-width: 760px; margin: 40px auto; padding: 0 20px; }

/* ------------------------------------------------------------------ layout */
.kc-shell { display: flex; flex-direction: column; min-height: 100vh; }
.kc-main  { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 28px 24px 64px; }
.kc-main.is-flush { max-width: 100%; padding: 0; }

/* ------------------------------------------------------------------ header */
.kc-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(12,13,14,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(12px);
}
.kc-header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: var(--header-h); display: flex; align-items: center; gap: 14px;
}
.kc-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.kc-brand-mark {
  width: 26px; height: 26px; flex-shrink: 0; display: block;
  border-radius: 50%; object-fit: cover;
  /* Эмблема тёмная по краю, на тёмном фоне шапки сливается — держим ободок. */
  box-shadow: 0 0 0 1px var(--line-2);
}
.kc-brand-text { line-height: 1.15; }
.kc-brand-name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.kc-brand-sub  { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }

.kc-nav { display: flex; align-items: center; gap: 2px; margin-left: 10px; flex: 1; min-width: 0; }
.kc-cat { position: relative; }
.kc-cat-btn {
  height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--muted); cursor: pointer;
  font: 500 13px/1 var(--sans); letter-spacing: 0; text-transform: none;
  transition: color .15s, background .15s; white-space: nowrap;
}
.kc-cat-btn:hover { color: var(--text); background: var(--surface-2); }
.kc-cat.is-active > .kc-cat-btn { color: var(--text); }
.kc-cat.is-open   > .kc-cat-btn { color: var(--text); background: var(--surface-2); }
.kc-cat.is-active > .kc-cat-btn::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -13px; height: 1px; background: var(--accent);
}
.kc-cat-btn .kc-caret { font-size: 7px; opacity: .5; }
/* Emoji category marks belong to the old ornate theme. */
.kc-cat-btn > span:first-child:not(.kc-caret) { display: none; }

.kc-menu {
  position: absolute; top: calc(100% + 9px); left: 0; z-index: 95; min-width: 234px;
  padding: 6px; display: none; flex-direction: column; gap: 1px;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.kc-cat.is-open .kc-menu { display: flex; }
.kc-menu a {
  padding: 8px 10px; border-radius: var(--radius-xs); color: var(--text-dim);
  font-size: 13px; font-weight: 400; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: background .12s, color .12s;
}
.kc-menu a:hover { background: var(--surface-2); color: var(--text); }
.kc-menu a.is-active { color: var(--accent); }
.kc-menu a .kc-menu-tag { font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }

.kc-header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

.kc-lang { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xs); }
.kc-lang button { width: 34px; height: 28px; border: 0; background: transparent; color: var(--muted); font: 600 11px var(--sans); cursor: pointer; transition: color .15s, background .15s; }
.kc-lang button:hover { color: var(--text); }
.kc-lang button.is-active { background: var(--surface-3); color: var(--text); }

.kc-userchip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: var(--radius-xs);
  background: transparent; color: var(--text-dim); font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .15s, color .15s;
}
.kc-userchip:hover { border-color: var(--line-3); color: var(--text); }
.kc-userchip .kc-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.kc-userchip .kc-badge-admin { font-size: 9px; letter-spacing: .05em; padding: 1px 4px; border-radius: 3px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.kc-burger { display: none; width: 34px; height: 30px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: transparent; color: var(--text-dim); font-size: 14px; cursor: pointer; }

/* ------------------------------------------------------------------ banner */
/* A page header, not an ornament: no frame, no glow, no lamps. */
.kc-banner { position: relative; margin: 0 0 26px; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--line); background: none; box-shadow: none; }
.kc-banner::before, .kc-banner::after { content: none; }
.kc-banner-inner { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 0; min-height: 0; }
.kc-banner-kicker { color: var(--muted-2); font: 500 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.kc-banner-title {
  margin: 12px 0 0; font-family: var(--sans); font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.08; font-weight: 600; letter-spacing: -.03em; color: var(--text); text-shadow: none;
}
.kc-banner-sub { margin-top: 12px; color: var(--muted); font-size: 14px; letter-spacing: 0; text-transform: none; max-width: 66ch; line-height: 1.6; }
.kc-banner-lights { display: none; }
.kc-banner.is-compact { min-height: 0; padding-bottom: 16px; margin-bottom: 20px; }
.kc-banner.is-compact .kc-banner-inner { min-height: 0; padding: 0; }

/* ------------------------------------------------------------------ panels */
.kc-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: none;
  overflow: hidden; margin: 0 0 16px;
}
.kc-panel-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line); background: none;
}
.kc-panel-head h2, .kc-panel-head h3 { margin: 0; }
.kc-panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.kc-panel-body { padding: 18px; }
.kc-panel-foot { padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11.5px; line-height: 1.5; }
.kc-panel.is-plain { background: transparent; border-color: transparent; }

.kc-badge {
  display: inline-block; border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  border-radius: 5px; padding: 3px 8px; font: 500 10.5px var(--sans); letter-spacing: .04em; text-transform: uppercase;
}
.kc-badge.is-gold { border-color: rgba(216,180,93,.4); background: var(--accent-bg); color: var(--accent); }
.kc-badge.is-danger { border-color: rgba(224,138,128,.4); color: var(--danger); }
.kc-badge.is-success { border-color: rgba(121,199,155,.4); color: var(--success); }

.kc-section-title { color: var(--muted); font: 500 11px var(--sans); text-transform: uppercase; letter-spacing: .13em; margin: 0 0 12px; }
.kc-section-title:not(:first-child) { margin-top: 22px; }

/* ------------------------------------------------------------------ grids */
.kc-grid { display: grid; gap: 12px; }
.kc-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kc-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kc-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kc-grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kc-grid.auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kc-grid.auto-lg { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

/* ------------------------------------------------------------------- tiles */
.kc-tile {
  padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; min-height: 0;
}
.kc-tile-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font: 500 11px var(--sans); text-transform: uppercase; letter-spacing: .09em; }
.kc-tile-label img { width: 15px; height: 15px; opacity: .75; }
.kc-tile-value { margin-top: 8px; font: 600 24px/1.1 var(--sans); letter-spacing: -.02em; color: var(--text); word-break: break-word; font-variant-numeric: tabular-nums; }
.kc-tile-value.sm { font-size: 16px; }
.kc-tile-note { display: block; margin-top: 6px; color: var(--muted-2); font-size: 11.5px; line-height: 1.45; }

.kc-card {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent;
  padding: 16px; transition: border-color .15s, background .15s;
}
a.kc-card, .kc-card.is-link { cursor: pointer; display: block; color: inherit; }
a.kc-card:hover, .kc-card.is-link:hover { border-color: var(--line-3); background: var(--surface-2); transform: none; box-shadow: none; }
a.kc-card:hover h3 { color: var(--accent); }

/* ------------------------------------------------------- video & feed ui */
.kc-video { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; transition: border-color .15s, background .15s; }
.kc-video:hover { border-color: var(--line-3); background: var(--surface-2); }
.kc-video:hover .kc-video-title a { color: var(--accent); }
.kc-video-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); }
.kc-video-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.kc-video-thumb { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; position: relative; }
.kc-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kc-video-play {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,13,14,.72); border: 1px solid var(--line-3); color: var(--text);
  font-size: 15px; transition: background .15s, border-color .15s, color .15s;
}
.kc-video-thumb:hover .kc-video-play { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kc-video-dur, .kc-video-pin {
  position: absolute; bottom: 8px; right: 8px; padding: 2px 6px; border-radius: var(--radius-xs);
  background: rgba(12,13,14,.82); color: var(--text-dim);
  font: 500 10.5px var(--sans); font-variant-numeric: tabular-nums;
}
.kc-video-pin { left: 8px; right: auto; top: 8px; bottom: auto; color: var(--accent); }
.kc-video-body { padding: 13px 14px 15px; }
.kc-video-title { margin: 0 0 7px; font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.kc-video-title a { color: var(--text); }
.kc-video-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.kc-video-desc {
  margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-video.is-compact .kc-video-body { padding: 11px 12px 12px; }
.kc-video.is-compact .kc-video-title { font-size: 13px; }

/* Компактная лента-список: «все ссылки» на новости, видео и дни недели. */
.kc-feed { list-style: none; margin: 0; padding: 0; }
.kc-feed.is-scroll { max-height: 328px; overflow-y: auto; padding-right: 8px; }
.kc-feed li { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.kc-feed li:last-child { border-bottom: 0; }
.kc-feed time { flex: 0 0 auto; min-width: 124px; color: var(--muted-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.kc-feed a { flex: 1 1 220px; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.kc-feed a:hover { color: var(--accent); }
.kc-feed .kc-note { margin: 0; }
.kc-feed .kc-feed-name { flex: 1 1 200px; color: var(--text); font-size: 13.5px; font-weight: 500; }
.kc-feed li.is-now time, .kc-feed li.is-now .kc-feed-name, .kc-feed li.is-now > a { color: var(--accent); }
.kc-feed .kc-badge { flex: 0 0 auto; margin-left: auto; }

/* ------------------------------------------------------------------ forms */
.kc-field { margin: 0 0 14px; }
.kc-field > label { display: block; color: var(--text-dim); font: 500 12.5px var(--sans); margin: 0 0 6px; }
.kc-input, .kc-select, .kc-textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: var(--radius-xs);
  background: var(--surface-2); color: var(--text); font: 400 13px var(--sans); outline: none;
  box-shadow: none; transition: border-color .15s, background .15s;
}
.kc-textarea { height: auto; min-height: 92px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.kc-input:hover, .kc-select:hover, .kc-textarea:hover { border-color: var(--line-3); }
.kc-input:focus, .kc-select:focus, .kc-textarea:focus { border-color: var(--accent); box-shadow: none; }
.kc-input::placeholder, .kc-textarea::placeholder { color: var(--muted-2); }
.kc-select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23838d8d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round' d='M1.5 2l4.5 4 4.5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px;
}
.kc-help { display: block; margin-top: 6px; color: var(--muted-2); font-size: 11px; line-height: 1.45; }

input[type="checkbox"].kc-check {
  appearance: none; width: 16px; height: 16px; min-width: 16px; margin: 0;
  border: 1px solid var(--line-3); border-radius: 4px; background: var(--surface-2);
  box-shadow: none; cursor: pointer; vertical-align: middle; transition: background .15s, border-color .15s;
}
input[type="checkbox"].kc-check:checked {
  border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2314100a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.4 8.3l3 3 6.3-6.6'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat; background-size: 12px;
}
input[type="range"] { accent-color: var(--accent); width: 100%; }

.kc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 15px; border-radius: var(--radius-xs);
  border: 1px solid var(--line-2); background: transparent; color: var(--text-dim);
  font: 500 13px var(--sans); letter-spacing: 0; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.kc-btn:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); filter: none; transform: none; }
.kc-btn:disabled { opacity: .45; cursor: not-allowed; }
.kc-btn.is-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: none; }
.kc-btn.is-primary:hover { background: #e6c472; border-color: #e6c472; color: var(--accent-ink); }
.kc-btn.is-teal { border-color: var(--line-2); background: transparent; color: var(--text-dim); box-shadow: none; }
.kc-btn.is-teal:hover { color: var(--text); border-color: var(--line-3); background: var(--surface-2); }
.kc-btn.is-danger { border-color: rgba(224,138,128,.35); color: var(--danger); }
.kc-btn.is-danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(224,138,128,.08); }
.kc-btn.is-ghost { border-color: transparent; }
.kc-btn.is-ghost:hover { border-color: var(--line); }
.kc-btn.sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.kc-btn.block { width: 100%; }

.kc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kc-toolbar .kc-input, .kc-toolbar .kc-select { width: auto; min-width: 165px; flex: 0 1 auto; }
.kc-toolbar .grow { flex: 1 1 200px; min-width: 150px; }

.kc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-chip {
  min-height: 28px; padding: 0 11px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--muted); font: 500 12px var(--sans); cursor: pointer; transition: .15s;
}
.kc-chip:hover { color: var(--text); border-color: var(--line-3); }
.kc-chip.is-active { color: var(--accent); border-color: rgba(216,180,93,.45); background: var(--accent-bg); box-shadow: none; }

/* ------------------------------------------------------------------ tables */
.kc-table-wrap { overflow: auto; max-width: 100%; }
.kc-table { width: 100%; border-collapse: collapse; }
.kc-table th {
  position: sticky; top: 0; z-index: 2; padding: 10px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line-2); background: var(--surface);
  color: var(--muted); text-align: left; font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase;
}
.kc-table th.sortable { cursor: pointer; user-select: none; }
.kc-table th.sortable:hover { color: var(--text); }
.kc-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; color: var(--text-dim); }
.kc-table tbody tr:hover td { background: var(--surface-2); }
.kc-table tbody tr:last-child td { border-bottom: 0; }
.kc-table td.num, .kc-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.kc-table .rank { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.kc-table .best { color: var(--accent); font-weight: 600; }
.kc-table .high { color: var(--text); font-weight: 500; }
.kc-rowlink { cursor: pointer; }

.kc-petcell { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.kc-petcell img { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); object-fit: cover; flex-shrink: 0; }
.kc-iconcell { display: flex; align-items: center; gap: 8px; }
.kc-iconcell img { width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; }

/* ------------------------------------------------------------------- misc */
.kc-empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.kc-empty .mark { display: none; }
.kc-empty strong, .kc-empty b { color: var(--text-dim); font-weight: 500; }
.kc-loading { padding: 34px; text-align: center; color: var(--muted-2); font-size: 13px; }
.kc-error { border: 1px solid rgba(224,138,128,.35); background: rgba(224,138,128,.07); color: var(--danger); padding: 11px 13px; border-radius: var(--radius-xs); font-size: 13px; margin: 0 0 12px; }
.kc-ok { border: 1px solid rgba(121,199,155,.35); background: rgba(121,199,155,.07); color: var(--success); padding: 11px 13px; border-radius: var(--radius-xs); font-size: 13px; margin: 0 0 12px; }
.kc-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.kc-note strong { color: var(--text-dim); font-weight: 500; }
.kc-kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 13px; }
.kc-kv dt { color: var(--muted); }
.kc-kv dd { margin: 0; color: var(--text); font-weight: 500; }
.kc-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.kc-bar > span { display: block; height: 100%; background: var(--accent); }
.kc-prose { max-width: 72ch; color: var(--text-dim); }
.kc-prose h2 { margin-top: 1.5em; }
.kc-prose ul, .kc-prose ol { padding-left: 1.25em; color: var(--text-dim); }
.kc-prose li { margin: .4em 0; }
.kc-breadcrumb { font-size: 11px; color: var(--muted-2); margin: 0 0 16px; letter-spacing: .1em; text-transform: uppercase; }
.kc-breadcrumb a { color: var(--muted-2); }
.kc-breadcrumb a:hover { color: var(--text); }

/* ------------------------------------------------------------------- home */
.kc-hero { padding: 40px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.kc-hero-banner {
  display: block; width: 100%; height: auto; margin: 0 0 30px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.kc-hero-kicker { color: var(--muted-2); font: 500 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.kc-hero h1 { margin: 16px 0 0; max-width: 24ch; }
.kc-hero-lead { margin: 16px 0 0; max-width: 60ch; color: var(--muted); font-size: 15px; line-height: 1.65; }
.kc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.kc-statrow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.kc-statrow.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kc-statrow.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Плотный вариант для карточки каталога: там ряд живёт в колонке ~300px. */
.kc-statrow.is-compact > div { padding: 10px 11px 9px; }
.kc-statrow.is-compact .v { font-size: 16px; }
.kc-statrow.is-compact .k { margin-top: 4px; font-size: 10.5px; }
.kc-statrow > div { background: var(--bg); padding: 16px 16px 15px; }
.kc-statrow .v { font: 600 21px/1.1 var(--sans); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.kc-statrow .v.sm { font-size: 14px; }
.kc-statrow .k { margin-top: 7px; color: var(--muted-2); font-size: 11px; line-height: 1.35; }

.kc-linkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }
.kc-linkrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--line); color: inherit; transition: padding-left .15s; }
.kc-linkrow:last-child { border-bottom: 0; }
.kc-linkrow:hover { padding-left: 6px; }
.kc-linkrow:hover .kc-linkrow-title { color: var(--accent); }
.kc-linkrow-title { font-size: 14px; font-weight: 500; color: var(--text); }
.kc-linkrow-desc { margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.kc-linkrow-arrow { color: var(--muted-2); font-size: 15px; flex-shrink: 0; }

.kc-pending { display: flex; align-items: center; gap: 10px; padding: 14px 0; color: var(--muted-2); font-size: 12.5px; border-bottom: 1px solid var(--line); }
.kc-pending:last-child { border-bottom: 0; }
.kc-pending .n { color: var(--text-dim); font-weight: 500; }
.kc-pending .s { margin-left: auto; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; }

/* full-bleed frame for the original War Pet Builder */
.kc-frame-wrap { position: relative; width: 100%; height: calc(100vh - var(--header-h)); border: 0; }
.kc-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }

/* --------------------------------------------------------- support widget */
.kc-support-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--text-dim);
  font: 500 12.5px var(--sans); cursor: pointer;
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
  transition: border-color .15s, color .15s;
}
.kc-support-launcher:hover { transform: none; filter: none; border-color: var(--line-3); color: var(--text); }
.kc-support-launcher .mark { font-size: 14px; opacity: .8; }
.kc-support-launcher .kc-unread {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font: 700 10px/17px var(--sans); text-align: center;
}
.kc-support-launcher[hidden] { display: none; }

.kc-support-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 121;
  width: min(370px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: kc-slide-up .18s ease;
}
@keyframes kc-slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kc-support-head { padding: 14px 15px; border-bottom: 1px solid var(--line); background: none; display: flex; align-items: flex-start; gap: 10px; }
.kc-support-head h3 { margin: 0; font-size: 14px; }
.kc-support-head p { margin: 4px 0 0; color: var(--muted-2); font-size: 11.5px; line-height: 1.45; }
.kc-support-close { margin-left: auto; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; flex-shrink: 0; }
.kc-support-close:hover { color: var(--text); border-color: var(--line-3); }
.kc-support-body { flex: 1; overflow-y: auto; padding: 14px 15px; display: flex; flex-direction: column; gap: 9px; min-height: 130px; }
.kc-msg { max-width: 88%; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.kc-msg.from-user { align-self: flex-end; background: var(--surface-3); color: var(--text); border-bottom-right-radius: 4px; }
.kc-msg.from-admin { align-self: flex-start; background: transparent; border: 1px solid var(--line-2); color: var(--text-dim); border-bottom-left-radius: 4px; }
.kc-msg.from-system { align-self: center; background: transparent; color: var(--muted-2); font-size: 11.5px; text-align: center; max-width: 100%; }
.kc-msg-time { display: block; margin-top: 4px; font-size: 9.5px; opacity: .55; }
.kc-support-foot { padding: 11px 15px 13px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.kc-support-foot .kc-textarea { min-height: 60px; font-size: 13px; }
.kc-support-row { display: flex; gap: 8px; }
.kc-support-row .kc-input, .kc-support-row .kc-select { height: 32px; font-size: 12px; }

/* --------------------------------------------------------------- admin ui */
.kc-admin-layout { display: grid; grid-template-columns: minmax(280px, 370px) 1fr; gap: 14px; align-items: start; }
.kc-thread-list { max-height: 620px; overflow-y: auto; }
.kc-thread-item { width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; display: block; }
.kc-thread-item:hover { background: var(--surface-2); }
.kc-thread-item.is-active { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.kc-thread-item .who { display: flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13px; color: var(--text); }
.kc-thread-item .snippet { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-thread-item .meta { margin-top: 6px; display: flex; gap: 7px; align-items: center; font-size: 10.5px; color: var(--muted-2); }
.kc-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.kc-chat-log { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; }
.kc-sparkline { display: flex; align-items: flex-end; gap: 3px; height: 58px; }
.kc-sparkline > div { flex: 1; min-width: 3px; background: var(--surface-3); border-radius: 2px 2px 0 0; position: relative; transition: background .15s; }
.kc-sparkline > div:hover { background: var(--accent); }
.kc-sparkline > div:hover::after { content: attr(data-label); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 7px; font-size: 10.5px; color: var(--text); z-index: 3; }

/* ----------------------------------------------------------------- footer */
.kc-footer { border-top: 1px solid var(--line); padding: 34px 24px 42px; margin-top: 24px; }
.kc-footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 26px; }
.kc-footer h4 { font: 500 11px var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 12px; }
.kc-footer ul { list-style: none; margin: 0; padding: 0; }
.kc-footer li { margin: 0 0 7px; }
.kc-footer a { color: var(--muted); font-size: 12.5px; }
.kc-footer a:hover { color: var(--text); }
.kc-footer-note { max-width: var(--maxw); margin: 30px auto 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11.5px; line-height: 1.7; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .kc-grid.c6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kc-statrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kc-admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .kc-nav { display: none; }
  .kc-burger { display: block; }
  .kc-nav.is-mobile-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 94; margin: 0;
    padding: 12px 16px 20px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0,0,0,.6);
  }
  .kc-nav.is-mobile-open::after {
    content: ""; position: fixed; inset: 0 0 0 0; top: 100%; z-index: -1;
    background: rgba(0,0,0,.6);
  }
  .kc-nav.is-mobile-open .kc-cat { position: static; }
  .kc-nav.is-mobile-open .kc-cat-btn { width: 100%; justify-content: space-between; height: 42px; font-size: 14px; }
  .kc-nav.is-mobile-open .kc-cat.is-active > .kc-cat-btn::after { content: none; }
  .kc-nav.is-mobile-open .kc-menu { position: static; display: none; margin: 2px 0 8px; box-shadow: none; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 0 0 0 12px; }
  .kc-nav.is-mobile-open .kc-cat.is-open .kc-menu { display: flex; }
}
@media (max-width: 900px) {
  .kc-linkgrid { grid-template-columns: 1fr; column-gap: 0; }
  .kc-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-main { padding: 20px 16px 80px; }
  .kc-header-inner { padding: 0 16px; }
  .kc-hero { padding: 28px 0 26px; margin-bottom: 24px; }
  .kc-hero-banner { margin-bottom: 22px; border-radius: 9px; }
  .kc-footer { padding: 28px 16px 40px; }
}
@media (max-width: 640px) {
  .kc-feed time { min-width: 100%; }
  .kc-feed .kc-badge { margin-left: 0; }
  .kc-grid.c2, .kc-grid.c3, .kc-grid.c4, .kc-grid.c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-statrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-brand-sub { display: none; }
  .kc-support-launcher { right: 12px; bottom: 12px; }
  .kc-support-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .kc-toolbar .kc-input, .kc-toolbar .kc-select { min-width: 0; flex: 1 1 130px; }
  .kc-panel-body, .kc-panel-head { padding: 14px; }
  .kc-pending { flex-wrap: wrap; gap: 4px 10px; }
  .kc-pending > span:nth-child(2) { order: 3; width: 100%; }
}
@media (max-width: 460px) {
  .kc-grid.c2, .kc-grid.c3, .kc-grid.c4, .kc-grid.c6 { grid-template-columns: 1fr; }
  .kc-userchip { max-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .kc-header, .kc-support-launcher, .kc-support-panel, .kc-footer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* --------------------------------------------------- RankDumper actions */
.kc-inline-action { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.kc-action-status { font: 700 10px var(--sans); color: var(--muted); max-width: 260px; }
.kc-action-status.is-success { color: var(--success); }
.kc-action-status.is-danger { color: var(--danger); }
.kc-action-status.is-warn { color: var(--gold-soft); }

/* ------------------------------------------------- player achievements */
.kc-ach-main { min-width: 280px; max-width: 520px; }
.kc-ach-name { color: var(--text); font-weight: 800; font-size: 13px; line-height: 1.35; }
.kc-ach-description { margin-top: 4px; color: var(--text-dim); font-size: 11.5px; line-height: 1.45; white-space: normal; }
.kc-ach-id { margin-top: 6px; color: var(--muted-2); font: 700 9.5px var(--sans); letter-spacing: .04em; }
.kc-ach-meta, .kc-ach-state { display: flex; min-width: 150px; flex-direction: column; gap: 6px; align-items: flex-start; }
.kc-ach-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.kc-ach-meta-line { display: flex; flex-wrap: wrap; gap: 5px 7px; align-items: center; color: var(--text-dim); font-size: 10.5px; line-height: 1.35; }
.kc-ach-meta-label { color: var(--muted-2); }
.kc-ach-meta-value { color: var(--text-dim); font-weight: 700; }
.kc-ach-progress { min-width: 180px; }
.kc-ach-progress-value { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.kc-ach-progress-note { margin-top: 3px; color: var(--muted-2); font-size: 10px; }
.kc-ach-progress-row { display: flex; gap: 8px; align-items: center; margin-top: 7px; }
.kc-ach-progress-bar { width: 120px; flex: 1 1 auto; min-width: 70px; }
.kc-ach-percent { min-width: 38px; color: var(--gold-soft); font: 800 10px var(--sans); text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .kc-ach-main { min-width: 240px; }
}

/* Detailed PlayerMoreInfoAck statistics */
.kc-more-panel .kc-panel-head { align-items: stretch; }
.kc-more-head { display: block; padding: 16px 18px 13px; }
.kc-more-head-main {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.kc-more-title { min-width: 0; }
.kc-more-title h2 { line-height: 1.15; }
.kc-more-title p { max-width: 700px; line-height: 1.45; }
.kc-more-controls {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  gap: 8px; flex: 0 0 auto;
}
.kc-more-controls .kc-action-status { max-width: 220px; }
.kc-more-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(216,180,93,.10);
  color: var(--muted); font-size: 10.5px;
}
.kc-more-meta > span:not(.kc-badge) { white-space: nowrap; }
.kc-more-warning {
  margin-bottom: 14px; padding: 10px 12px;
  border: 1px solid rgba(226,87,74,.32); border-radius: 9px;
  background: rgba(226,87,74,.08); color: #f2b1aa;
  font-size: 11px; line-height: 1.45; word-break: break-word;
}

/* Six virtual columns allow a balanced 3 + 2 composition on wide screens:
   power / combat / resources, then events / sunset. */
.kc-more-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: dense; gap: 14px; align-items: stretch;
}
.kc-more-card {
  grid-column: span 2; min-width: 0; height: 100%;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface-2);
  overflow: hidden;
}
.kc-more-card-events, .kc-more-card-sunset { grid-column: span 3; }
.kc-more-card-other { grid-column: 1 / -1; }
.kc-more-card h3 {
  margin: 0; padding: 11px 13px;
  border-bottom: 1px solid rgba(216,180,93,.12);
  background: rgba(9,45,49,.18);
  color: var(--gold-soft); font: 800 11px var(--sans);
  letter-spacing: .045em; text-transform: uppercase;
}
.kc-more-list { display: flex; flex-direction: column; }
.kc-more-row {
  display: grid; grid-template-columns: minmax(135px, 1fr) minmax(105px, auto);
  gap: 12px; align-items: start; padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}
.kc-more-row:last-child { border-bottom: 0; }
.kc-more-label { min-width: 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.kc-more-data {
  min-width: 0; color: var(--text); text-align: right;
  font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.kc-more-value { font-weight: 800; }
.kc-more-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.kc-more-stack { display: flex; flex-direction: column; gap: 4px; }
.kc-more-nested { color: var(--text-dim); font-size: 10px; line-height: 1.35; }
.kc-more-json {
  display: inline-block; max-width: 320px; white-space: normal;
  word-break: break-word; color: var(--text-dim); font-size: 9.5px;
}

@media (max-width: 1080px) {
  .kc-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-more-card, .kc-more-card-events, .kc-more-card-sunset { grid-column: auto; }
  .kc-more-card-other { grid-column: 1 / -1; }
  .kc-more-card:last-child:nth-child(odd):not(.kc-more-card-other) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .kc-more-head-main { align-items: flex-start; flex-direction: column; gap: 12px; }
  .kc-more-controls { width: 100%; justify-content: flex-start; }
  .kc-more-meta { gap: 6px 10px; }
  .kc-more-meta > span:not(.kc-badge) { white-space: normal; }
  .kc-more-grid { grid-template-columns: 1fr; }
  .kc-more-card, .kc-more-card-events, .kc-more-card-sunset, .kc-more-card-other,
  .kc-more-card:last-child:nth-child(odd):not(.kc-more-card-other) { grid-column: 1; }
}

@media (max-width: 640px) {
  .kc-more-head { padding: 14px 14px 12px; }
  .kc-more-panel .kc-panel-body { padding: 13px 14px 15px; }
  .kc-more-row { grid-template-columns: 1fr; gap: 3px; padding: 8px 11px; }
  .kc-more-data { text-align: left; }
  .kc-more-tags { justify-content: flex-start; }
}

/* ------------------------------------------------ global PlayerMore TOP-100 */
.kc-tops-controls { display: flex; flex-direction: column; gap: 12px; }
.kc-tops-metric { min-width: min(100%, 330px); }
.kc-tops-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; color: var(--muted); font-size: 10.5px; }
.kc-tops-note { padding: 10px 12px; border: 1px solid rgba(216,180,93,.14); border-radius: 9px; background: rgba(9,45,49,.16); color: var(--text-dim); font-size: 11px; line-height: 1.5; }
.kc-tops-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kc-tops-updated { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 138px; }
.kc-tops-auto { display: flex; align-items: center; justify-content: flex-end; }
@media (max-width: 760px) {
  .kc-tops-panel .kc-panel-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .kc-tops-auto { justify-content: flex-start; }
  .kc-tops-metric { width: 100%; min-width: 0; }
}

/* ------------------------------------------------------ streamed lists */
html { scroll-behavior: smooth; }
.kc-stream-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.kc-stream-sentinel {
  min-height: 46px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  border-radius: 12px;
  transition: opacity .22s ease, background-color .22s ease, border-color .22s ease;
}
.kc-panel-body > .kc-stream-sentinel { margin-top: 16px; }
.kc-stream-sentinel.is-loading {
  color: var(--text-dim);
  background: rgba(7, 35, 39, .34);
}
.kc-stream-sentinel.is-done { opacity: .65; }
.kc-stream-dots { display: inline-flex; gap: 4px; min-width: 30px; justify-content: center; }
.kc-stream-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  opacity: .28;
  transform: translateY(0);
}
.kc-stream-sentinel.is-loading .kc-stream-dots i { animation: kcStreamDot 1s ease-in-out infinite; }
.kc-stream-sentinel.is-loading .kc-stream-dots i:nth-child(2) { animation-delay: .13s; }
.kc-stream-sentinel.is-loading .kc-stream-dots i:nth-child(3) { animation-delay: .26s; }
.kc-stream-sentinel.is-done .kc-stream-dots { display: none; }
.kc-stream-item {
  animation: kcStreamReveal .34s cubic-bezier(.2,.72,.28,1) both;
  animation-delay: var(--kc-stream-delay, 0ms);
}
@keyframes kcStreamReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kcStreamDot {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kc-stream-item, .kc-stream-sentinel.is-loading .kc-stream-dots i { animation: none !important; }
}

/* Quality update: readable controls, keyboard navigation and reduced motion. */
body { font-size: 1rem; }
.kc-page { min-width: 0; }
.kc-main.is-flush > .kc-page { height: 100%; }
.kc-panel-head p, .kc-note, .kc-menu a, .kc-table td,
.kc-btn.sm, .kc-field label, .kc-input, .kc-select, .kc-textarea { font-size: .875rem; }
.kc-help, .kc-panel-foot, .kc-tile-note, .kc-video-meta { font-size: .8125rem; }
.kc-sort-btn { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 4px 0; text-align: inherit; }
.kc-skip { position: fixed; top: 8px; left: 12px; z-index: 10000; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; transform: translateY(-180%); }
.kc-skip:focus { transform: none; }
.kc-main:focus { outline: none; }
.kc-kv { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .kc-main { padding-inline: 16px; }
  .kc-btn, .kc-input, .kc-select, .kc-burger, .kc-cat-btn, .kc-menu a { min-height: 44px; }
  .kc-input, .kc-select, .kc-textarea { font-size: 1rem; max-width: 100%; }
  .kc-toolbar { min-width: 0; flex-wrap: wrap; }
  .kc-panel-head { flex-wrap: wrap; }
  .kc-frame-wrap { height: calc(100dvh - var(--header-h) - 100px) !important; min-height: 420px; }
  .kc-brand-text { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (max-width: 640px) {
  .kc-header-inner { gap: 8px; padding-inline: 12px; }
  .kc-brand { flex: 1 1 auto; min-width: 0; }
  .kc-brand-name { overflow: hidden; text-overflow: ellipsis; }
  .kc-burger { flex: 0 0 36px; width: 36px; }
  .kc-header-right { gap: 6px; }
}


/* World statistics and responsive page layout. */
.kc-brand .kc-brand-mark { width: 42px; height: 42px; object-fit: contain; }
.kc-main:has(.kc-hero) { max-width: none; padding: 0 0 64px; --home-gutter: 24px; }
.kc-main:has(.kc-hero) > .kc-page { max-width: none; }
.kc-main:has(.kc-hero) > .kc-page > :not(.kc-hero) { width: calc(100% - 2 * var(--home-gutter)); max-width: 1272px; margin-inline: auto; }
.kc-hero > :not(.kc-hero-banner) { margin-left: max(var(--home-gutter), calc((100% - 1272px) / 2)); margin-right: var(--home-gutter); }
.kc-hero { padding-top: 0; }
.kc-hero-banner { width: 100%; max-width: none; margin-left: 0; height: clamp(240px, 33vw, 680px); object-fit: cover; object-position: center; border: 0; border-radius: 0; background: transparent; }
.kc-page, .kc-panel, .kc-panel-body, .kc-grid > *, .kc-toolbar > *, .kc-compare-picker { min-width: 0; }
.kc-page img:not(.kc-hero-banner), .kc-page video { max-width: 100%; }
.kc-page iframe { max-width: 100%; }
.kc-panel-head { flex-wrap: wrap; gap: 16px; }
.kc-panel-head > div { min-width: 0; }
.kc-page h1 { font-size: clamp(24px, 3vw, 36px); overflow-wrap: anywhere; }
.kc-page h2, .kc-page h3, .kc-page p, .kc-page pre { overflow-wrap: anywhere; }
.kc-page pre { max-width: 100%; overflow: auto; }
.kc-stats-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.kc-stats-note { color: var(--muted); font-size: 12px; line-height: 1.7; }
.kc-stats-disclosure { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.kc-stats-disclosure summary { cursor: pointer; padding: 8px 0; font-weight: 600; }
.kc-stats-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 16px; padding: 16px 0; }
.kc-range-field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.kc-range-field > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kc-range-field input { min-width: 0; width: 100%; }
.kc-stats-columns { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 12px; padding: 16px 0; }
.kc-stats-columns label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.kc-world-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.kc-world-table .kc-table-wrap { max-height: 70vh; overscroll-behavior: contain; scrollbar-gutter: stable; }
.kc-world-table th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.kc-world-table td.num { white-space: nowrap; }
.kc-world-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kc-compare-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.kc-compare-picker { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); }
.kc-compare-picker h3 { margin-top: 0; }
.kc-compare-selected { padding: 12px 0; color: var(--accent); }
.kc-compare-results { max-height: 280px; overflow-y: auto; }
.kc-compare-result { display: block; text-align: left; width: 100%; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--line); padding: 12px 8px; cursor: pointer; overflow-wrap: anywhere; }
.kc-compare-result:hover, .kc-compare-result:focus-visible { background: var(--surface-2); }
.kc-compare-result small { display: block; color: var(--muted); margin-top: 5px; }
.kc-compare-heading, .kc-compare-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,1.1fr) minmax(0,1fr); gap: 16px; text-align: center; align-items: center; overflow-wrap: anywhere; }
.kc-compare-heading { padding: 20px 0; color: var(--accent); }
.kc-compare-row { padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; }
.kc-compare-value { font-variant-numeric: tabular-nums; }
.kc-compare-label { color: var(--muted); font-size: 12px; }
.kc-compare-label small { display: block; margin-top: 6px; color: var(--accent); }
@media (max-width: 760px) {
 .kc-compare-pickers { grid-template-columns: 1fr; }
 .kc-toolbar { width: 100%; }
 .kc-panel-head .kc-toolbar { flex: 1 1 100%; }
 .kc-grid.auto, .kc-grid.auto-lg { grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); }
 .kc-main:has(.kc-hero) { --home-gutter: 16px; }
 .kc-hero-banner { height: auto; aspect-ratio: 2048 / 675; }
 .kc-hero-actions .kc-btn { flex: 1 1 180px; justify-content: center; }
}
@media (max-width: 460px) {
 .kc-main { padding-inline: 12px; }
 .kc-header-inner { padding-inline: 12px; gap: 8px; }
 .kc-stats-filters, .kc-stats-columns { grid-template-columns: 1fr; }
 .kc-compare-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
 .kc-compare-label { grid-column: 1 / -1; grid-row: 1; }
 .kc-compare-heading { grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); gap: 8px; }
 .kc-compare-value { font-size: 12px; }
 .kc-toolbar .kc-input, .kc-toolbar .kc-select { max-width: 100%; }
 .kc-hero-banner { height: auto; object-fit: contain; }
 .kc-compare-picker { padding: 12px; }
}
@media (pointer: coarse) { .kc-btn, .kc-chip, .kc-input, .kc-select { min-height: 44px; } }

.kc-panel-head h1 { margin: 0; }
@media (max-width: 640px) {
 .kc-main.is-flush .kc-frame-wrap { height: calc(100dvh - var(--header-h) - 110px) !important; min-height: 360px; }
 .kc-form .kc-grid.c2, .kc-form .kc-grid.c3 { grid-template-columns: 1fr; }
 .kc-kv { grid-template-columns: minmax(0, 1fr); gap: 4px; }
 .kc-inline-action { flex-wrap: wrap; max-width: 100%; }
 .kc-footer-inner { flex-wrap: wrap; }
 .kc-table-wrap { -webkit-overflow-scrolling: touch; }
}

.kc-main:has(.pb-builder) { max-width:1538px; }
/* Warpet builder: compact command bar, attributes/skills and statistics. */
.pb-builder { --pb-panel:#141619; --pb-line:#27292d; --pb-gold:#caa451; display:grid; grid-template-columns:minmax(330px, .515fr) minmax(0,1fr); grid-template-areas:"heading heading" "command command" "scan scan" "attributes summary" "skills summary" "status status"; gap:14px; max-width:1490px; margin:12px auto 0; align-items:start; }
.pb-heading { grid-area:heading; display:flex; justify-content:space-between; align-items:center; margin-bottom:0; min-height:48px; }
.pb-heading h1 { font-size:19px; font-weight:500; margin:0; }
.pb-header-actions { display:flex; gap:8px; }
.pb-builder .kc-btn { min-height:40px; font-size:12px; border-radius:8px; }
.pb-builder .pb-primary { color:#101114; background:var(--pb-gold); border-color:var(--pb-gold); font-weight:600; }
.pb-builder .pb-primary:hover { background:#dbb86a; }
.pb-share { border-color:#554625; }
.pb-command-bar { grid-area:command; display:flex; align-items:center; gap:16px; padding:12px; min-height:106px; border:1px solid var(--pb-line); border-radius:14px; background:var(--pb-panel); }
.pb-pet-picker { position:relative; flex:0 0 290px; min-width:0; }
.pb-pet-trigger { display:flex; gap:16px; align-items:center; color:var(--text); background:transparent; border:0; text-align:left; padding:0; cursor:pointer; width:100%; }
.pb-pet-portrait { display:block; width:80px; height:80px; object-fit:cover; border:2px solid #67512c; border-radius:16px; flex-shrink:0; }
.pb-pet-caption { min-width:0; }
.pb-pet-caption > strong { font-size:14px; }
.pb-pet-tags { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.pb-pet-tags span { padding:3px 10px; border:1px solid #635049; background:#302323; border-radius:16px; font-size:11px; }
.pb-pet-tags span+span { background:#1e2a30; border-color:#405c67; }
.pb-picker { position:absolute; top:calc(100% + 12px); left:0; z-index:80; width:320px; max-width:calc(100vw - 48px); background:#0e1012; border:1px solid #584828; border-radius:8px; box-shadow:0 14px 40px #0009; overflow:hidden; }
.pb-picker[hidden],.pb-builder [hidden] { display:none !important; }
.pb-picker > .kc-input { border-radius:0; border:0; border-bottom:1px solid #584828; height:38px; }
.pb-picker-list { max-height:320px; overflow-y:auto; padding:6px; scrollbar-width:thin; }
.pb-picker-list h3 { font-size:12px; color:var(--text-dim); margin:7px 4px; }
.pb-picker-option { display:flex; align-items:center; gap:12px; width:100%; min-height:45px; padding:6px; background:transparent; color:var(--text); border:0; border-radius:6px; cursor:pointer; text-align:left; font:13px var(--sans); }
.pb-picker-option img { width:32px; height:32px; object-fit:cover; border-radius:50%; }
.pb-picker-option:hover,.pb-picker-option:focus-visible,.pb-picker-option[aria-pressed="true"] { background:#202328; }
.pb-picker-check { color:var(--pb-gold); margin-left:auto; }
.pb-command-controls { border-left:1px solid var(--pb-line); padding-left:16px; min-width:0; flex:1; }
.pb-command-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.pb-command-line > span { color:var(--muted); font-size:12px; }
.pb-builder .kc-select,.pb-builder .kc-input { height:30px; font-size:12px; background:#141619; border-color:var(--pb-line); }
.pb-command-line .kc-select { width:auto; max-width:180px; }
.pb-command-line .kc-select:nth-child(2),.pb-command-line .kc-select:nth-child(4) { color:var(--pb-gold); border-color:#5e4c28; background:#24221c; }
.pb-builder .pb-conditions-button { min-height:29px; margin-top:8px; width:192px; justify-content:space-between; background:#141619; border-color:var(--pb-line); font-size:11px; }
.pb-calculate-actions { display:flex; flex-direction:column; gap:5px; }
.pb-calculate-actions .pb-primary { min-width:135px; }
.pb-panel { min-width:0; border:1px solid var(--pb-line); border-radius:14px; background:var(--pb-panel); overflow:hidden; }
.pb-panel-heading { display:flex; align-items:center; gap:10px; min-height:54px; padding:12px 16px; border-bottom:1px solid var(--pb-line); }
.pb-panel-heading h2 { font-size:14px; font-weight:500; letter-spacing:.025em; margin:0; }
.pb-heading-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#29251c; color:var(--pb-gold); font-size:17px; flex-shrink:0; }
.pb-attribute-panel { grid-area:attributes; }
.pb-attributes { display:grid; gap:12px; padding:16px; }
.pb-attributes .kc-field { display:grid; grid-template-columns:132px minmax(0,1fr); align-items:center; margin:0; gap:12px; }
.pb-attributes .kc-field > label { font-size:13px; margin:0; }
.pb-attribute-label { display:flex; align-items:center; gap:12px; color:var(--muted); }
.pb-attribute-label img { width:24px; height:24px; object-fit:contain; border-radius:50%; background:#302b1f; }
.pb-attribute-control { display:flex; gap:14px; align-items:center; }
.pb-attribute-control .kc-input { width:88px; flex-shrink:0; height:25px; border-color:#5a4826; border-radius:8px; color:var(--text); text-align:right; }
.pb-attribute-control input[type="range"] { appearance:none; min-width:0; height:6px; background:linear-gradient(to right,var(--pb-gold) var(--fill),#202227 var(--fill)); border-radius:8px; margin:0; cursor:pointer; }
.pb-attribute-control input[type="range"]::-webkit-slider-thumb { appearance:none; width:16px; height:16px; border:2px solid var(--pb-gold); border-radius:50%; background:#101114; }
.pb-attribute-control input[type="range"]::-moz-range-thumb { width:12px; height:12px; border:2px solid var(--pb-gold); border-radius:50%; background:#101114; }
.pb-skill-panel { grid-area:skills; }
.pb-skills { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px 20px; padding:18px 16px; }
.pb-slot { display:flex; justify-content:flex-start; min-width:0; }
.pb-skill-card { position:relative; width:80px; height:80px; background:#15171b; border:2px solid #5e4d2b; border-radius:16px; padding:3px; cursor:pointer; }
.pb-skill-card.is-empty { border:2px dashed var(--pb-line); }
.pb-skill-card:hover { border-color:var(--pb-gold); }
.pb-skill-icon { display:block; width:100%; height:100%; object-fit:contain; border-radius:12px; }
.pb-empty-icon { color:#5e6269; font-size:30px; font-weight:300; }
.pb-skill-level { position:absolute; bottom:-9px; left:50%; transform:translateX(-50%); white-space:nowrap; border:1px solid #584725; border-radius:8px; background:#15171b; color:var(--pb-gold); font-size:10px; line-height:14px; padding:1px 5px; }
.pb-lock { position:absolute; top:1px; left:4px; font-size:13px; color:var(--pb-gold); }
.pb-summary { grid-area:summary; }
.pb-summary-tab { border:1px solid #554727; padding:5px 11px; border-radius:7px; color:var(--pb-gold); background:#252119; font-size:12px; }
.pb-dps { margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap; }
.pb-dps strong { color:var(--pb-gold); margin-left:5px; font-size:14px; }
.pb-results { padding:24px; min-height:248px; }
.pb-modifiers { display:flex; flex-wrap:wrap; align-items:center; gap:14px; border:1px solid var(--pb-line); border-radius:12px; padding:8px 12px; font-size:12px; color:var(--muted); margin-bottom:16px; }
.pb-modifiers strong { color:var(--pb-gold); font-size:11px; }
.pb-modifiers span:first-child strong { color:#cd7261; }
.pb-damage-box { padding:10px 12px; border:1px solid var(--pb-line); border-radius:12px; margin-bottom:16px; }
.pb-damage-heading { display:flex; justify-content:space-between; padding-bottom:10px; border-bottom:1px solid #202227; }
.pb-damage-heading h3 { margin:0; color:var(--muted); font-size:12px; font-weight:500; }
.pb-damage-heading > strong,.pb-damage-value { color:var(--pb-gold); font-size:14px; }
.pb-damage-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 6px; }
.pb-damage-name { display:flex; align-items:center; gap:10px; font-size:13px; }
.pb-damage-name img { width:25px; height:25px; object-fit:contain; border-radius:4px; }
.pb-breakdown { color:var(--muted); font-size:11px; margin:5px 0; }
.pb-breakdown summary { cursor:pointer; }
.pb-breakdown > div { display:flex; justify-content:space-between; gap:10px; margin:6px 0 6px 15px; }
.pb-costs { display:flex; gap:8px; align-items:center; color:var(--pb-gold); font-size:12px; margin:12px 0; }
.pb-costs img { width:20px; height:20px; object-fit:contain; }
.pb-result-note { margin:0; padding-top:14px; border-top:1px solid var(--pb-line); color:var(--muted); font-size:12px; }
.pb-status { grid-area:status; color:var(--muted); margin:0; font-size:12px; }
.pb-status:empty { display:none; }
.pb-skill-dialog { width:min(540px,calc(100vw - 32px)); padding:24px; color:var(--text); background:var(--pb-panel); border:1px solid #5e4c28; border-radius:14px; }
.pb-skill-dialog::backdrop { background:#000b; }
.pb-dialog-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.pb-dialog-heading h3 { margin:0; }
.pb-skill-dialog .kc-field { margin-bottom:14px; }
.pb-skill-dialog h4 { margin-top:16px; }
.pb-skill-note,.pb-note { font-size:12px; color:var(--muted); }
.pb-builder button:focus-visible { outline:2px solid var(--pb-gold); outline-offset:3px; }
@media(max-width:1150px) {
 .pb-pet-picker { flex-basis:250px; }
 .pb-command-bar { flex-wrap:wrap; }
 .pb-command-controls { min-width:300px; }
 .pb-calculate-actions { margin-left:auto; }
 .pb-attributes .kc-field { grid-template-columns:110px minmax(0,1fr); gap:8px; }
 .pb-attribute-control { gap:8px; }
 .pb-attribute-control .kc-input { width:65px; }
 .pb-skills { gap:18px 10px; }
 .pb-skill-card { width:68px; height:68px; }
}
@media(max-width:800px) {
 .pb-builder { grid-template-columns:minmax(0,1fr); grid-template-areas:"heading" "command" "scan" "attributes" "skills" "summary" "status"; }
 .pb-command-controls { border-left:0; padding-left:0; min-width:0; flex-basis:100%; }
 .pb-pet-picker { flex-basis:100%; }
 .pb-calculate-actions { margin-left:0; flex:1; }
 .pb-calculate-actions .kc-btn { width:100%; }
 .pb-heading { flex-wrap:wrap; gap:10px; }
 .pb-heading h1 { font-size:17px; }
 .pb-header-actions .kc-btn { font-size:10px; padding:0 10px; }
 .pb-skills { gap:20px 10px; }
 .pb-skill-card { width:70px; height:70px; }
 .pb-results { padding:16px; }
 .pb-panel-heading { gap:8px; padding-inline:12px; }
 .pb-panel-heading h2 { font-size:12px; }
 .pb-summary-tab { font-size:10px; padding:4px 7px; }
}

/* Imported catalogs retain full descriptions and progression data. */
.kc-import-details { margin-top:10px; color:var(--text-dim); font-size:12px; line-height:1.6; }
.kc-import-details summary { cursor:pointer; color:var(--accent); }
.kc-import-details p { margin-top:10px; white-space:pre-wrap; max-width:560px; }
.kc-import-fields { display:grid; gap:8px; margin:10px 0; overflow-wrap:anywhere; }
.kc-import-fields > div { border-left:1px solid var(--line-2); padding-left:10px; }
.kc-import-fields dt { font-weight:600; color:var(--text); }
.kc-import-fields dd { margin:4px 0 0; }

.pb-legion-controls { display:flex; gap:8px; flex-wrap:wrap; }
.pb-hero-chip { display:flex; align-items:center; gap:5px; min-width:0; border:1px solid var(--pb-line); border-radius:6px; padding-left:6px; background:var(--pb-panel); }
.pb-hero-chip img { width:23px; height:27px; object-fit:cover; border-radius:4px; }
.pb-command-line .pb-hero-chip .kc-select { max-width:145px; border:0; padding-left:3px; font-size:11px; }
.pb-secondary-controls { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.pb-auto-control { display:flex; align-items:center; gap:6px; color:var(--text-dim); font-size:11px; padding-top:7px; cursor:pointer; }
.pb-auto-control input { accent-color:var(--pb-gold); }
.pb-buff-row { display:flex; justify-content:space-between; gap:12px; font-size:12px; padding:8px 0; border-top:1px solid var(--pb-line); }
.pb-buff-row span { color:var(--pb-gold); text-align:right; }

/* Illustrated hero selector, matching the warpet picker. */
.pb-hero-chip { position:relative; padding:0; border:0; background:none; }
.pb-hero-trigger { display:flex; align-items:center; gap:7px; min-height:34px; padding:3px 8px 3px 4px; border:1px solid #584828; border-radius:6px; background:#25231c; color:var(--pb-gold); font:12px var(--sans); cursor:pointer; }
.pb-hero-trigger > img { width:26px; height:28px; object-fit:cover; border:1px solid #766038; border-radius:5px; background:#141619; }
.pb-hero-trigger:hover,.pb-hero-trigger[aria-expanded="true"] { border-color:var(--pb-gold); background:#302b20; }
.pb-hero-trigger:focus-visible { outline:2px solid var(--pb-gold); outline-offset:3px; }
.pb-hero-chevron { margin-left:5px; color:#b2aa97; }
.pb-hero-menu { top:calc(100% + 8px); width:280px; }
.pb-hero-chip:last-child .pb-hero-menu { left:auto; right:0; }
.pb-hero-menu .pb-picker-option { gap:12px; min-height:50px; }
.pb-hero-menu .pb-picker-option img { width:38px; height:38px; border:1px solid #766038; border-radius:10px; background:radial-gradient(circle at top,#574629,#17191d); }
.pb-hero-menu .pb-picker-option[aria-pressed="true"] { background:#30291c; color:var(--pb-gold); }
.pb-hero-menu .pb-picker-option:disabled { opacity:.4; cursor:not-allowed; }
@media(max-width:600px) {
 .pb-legion-controls { position:relative; flex-basis:100%; }
 .pb-hero-chip { position:static; }
 .pb-hero-chip .pb-hero-menu,.pb-hero-chip:last-child .pb-hero-menu { left:0; right:auto; }
}

/* Consistent page polish: encyclopedia, account, stats and community views. */
.kc-panel,.kc-card { border-radius: 14px; }
.kc-panel { overflow: hidden; }
.kc-panel-head { gap: 16px; }
.kc-panel-body { min-width: 0; overflow-wrap: anywhere; }
.kc-panel-body p { line-height: 1.65; }
.kc-panel-body > *:last-child { margin-bottom: 0; }
.kc-grid > *, .kc-linkgrid > *, .kc-toolbar > * { min-width: 0; }
.kc-linkrow { transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.kc-linkrow:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-1px); }
.kc-panel details { border-top: 1px solid var(--line); padding-top: 6px; }
.kc-panel details:first-child { border-top: 0; }
.kc-panel summary { cursor: pointer; }
.kc-panel summary:hover { color: var(--accent); }
.kc-panel table { max-width: 100%; }
.kc-panel img { max-width: 100%; }
.kc-about-lead { margin: 0; font-size: clamp(17px, 2.2vw, 22px); font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.kc-input:focus-visible,.kc-select:focus-visible,.kc-btn:focus-visible,
.kc-chip:focus-visible,a:focus-visible,summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
@media (max-width: 760px) {
 .kc-panel-head { flex-wrap: wrap; }
 .kc-panel-body { overflow-wrap: anywhere; }
 .kc-toolbar { flex-wrap: wrap; }
 .kc-linkrow:hover { transform: none; }
 .kc-about-lead { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
 .kc-linkrow { transition: none; }
 .kc-linkrow:hover { transform: none; }
}


/* Kraken 888: transparent wide artwork, fully visible on every viewport. */
.kc-main:has(.kc-hero) { background: #090b0e; }
.kc-hero {
  overflow: hidden;
  padding: clamp(10px, 2.2vw, 34px) 0 clamp(24px, 3vw, 44px);
  background: radial-gradient(ellipse 66% 78% at 50% 36%, rgba(16, 62, 93, .30), transparent 77%), #090b0e;
  border-bottom: 1px solid var(--line);
}
.kc-hero > .kc-hero-visual {
  display: block;
  width: min(100%, 2048px);
  max-width: 100%;
  margin: 0 auto clamp(18px, 2.3vw, 34px);
  padding: 0;
}
.kc-hero-visual > .kc-hero-banner {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 2048 / 682;
  object-fit: contain;
  object-position: center center;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  box-shadow: none;
}
.kc-hero h1 { max-width: 32ch; text-wrap: balance; }
.kc-hero-lead { max-width: 68ch; }
@media (max-width: 900px) {
  .kc-hero { padding-top: 14px; padding-bottom: 30px; }
  .kc-hero > .kc-hero-visual { margin-bottom: 22px; }
}
@media (max-width: 640px) {
  .kc-hero { padding-top: 10px; padding-bottom: 24px; }
  .kc-hero > .kc-hero-visual { width: 100%; margin-bottom: 18px; }
  .kc-hero-visual > .kc-hero-banner {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }
  .kc-hero h1 { font-size: clamp(24px, 6.6vw, 32px); max-width: none; }
  .kc-hero-lead { font-size: 14px; line-height: 1.6; }
  .kc-hero-actions { gap: 8px; margin-top: 20px; }
}
@media (max-width: 420px) {
  .kc-hero { padding-top: 6px; }
  .kc-hero > .kc-hero-visual { margin-bottom: 14px; }
  .kc-hero-actions .kc-btn { flex: 1 1 100%; }
}

/* Strongest pets */
.kc-strongest-skills { margin: 8px 0; padding-left: 20px; display: grid; gap: 3px; font-size: 13px; }

/* ================================================================ adaptive
 * Сквозная доводка под ноутбуки, планшеты и телефоны. Блок стоит в конце
 * файла, чтобы перекрывать правила страниц без !important там, где можно.
 * Брейкпоинты: 1366/1280 — ноутбуки, 1024 — планшет альбомный,
 * 768 — планшет книжный, 640 — телефон, 400 — узкий телефон.
 */

/* Таблицы: минимальная ширина задаётся из dataTable через переменную. */
.kc-table { min-width: var(--kc-table-min, 0); }

/* Ноутбуки: чуть плотнее поля, чтобы широкие таблицы и сетки помещались. */
@media (min-width: 901px) and (max-width: 1366px) {
  .kc-main { padding-left: 20px; padding-right: 20px; }
}

/* Планшеты */
@media (max-width: 1024px) {
  .kc-statrow.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-grid.auto-lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 768px) {
  .kc-panel-head { flex-wrap: wrap; gap: 10px 14px; }
  .kc-panel-head > .kc-btn, .kc-panel-head > a.kc-btn { flex-shrink: 0; }
  .kc-footer-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; }
}

/* Телефоны */
@media (max-width: 640px) {
  /* Подписи показателей не рвём посреди слова. */
  .kc-statrow .k, .kc-statrow .v { overflow-wrap: normal; word-break: normal; hyphens: auto; }
  .kc-statrow.is-4, .kc-statrow.is-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-statrow .v { font-size: 18px; }

  /* Поля фильтров: поиск — на всю строку, остальное делит ряд. */
  .kc-toolbar > input[type="search"], .kc-toolbar > .kc-input.grow, .kc-toolbar > input.kc-input:first-child { flex: 1 1 100%; }
  .kc-toolbar .kc-select { flex: 1 1 140px; min-width: 0; text-overflow: ellipsis; }

  /* Футер — две колонки вместо одной длинной ленты. */
  .kc-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .kc-footer h4 { margin-bottom: 9px; }
  .kc-footer li { margin-bottom: 6px; }

  /* Кнопка поддержки — круглая иконка, чтобы не закрывать контент. */
  .kc-support-launcher { width: 46px; height: 46px; padding: 0; justify-content: center; }
  .kc-support-launcher .label { display: none; }
  .kc-support-launcher .mark svg { width: 18px; height: 18px; }
  .kc-support-launcher .kc-unread { position: absolute; top: -4px; right: -4px; }

  /* Конструктор питомцев: подпись характеристики над ползунком. */
  .pb-attributes .kc-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pb-attribute-control .kc-input { width: 76px; }

  /* Таблицы → карточки. Сортировка остаётся чипами над списком. */
  .kc-table-wrap.is-stack { overflow-x: hidden; }
  .kc-table-wrap.is-stack .kc-table { min-width: 0; display: block; }
  .kc-table-wrap.is-stack thead { display: none; }
  .kc-table-wrap.is-stack.has-sort thead { display: block; margin-bottom: 10px; }
  .kc-table-wrap.is-stack.has-sort thead tr { display: flex; flex-wrap: wrap; gap: 6px; }
  .kc-table-wrap.is-stack.has-sort thead th { display: block; padding: 0; border: 0; background: none; width: auto !important; }
  .kc-table-wrap.is-stack.has-sort thead th:not(.sortable) { display: none; }
  .kc-table-wrap.is-stack.has-sort thead .kc-sort-btn { min-height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--text-dim); font-size: 11.5px; letter-spacing: 0; text-transform: none; }
  .kc-table-wrap.is-stack.has-sort thead th[aria-sort="ascending"] .kc-sort-btn,
  .kc-table-wrap.is-stack.has-sort thead th[aria-sort="descending"] .kc-sort-btn { border-color: rgba(216,180,93,.45); color: var(--accent); background: var(--accent-bg); }
  .kc-table-wrap.is-stack tbody { display: flex; flex-direction: column; gap: 8px; }
  .kc-table-wrap.is-stack tbody tr { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
  .kc-table-wrap.is-stack tbody tr:hover td { background: none; }
  .kc-table-wrap.is-stack td { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 0; border: 0; text-align: left !important; white-space: normal; overflow-wrap: anywhere; }
  .kc-table-wrap.is-stack td::before { content: attr(data-label); color: var(--muted-2); font: 600 9.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
  .kc-table-wrap.is-stack td[data-label=""]::before { content: none; }
  .kc-table-wrap.is-stack td.kc-td-head { grid-column: 1 / -1; padding-right: 44px; font-size: 14px; color: var(--text); }
  .kc-table-wrap.is-stack td.kc-td-head::before { content: none; }
  .kc-table-wrap.is-stack td.kc-td-rank { position: absolute; top: 10px; right: 12px; min-width: 30px; align-items: flex-end; font: 600 13px var(--mono); color: var(--accent); }
  .kc-table-wrap.is-stack td.kc-td-rank::before { content: '#'; display: inline; font: inherit; letter-spacing: 0; color: var(--muted-2); }
  .kc-table-wrap.is-stack td.kc-td-rank { flex-direction: row; gap: 0; }
  .kc-table-wrap.is-stack td:empty { display: none; }
  /* Внутренние min-width (полоски, ячейки с картинкой) не распирают карточку. */
  .kc-table-wrap.is-stack td > * { min-width: 0 !important; max-width: 100%; }
  .kc-table-wrap.is-stack td > div { width: 100%; }
  .kc-table-wrap.is-stack .kc-petcell { min-width: 0; }
  .kc-table-wrap.is-stack details { grid-column: 1 / -1; }
  .kc-table-wrap.is-stack td:has(> details) { grid-column: 1 / -1; }
  .kc-world-table .kc-table-wrap.is-stack { max-height: none; }
}

@media (max-width: 400px) {
  .kc-main { padding-left: 12px; padding-right: 12px; }
  .kc-panel-body, .kc-panel-head { padding: 12px; }
  .kc-toolbar .kc-select { flex-basis: 100%; }
  .kc-table-wrap.is-stack tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kc-footer-inner { gap: 18px 10px; }
}

/* ================================================= выбор навыка картинками */
.pb-skill-dialog.is-picker { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 20px; }
.kc-skillpick { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.kc-skillpick > .kc-input { height: 36px; }
.kc-skillpick-attrs { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-skillpick-attrs .kc-chip { min-height: 28px; padding: 0 10px; font-size: 11.5px; }
.kc-skillpick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.kc-skillpick-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border: 1px solid transparent; border-radius: 10px; background: #15171b; color: var(--text-dim); font: 11px/1.25 var(--sans); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.kc-skillpick-tile:hover:not(:disabled), .kc-skillpick-tile:focus-visible { border-color: #caa451; background: #1d1f24; color: var(--text); }
.kc-skillpick-tile.is-current { border-color: #caa451; background: rgba(202,164,81,.12); color: var(--text); }
.kc-skillpick-tile:disabled { opacity: .35; cursor: not-allowed; }
.kc-skillpick-img { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid #5e4d2b; border-radius: 12px; background: #101114; overflow: hidden; }
.kc-skillpick-img img { width: 100%; height: 100%; object-fit: contain; }
.kc-skillpick-img b { font-size: 13px; color: var(--muted); }
.kc-skillpick-tile.is-amber .kc-skillpick-img { border-color: #d4a020; box-shadow: 0 0 8px rgba(212,160,32,.35); }
.kc-skillpick-name { overflow-wrap: normal; hyphens: auto; }
.kc-skillpick-dep { font-size: 9.5px; color: var(--muted-2); }
.kc-skillpick-info { min-height: 64px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #101114; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.kc-skillpick-info p { margin: 8px 0 0; white-space: pre-line; }
.kc-skillpick-infohead { display: flex; align-items: center; gap: 10px; }
.kc-skillpick-infohead img { width: 38px; height: 38px; border-radius: 9px; border: 1px solid #5e4d2b; object-fit: contain; }
.kc-skillpick-infohead strong { color: var(--text); font-size: 13.5px; }
.kc-skillpick-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.kc-skillpick-tags span { padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 10.5px; color: var(--muted); }
.kc-skillpick-tags .is-amber { border-color: #d4a020; color: #e0b44a; }
.kc-skillpick-hint { margin: 0; color: var(--muted-2); font-size: 12px; }
.pb-skill-remove { margin-top: 10px; }
@media (max-width: 640px) {
  .pb-skill-dialog.is-picker { width: calc(100vw - 16px); padding: 14px; }
  .kc-skillpick-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: 42vh; }
  .kc-skillpick-img { width: 46px; height: 46px; }
}

/* ======================================= энциклопедия: навыки героев */
.kc-skillrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: -2px 0 12px; }
.kc-skillbtn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface-2); color: var(--muted); font: 600 12px var(--sans); cursor: pointer; overflow: hidden; transition: transform .12s, border-color .15s; }
.kc-skillbtn img { width: 100%; height: 100%; object-fit: cover; }
.kc-skillbtn:hover, .kc-skillbtn:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.kc-skillbtn.is-ult { border-color: rgba(216,180,93,.6); box-shadow: 0 0 8px rgba(216,180,93,.25); }
.kc-skilltip { position: fixed; z-index: 140; width: min(360px, calc(100vw - 16px)); padding: 14px; border: 1px solid rgba(216,180,93,.4); border-radius: 12px; background: #0f1113; box-shadow: 0 18px 50px rgba(0,0,0,.6); pointer-events: none; }
.kc-skilltip[hidden] { display: none; }
.kc-skillcard-head { display: flex; align-items: center; gap: 12px; }
.kc-skillcard-head img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); object-fit: cover; flex-shrink: 0; }
.kc-skillcard-head strong { display: block; color: var(--text); font-size: 14px; line-height: 1.3; }
.kc-skillcard-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.kc-skillcard-ult { color: var(--accent); font-weight: 600; }
.kc-skillcard-text { margin: 10px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-dim); white-space: pre-line; }
.kc-skillcard-up { margin-top: 10px; font-size: 12px; color: var(--muted); }
.kc-skillcard-up b { color: var(--text-dim); font-weight: 600; }
.kc-skillcard-up p { margin: 4px 0 0; white-space: pre-line; line-height: 1.5; }
.kc-skill-modal { width: min(460px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 20px; border: 1px solid rgba(216,180,93,.4); border-radius: 14px; background: #0f1113; color: var(--text); }
.kc-skill-modal::backdrop { background: rgba(0,0,0,.65); }
.kc-skill-modal-x { float: right; width: 32px; height: 32px; margin: -6px -6px 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-size: 18px; cursor: pointer; }

/* Открытое модальное окно блокирует прокрутку страницы; место под полосу
   прокрутки зарезервировано, чтобы контент не сдвигался. */
html { scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
/* Окно выбора навыка не меняет размер: сетка и описание фиксированной высоты. */
.kc-skillpick-grid { height: min(46vh, 420px); max-height: none; align-content: start; }
.kc-skillpick-info { height: 132px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
@media (max-width: 640px) { .kc-skillpick-grid { height: 40vh; } .kc-skillpick-info { height: 120px; } }

/* ================================================================ calendar */
.cal-panel { overflow: visible; }
.cal-bar-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cal-left, .cal-right, .cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-clock { padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 8px; font: 600 12px var(--mono); color: var(--text); }
.cal-season { padding: 4px 9px; border: 1px solid rgba(216,180,93,.5); border-radius: 7px; background: rgba(216,180,93,.1); font: 600 12px var(--mono); color: var(--accent); }
.cal-title { min-width: 190px; margin: 0; text-align: center; font: 500 20px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.cal-arrow { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 22px; cursor: pointer; }
.cal-arrow:hover { background: var(--surface-3); color: var(--text); }
.cal-klabel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.cal-kingdom { width: 76px; height: 32px; min-height: 0; text-align: center; font: 600 13px var(--mono); }
.cal-filterwrap { position: relative; }
.cal-filters { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 4px; width: 220px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; background: #0f1113; box-shadow: 0 14px 40px rgba(0,0,0,.6); }
.cal-filters[hidden] { display: none; }
.cal-filter { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.cal-filter:hover { background: var(--surface-2); }
.cal-filter input { accent-color: var(--accent); }

.cal-grid { margin: 0 12px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-head span { padding: 8px; text-align: center; font: 600 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.cal-week { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 3px; min-height: 120px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, transparent calc(100% - 1px), var(--line) 0) 0 0 / calc(100% / 7) 100%; }
.cal-week:last-child { border-bottom: 0; }
.cal-date { grid-row: 1; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 8px; }
.cal-num { font: 600 12px var(--mono); color: var(--text); }
.cal-date.is-out .cal-num { color: var(--muted-2); opacity: .5; }
.cal-date.is-today .cal-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e3c27a; color: #14100a; box-shadow: 0 0 12px rgba(227,194,122,.5); }
.cal-kvk { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: #ff4d6d; font: 700 10.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.cal-kvk::before { content: '!'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #ff2d55; color: #fff; font-size: 11px; }

.cal-bar { display: flex; align-items: center; gap: 6px; min-width: 0; height: 24px; margin: 0 2px; padding: 0 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; background: #23262b; color: #c8ccd0; font: 500 11.5px var(--sans); text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; transition: filter .12s; }
.cal-bar span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cal-bar:hover { filter: brightness(1.25); }
.cal-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.cal-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-bar.is-now { box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset; }
.cal-ico { display: inline-flex; flex-shrink: 0; opacity: .8; }
.cal-bar.c-red { background: #4a1d20; border-color: #7a2b2f; color: #f1c6c4; }
.cal-bar.c-purple { background: #34204d; border-color: #5a3a86; color: #dccbf3; }
.cal-bar.c-amber { background: #4a2f15; border-color: #7d5124; color: #f0d2a8; }
.cal-bar.c-sky { background: #16343f; border-color: #275b6c; color: #c4e3ee; }
.cal-bar.c-yellow { background: #3d3613; border-color: #6c5f1f; color: #ece0a6; }
.cal-bar.is-stage { background: #1e2125; border-color: #3a3e44; color: #c9cdd2; }
.cal-bar.is-pass { background: #1d2740; border-color: #34477a; color: #c7d3f1; }
.cal-bar.is-statue { background: #3a2a1c; border-color: #6a4b2e; color: #ebd0b3; }
.cal-bar.is-behemoth { background: #1a3322; border-color: #2f5d3b; color: #c3e8cd; }

.cal-agenda { display: none; flex-direction: column; gap: 10px; margin: 0 12px 12px; }
.cal-aday { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.cal-aday.is-today { border-color: rgba(227,194,122,.6); }
.cal-adate { display: flex; flex-direction: column; align-items: center; }
.cal-adate b { font: 600 18px var(--mono); color: var(--text); }
.cal-adate span { font-size: 11px; color: var(--muted-2); }
.cal-aday.is-today .cal-adate b { color: #e3c27a; }
.cal-alist { display: flex; flex-direction: column; gap: 4px; }
.cal-alist .cal-bar { margin: 0; height: auto; min-height: 28px; white-space: normal; }
.cal-alist .cal-bar span:last-child { overflow: visible; }

.cal-modal { width: min(440px, calc(100vw - 24px)); padding: 0; border: 1px solid rgba(216,180,93,.4); border-radius: 14px; background: #0f1113; color: var(--text); }
.cal-modal::backdrop { background: rgba(0,0,0,.65); }
.cal-modal .lp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal-modal .lp-modal-head h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 16px; }
.cal-modal .lp-modal-x { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-size: 17px; cursor: pointer; }
.cal-modal .lp-modal-body { padding: 14px 18px 18px; }
.cal-modal .lp-ok { color: var(--success); font-weight: 600; margin: 10px 0 0; }
.cal-dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13px; }
.cal-dl dt { color: var(--muted-2); }
.cal-dl dd { margin: 0; color: var(--text); }

@media (max-width: 900px) {
  .cal-title { min-width: 0; font-size: 16px; }
  .cal-bar-top { justify-content: center; }
}
@media (max-width: 640px) {
  .cal-grid { display: none; }
  .cal-agenda { display: flex; }
  .cal-right { flex-wrap: wrap; justify-content: center; }
}

/* ====================================== аккаунты: витрина, продажа, сделки */
.kc-lordbadges { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.kc-lordline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; }
.kc-lordline b { color: #e3c27a; font-weight: 500; }
.kc-lordcap { min-width: 92px; font: 600 9.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }
.kc-decos { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.kc-deco { position: relative; display: inline-block; width: 34px; height: 34px; }
.kc-deco img { width: 100%; height: 100%; border-radius: 7px; border: 1px solid rgba(227,194,122,.45); object-fit: cover; }
.kc-deco i { position: absolute; right: -4px; bottom: -4px; min-width: 15px; padding: 0 3px; border-radius: 99px; background: #0c0d0e; border: 1px solid var(--line-2); font: 700 9px/13px var(--mono); font-style: normal; text-align: center; color: var(--text); }

.kc-flexstatus { margin: 4px 0 6px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 12.5px; }
.kc-flexstatus.is-approved { border-color: rgba(121,199,155,.45); color: var(--success); background: rgba(121,199,155,.07); }
.kc-flexstatus.is-pending { border-color: rgba(216,180,93,.45); color: var(--accent); background: var(--accent-bg); }
.kc-flexstatus.is-rejected { border-color: rgba(224,138,128,.45); color: var(--danger); background: rgba(224,138,128,.07); }

.mk-card { display: flex; flex-direction: column; gap: 10px; }
.mk-top { display: flex; align-items: center; gap: 12px; }
.mk-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mk-who b { color: var(--text); overflow-wrap: anywhere; }
.mk-price { flex-shrink: 0; padding: 6px 12px; border: 1px solid rgba(216,180,93,.5); border-radius: 10px; background: var(--accent-bg); font: 700 16px var(--mono); color: var(--accent); white-space: nowrap; }
.mk-price.is-big { display: inline-block; margin-bottom: 8px; font-size: 22px; }
.mk-title { margin: 2px 0 0; font-size: 15.5px; line-height: 1.35; color: var(--text); }
.mk-counts { margin: 0; }
.mk-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-dim); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-desc.is-full { display: block; -webkit-line-clamp: unset; overflow: visible; }
.mk-actions { margin-top: auto; padding-top: 6px; }
.mk-note:empty { display: none; }
.mk-modal { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid rgba(216,180,93,.4); border-radius: 14px; background: #0f1113; color: var(--text); }
.mk-modal::backdrop { background: rgba(0,0,0,.65); }
.mk-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mk-modal-head h3 { margin: 0; font-size: 17px; }
.mk-x { width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-2); color: var(--text-dim); font-size: 17px; cursor: pointer; }
.mk-modal-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; }
.mk-priceinput { font: 600 16px var(--mono); }
.mk-info { min-height: 18px; margin-top: 10px; font-size: 13px; }
.mk-info.is-ok { color: var(--success); }
.mk-info.is-err { color: var(--danger); }

.dl-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 520px; border-top: 1px solid var(--line); }
.dl-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; padding: 10px; overflow-y: auto; border-right: 1px solid var(--line); }
.dl-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dl-item:hover { background: var(--surface-2); }
.dl-item.is-active { border-color: rgba(216,180,93,.45); background: var(--accent-bg); }
.dl-item-top { display: flex; justify-content: space-between; gap: 8px; }
.dl-item-top b { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.dl-item-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.dl-item-last { font-size: 12px; color: var(--muted-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-unread { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 10px/18px var(--sans); text-align: center; }
.dl-chat { display: flex; flex-direction: column; min-width: 0; }
.dl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dl-head b { color: var(--text); font-size: 15px; }
.dl-head-r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dl-log { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 280px; max-height: 56vh; padding: 16px; overflow-y: auto; }
.dl-msg { display: flex; flex-direction: column; gap: 3px; max-width: 78%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.dl-msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.dl-msg.from-buyer { align-self: flex-end; background: rgba(216,180,93,.14); border: 1px solid rgba(216,180,93,.3); border-bottom-right-radius: 4px; }
.dl-msg.from-admin { align-self: flex-start; background: var(--surface-3); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.dl-msg.from-system { align-self: center; max-width: 92%; background: none; border: 1px dashed var(--line-2); color: var(--muted); font-size: 12.5px; text-align: center; }
.dl-msg-who { font: 600 10.5px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl-msg-time { align-self: flex-end; font-size: 10.5px; color: var(--muted-2); }
.dl-compose { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dl-compose-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-warn { margin: 0; padding: 0 16px 14px; }
.dl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 20px; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .dl-layout { grid-template-columns: minmax(0, 1fr); }
  .dl-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dl-msg { max-width: 92%; }
  .mk-top { flex-wrap: wrap; }
}

/* =========================================================== серверы */
.sv-card { display: flex; flex-direction: column; gap: 12px; }
.sv-head { display: flex; align-items: center; gap: 12px; }
.sv-num { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid rgba(216,180,93,.4); border-radius: 11px; background: var(--accent-bg); font: 600 16px var(--mono); color: var(--accent); }
.sv-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sv-title b { font-size: 15.5px; font-weight: 600; color: var(--text); }
.sv-title small { font-size: 11.5px; color: var(--muted-2); }
.sv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.sv-stats > div { background: var(--surface); }
.sv-leaders { display: flex; flex-direction: column; gap: 6px; margin: 0; padding-top: 2px; }
.sv-leaders > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.sv-leaders dt { color: var(--muted-2); }
.sv-leaders dd { margin: 0; min-width: 0; color: var(--text); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.sv-leaders dd.is-gold { color: var(--accent); }
.sv-actions { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

/* --- питомец по скриншоту (pet-scan.js): профиль и конструктор */
.kc-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kc-scan-status { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.5px; color: var(--text-dim); display: grid; gap: 3px; }
.kc-scan-status:empty { display: none; }
.kc-scan-status.is-busy { color: var(--muted); grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.kc-scan-status.is-busy::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: kc-scan-spin .8s linear infinite; }
.kc-scan-status.is-done { border-color: rgba(121,199,155,.4); background: rgba(121,199,155,.07); }
.kc-scan-status.is-done > div:first-child { color: var(--success); font-weight: 600; }
.kc-scan-status.is-error { border-color: rgba(224,138,128,.4); background: rgba(224,138,128,.08); color: var(--danger); }
.pb-skill-card.is-unsure { outline: 2px solid #e8b84a; outline-offset: 2px; }
.pb-scan-bar { grid-area: scan; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border: 1px solid var(--pb-line); border-radius: 12px; background: var(--pb-panel); }
.pb-scan-bar .kc-scan-status { flex: 1 1 320px; }
.pb-scan-hint { color: var(--muted-2); font-size: 12px; }
@keyframes kc-scan-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kc-scan-status.is-busy::before { animation: none; } }

/* --- уровень навыка питомца: 0–3 звезды, как в игре */
.kc-stars { display: inline-flex; align-items: center; gap: 2px; }
.kc-star { background: none; border: 0; padding: 0 2px; font-size: 20px; line-height: 1; color: var(--pb-gold, #caa451); cursor: pointer; opacity: .5; transition: transform .12s ease, opacity .12s ease; }
.kc-star.is-on { opacity: 1; text-shadow: 0 0 6px rgba(227,194,122,.35); }
.kc-star:hover:not(:disabled) { transform: scale(1.15); opacity: 1; }
.kc-star:focus-visible { outline: 2px solid var(--pb-gold, #caa451); outline-offset: 1px; border-radius: 4px; }
.kc-stars.is-locked .kc-star { cursor: default; }
.pb-skill-wrap { position: relative; display: inline-flex; }
.pb-card-stars { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border: 1px solid #584725; border-radius: 8px; background: #15171b; padding: 0 3px; gap: 0; white-space: nowrap; }
.pb-card-stars .kc-star { font-size: 13px; padding: 1px 2px; }
@media (prefers-reduced-motion: reduce) { .kc-star { transition: none; } }

/* --- скрытый раздел «Патчи сайта» */
.pt-intro { margin-bottom: 14px; }
.pt-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.pt-days { display: grid; gap: 12px; }
.pt-day-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.pt-day-head h2 { margin: 0; font-size: 18px; }
.pt-day-meta { color: var(--muted); font-size: 12.5px; }
.pt-items { list-style: none; margin: 0; padding: 4px 16px 14px; display: grid; gap: 6px; }
.pt-item { display: grid; grid-template-columns: 112px 1fr auto; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.pt-item:last-child { border-bottom: 0; }
.pt-kind { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.pt-item.is-feature .pt-kind { color: var(--success); }
.pt-item.is-fix .pt-kind { color: #e8b84a; }
.pt-item.is-tech .pt-kind, .pt-item.is-minor .pt-kind { color: var(--muted); }
.pt-item.is-minor .pt-title { color: var(--muted); }
.pt-count { color: var(--muted); font-size: 12px; }
.pt-hash { color: var(--muted-2); font-size: 11.5px; }
@media (max-width: 640px) {
  .pt-item { grid-template-columns: 1fr auto; }
  .pt-kind { grid-column: 1 / -1; }
}
