:root {
  --ink: #d7e7df;
  --dim: #8ea89a;
  --line: rgba(231, 195, 154, 0.35);
  --table: #e7c39a;
  --table-ink: #1a120c;
  --bg: #1b2420;
  --card: #24302a;
  --field: #17211c;
  --danger: #ff8fa8;
  --dock: #ff403b;
  --sans: Inter, "Segoe UI", sans-serif;
}

html[data-look="czytelny"] {
  --ink: #f3efe6;
  --dim: #c4bdb0;
  --line: rgba(243, 239, 230, 0.22);
  --table: #f3efe6;
  --table-ink: #1a1714;
  --bg: #1a1714;
  --card: #241f1a;
  --field: #2c261f;
  --danger: #ffb4a8;
  --dock: #ff5c4d;
}

html[data-look="papier"] {
  --ink: #1c1915;
  --dim: #5e574c;
  --line: rgba(28, 25, 21, 0.18);
  --table: #1c1915;
  --table-ink: #f7f3ea;
  --bg: #f6f1e7;
  --card: #fffdf8;
  --field: #fffdf8;
  --danger: #9d2c2c;
  --dock: #b42323;
}

html[data-look="atrament"] {
  --ink: #1a1a1a;
  --dim: #5c5c5c;
  --line: rgba(26, 26, 26, 0.14);
  --table: #1a1a1a;
  --table-ink: #f7f7f5;
  --bg: #f7f7f5;
  --card: #ffffff;
  --field: #ffffff;
  --danger: #a32020;
  --dock: #c41616;
}

html[data-look="sepia"] {
  --ink: #3a2a1a;
  --dim: #7a6248;
  --line: rgba(58, 42, 26, 0.16);
  --table: #3a2a1a;
  --table-ink: #f8f1e3;
  --bg: #f3e6d0;
  --card: #fbf6ec;
  --field: #fffaf2;
  --danger: #8d2b2b;
  --dock: #9a2a22;
}

html[data-look="kreda"] {
  --ink: #1e2328;
  --dim: #5c656e;
  --line: rgba(30, 35, 40, 0.14);
  --table: #1e2328;
  --table-ink: #f4f6f8;
  --bg: #e7ebef;
  --card: #f7f9fb;
  --field: #ffffff;
  --danger: #9d2c2c;
  --dock: #b4232a;
}

html[data-look="zmierzch"] {
  --ink: #f3efe6;
  --dim: #b7b0a4;
  --line: rgba(243, 239, 230, 0.16);
  --table: #f3efe6;
  --table-ink: #1c1916;
  --bg: #2a2622;
  --card: #342f2a;
  --field: #3c362f;
  --danger: #e7a39a;
  --dock: #ff6b62;
}

html[data-look="czern"] {
  --ink: #f4f4f4;
  --dim: #a3a3a3;
  --line: rgba(255, 255, 255, 0.82);
  --table: #ffffff;
  --table-ink: #000000;
  --bg: #000000;
  --card: #000000;
  --field: #000000;
  --danger: #ff5c5c;
  --dock: #ff403b;
}

html[data-look="terminal"] {
  --ink: #b6ffce;
  --dim: #6fbb88;
  --line: rgba(182, 255, 206, 0.28);
  --table: #7dff9a;
  --table-ink: #04140a;
  --bg: #061108;
  --card: #0b1a10;
  --field: #08140c;
  --danger: #ff7a7a;
  --dock: #ff5a52;
  --sans: "Share Tech Mono", ui-monospace, monospace;
}

html[data-look="obwod"] {
  --ink: #e7fff8;
  --dim: #8fd0c8;
  --line: rgba(0, 240, 255, 0.62);
  --table: #00f0ff;
  --table-ink: #041018;
  --bg: #05070d;
  --card: #081018;
  --field: #060c14;
  --danger: #ff4d8d;
  --dock: #ff2bd6;
}

html:not([data-look="terminal"]) body {
  font-family: var(--sans);
}

html[data-look="czern"] body {
  background: #000;
}

html[data-look="czern"] .login-card,
html[data-look="czern"] .worlds .world,
html[data-look="czern"] .sea .world,
html[data-look="czern"] .track,
html[data-look="czern"] .track-banner,
html[data-look="czern"] .composer,
html[data-look="czern"] .post {
  background: #000;
  box-shadow: none;
  border: 1px solid #fff;
  border-radius: 0;
}

html[data-look="czern"] .top,
html[data-look="czern"] .crumbs {
  background: #000;
}

html[data-look="czern"] button,
html[data-look="czern"] .go,
html[data-look="czern"] .back {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 0;
  box-shadow: none;
}

html[data-look="czern"] button:hover,
html[data-look="czern"] .go:hover,
html[data-look="czern"] .back:hover {
  background: #fff;
  color: #000;
  filter: none;
}

html[data-look="czern"] button.danger-btn {
  color: #ff5c5c;
  border-color: #ff5c5c;
  background: transparent;
}

html[data-look="czern"] .world:hover,
html[data-look="czern"] .row:hover {
  background: transparent;
}

html[data-look="czern"] input,
html[data-look="czern"] textarea,
html[data-look="czern"] select {
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

html[data-look="obwod"] body {
  background:
    linear-gradient(rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.06) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 0%, rgba(255, 43, 214, 0.18), transparent 42%),
    radial-gradient(ellipse at 100% 100%, rgba(0, 240, 255, 0.14), transparent 46%),
    #05070d;
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
}

html[data-look="obwod"] .top,
html[data-look="obwod"] .crumbs {
  background: rgba(5, 7, 13, 0.94);
  border-bottom: 1px solid rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.12);
}

html[data-look="obwod"] h1,
html[data-look="obwod"] .scene-title,
html[data-look="obwod"] .world h2,
html[data-look="obwod"] .lore-title,
html[data-look="obwod"] .login-card h2 {
  font-family: Orbitron, Inter, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[data-look="obwod"] .login-card,
html[data-look="obwod"] .worlds .world,
html[data-look="obwod"] .sea .world,
html[data-look="obwod"] .track,
html[data-look="obwod"] .track-banner,
html[data-look="obwod"] .composer,
html[data-look="obwod"] .post,
html[data-look="obwod"] .row {
  position: relative;
  border: 1px solid rgba(0, 240, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 43, 214, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(0, 240, 255, 0.08), transparent 42%),
    #070d16;
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.22),
    0 0 16px rgba(0, 240, 255, 0.14);
}

html[data-look="obwod"] .login-card::before,
html[data-look="obwod"] .worlds .world::before,
html[data-look="obwod"] .sea .world::before,
html[data-look="obwod"] .track::before,
html[data-look="obwod"] .composer::before,
html[data-look="obwod"] .post::before {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  background:
    linear-gradient(#00f0ff, #00f0ff) left top / 16px 2px no-repeat,
    linear-gradient(#00f0ff, #00f0ff) left top / 2px 16px no-repeat,
    linear-gradient(#ff2bd6, #ff2bd6) right top / 16px 2px no-repeat,
    linear-gradient(#ff2bd6, #ff2bd6) right top / 2px 16px no-repeat,
    linear-gradient(#ff2bd6, #ff2bd6) left bottom / 16px 2px no-repeat,
    linear-gradient(#ff2bd6, #ff2bd6) left bottom / 2px 16px no-repeat,
    linear-gradient(#00f0ff, #00f0ff) right bottom / 16px 2px no-repeat,
    linear-gradient(#00f0ff, #00f0ff) right bottom / 2px 16px no-repeat;
}

html[data-look="obwod"] .sea .world.is-core {
  border-color: #ff2bd6;
  box-shadow:
    inset 0 0 0 1px rgba(255, 43, 214, 0.55),
    0 0 24px rgba(255, 43, 214, 0.28);
}

html[data-look="obwod"] button,
html[data-look="obwod"] .go,
html[data-look="obwod"] .back {
  border: 0;
  border-radius: 0;
  background: linear-gradient(90deg, #00f0ff, #6d5cff 62%, #ff2bd6);
  color: #041018;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

html[data-look="obwod"] button:hover,
html[data-look="obwod"] .go:hover,
html[data-look="obwod"] .back:hover {
  filter: brightness(1.15);
}

html[data-look="obwod"] input,
html[data-look="obwod"] textarea,
html[data-look="obwod"] select {
  border-radius: 0;
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 43, 214, 0.18);
}

* { box-sizing: border-box; }

html, body, body * { scrollbar-width: none; }
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Share Tech Mono", monospace;
}

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

.top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  position: sticky;
  top: var(--agent-hud-h, 0px);
  z-index: 18;
  padding: 0.35rem 1rem 0.2rem;
  max-width: 72rem;
  margin: 0 auto;
  background: var(--bg);
}

.look-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0 auto;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.look-switch select {
  width: auto;
  min-width: 11rem;
  min-height: 2.9rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.3;
}

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.35rem 0.8rem;
  border: 0;
  border-radius: 3px;
  background: var(--table);
  color: var(--table-ink);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.92rem;
}

.back:hover {
  background: var(--table);
  color: var(--table-ink);
  text-decoration: none;
}

.kicker {
  margin: 0 0 0.2rem;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--dim);
  font-size: 0.85rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--ink);
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

body.is-log .top,
body.is-log .layout {
  max-width: none;
}

body.is-log {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

body.is-log.is-guest {
  display: block;
  height: auto;
  overflow: auto;
}

body.is-log .top { flex: none; }

body.is-log .layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
  grid-template-columns: minmax(16.5rem, 18.5rem) minmax(0, 1fr) minmax(16.5rem, 19.5rem);
  gap: 0.75rem;
  padding: 0.35rem 0.85rem 0.55rem;
  max-width: none;
}

body.is-log main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.is-log .crumbs {
  position: static;
  flex: none;
  z-index: 4;
  margin: 0 0 0.25rem;
  padding: 0;
  background: var(--bg);
}

body.is-log #note { flex: none; }

body.is-log #view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

body.is-log .roster-side,
body.is-log .account {
  position: relative;
  top: auto;
  align-self: stretch;
  max-height: none;
  height: auto;
  overflow: auto;
  min-width: 0;
}

body.is-log #roster-list {
  min-height: 8rem;
}

body.is-log .roster-side {
  contain: layout;
}

body.is-log .account {
  display: block;
  overflow: auto;
}

body.is-log #table-side { overflow: visible; }

.roster-side {
  align-self: start;
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  padding: 0.15rem 0.2rem 0.85rem;
  border: 0;
  background: transparent;
}

.column-rest {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.9rem;
  width: 100%;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.column-rest:not(:has(> :not([hidden]))) { display: none; }

.column-rest > .mini-tile { align-self: flex-start; }

.roster-side[hidden] { display: none; }

.roster-side h2 {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  color: var(--table);
}

#roster-list h2 { margin-top: 0.85rem; }
#roster-list h2:first-child { margin-top: 0; }

.roster-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.roster-person {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  color: inherit;
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  min-height: 4.6rem;
  cursor: pointer;
}

.roster-person:hover,
.roster-person:focus-visible {
  filter: none;
  background: color-mix(in srgb, var(--table) 14%, transparent);
  color: inherit;
}

.roster-person[aria-expanded="true"] {
  background: color-mix(in srgb, var(--table) 16%, transparent);
}

.roster-person .post-portrait {
  width: 100%;
  height: 100%;
  min-height: 4.6rem;
  max-height: 5.4rem;
  border: 0;
  border-right: 1px solid var(--line);
}

.roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.roster-actions button {
  flex: 0 0 auto;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.roster-notes { margin-top: 0.45rem; }

.roster-notes[hidden] { display: none; }

.roster-notes .side-notes { margin-top: 0; }

.roster-notes textarea {
  width: 100%;
  min-height: 4.5rem;
}

#roster-list .roster-head {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  padding: 0.4rem 0.2rem;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

#roster-list .roster-head:hover,
#roster-list .roster-head:focus-visible {
  background: color-mix(in srgb, var(--table) 14%, transparent);
  color: var(--ink);
  filter: none;
}

#roster-list .roster-head[aria-expanded="true"] {
  background: color-mix(in srgb, var(--table) 16%, transparent);
  color: var(--ink);
}

.roster-drawer {
  margin: 0 0 0.45rem;
  padding: 0.1rem 0 0.35rem;
  border: 0;
  background: transparent;
}

.roster-drawer[hidden] { display: none; }

.roster-sheet {
  width: 100%;
  border-collapse: collapse;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.82rem;
}

.roster-sheet th,
.roster-sheet td {
  padding: 0.16rem 0.2rem;
  border-bottom: 1px solid rgba(0, 209, 255, 0.22);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.roster-sheet th {
  width: 62%;
  text-align: left;
  color: #9adfff;
}

.roster-sheet td {
  text-align: right;
  color: #00d1ff;
  font-weight: 700;
}

.roster-brief {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
}
.roster-brief h4 {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--dim);
}
.roster-brief p {
  margin: 0 0 0.16rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.roster-brief span { color: var(--dim); }

.roster-wait {
  margin: 0.15rem 0 0.35rem;
  color: #9adfff;
  font-size: 0.75rem;
}

.roster-full {
  width: 100%;
  margin-top: 0.45rem;
  font-size: 0.88rem;
}

.roster-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.roster-copy strong {
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.roster-copy small {
  color: var(--dim);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

#roster-list .face-card .post-portrait {
  width: 100%;
  height: 100%;
  min-height: 4.6rem;
  max-height: 5.4rem;
}

#roster-list .post-portrait span { font-size: 1.05rem; }

#roster-list .roster-person .card-head {
  display: none;
}

#roster-list .face-frame {
  padding: 0.45rem 0.55rem;
  gap: 0.2rem;
  justify-content: flex-start;
}

#roster-list .face-frame strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

#roster-list .face-frame p {
  font-size: 0.78rem;
  line-height: 1.3;
  -webkit-line-clamp: 3;
}

.roster-private-hint {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  color: var(--dim);
}

.kp-preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  padding: 0.4rem;
  background: rgba(27, 36, 32, 0.9);
  overflow: hidden;
}

.kp-preview[hidden] { display: none; }

.kp-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100vh - 0.8rem);
  min-height: 0;
  margin: 0;
  padding: 0.7rem 0.9rem 0.75rem;
  background: #1b2420;
  border: 2px solid #00d1ff;
  box-shadow: inset 0 0 0 1px rgba(0, 209, 255, 0.28);
  overflow: hidden;
}

.kp-card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(0, 209, 255, 0.35);
}

.kp-card-bar p {
  margin: 0;
  letter-spacing: 0.16em;
  color: #00d1ff;
  font-size: 1rem;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.card-account {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.card-status {
  flex: 0 0 auto;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--faint);
  font-size: 0.92rem;
}

.kp-card-bar .card-head {
  flex: 1;
  justify-content: flex-start;
  gap: 1.15rem;
  padding: 0;
  border: 0;
  letter-spacing: 0;
  color: #d7f6ff;
  font-size: 1.05rem;
}

.kp-card-bar .card-status {
  color: #00d1ff;
  font-size: 1rem;
}

.page-card-head {
  margin: 0 0 0.7rem;
}

.page-card-head .card-head {
  padding: 0 0 0.35rem;
  font-size: 1.35rem;
}

#kp-close {
  padding: 0.4rem 0.85rem;
  border-color: #00d1ff;
  color: #00d1ff;
  font-size: 0.9rem;
}

#kp-close:hover,
#kp-close:focus-visible {
  background: #00d1ff;
  color: #041018;
}

.esper-kp {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  color: #d7f6ff;
  font-family: "Share Tech Mono", ui-monospace, monospace;
}

.esper-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.esper-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border: 1px solid #00d1ff;
  color: #00d1ff;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.esper-badge i {
  width: 0.45rem;
  height: 0.45rem;
  background: #00d1ff;
  border-radius: 50%;
}

.esper-badge.is-npc { border-color: #ffce7a; color: #ffce7a; }
.esper-badge.is-npc i { background: #ffce7a; }

.esper-date {
  margin: 0;
  color: rgba(0, 209, 255, 0.7);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.esper-brand {
  margin: 0 0 0.55rem;
  color: #00d1ff;
  letter-spacing: 0.18em;
  font-size: 1.05rem;
}

.esper-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.esper-meta div { min-width: 0; }

.esper-meta span,
.esper-kicker {
  display: block;
  margin: 0 0 0.15rem;
  color: rgba(215, 246, 255, 0.62);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.esper-meta b,
.esper-line b,
.esper-vitals b {
  color: #00d1ff;
  font-weight: 400;
  font-size: 1.08rem;
}

.sheet-state {
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
}

.esper-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.1rem;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.esper-cols > section {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0 0.15rem 0 1rem;
  border-left: 1px solid rgba(0, 209, 255, 0.35);
}

.esper-cols > section:first-child {
  padding-left: 0;
  border-left: 0;
}

.esper-col-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.esper-h {
  margin: 0.85rem 0 0.4rem;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid rgba(0, 209, 255, 0.5);
  color: #00d1ff;
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.esper-cols section > .esper-h:first-child,
.esper-col-body > .esper-h:first-child { margin-top: 0; }

.esper-line {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.05rem;
}

.esper-line span { color: rgba(215, 246, 255, 0.72); }
.esper-line b { text-align: right; }

.esper-edit input,
.esper-edit textarea,
.esper-edit select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.12rem 0.28rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 209, 255, 0.45);
  border-radius: 0;
  background: transparent;
  color: #d7f6ff;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-align: right;
  text-transform: none;
}

.esper-edit textarea {
  min-height: 4.5rem;
  text-align: left;
  resize: vertical;
  font-family: Inter, "Segoe UI", sans-serif;
}

.esper-edit label.esper-line {
  margin: 0;
  color: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.esper-edit .esper-line input,
.esper-edit .esper-line select {
  width: auto;
  flex: 1 1 8rem;
  min-width: 0;
}

.esper-edit .esper-vitals b {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
}

.esper-edit .esper-vitals input {
  width: 2.5rem;
  flex: none;
  text-align: center;
}

.esper-edit .color-pick {
  margin: 0.45rem 0 0.2rem;
  border: 0;
  padding: 0;
}

.esper-edit .color-pick legend {
  margin-bottom: 0.35rem;
  color: rgba(215, 246, 255, 0.72);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
}

#kp-save {
  padding: 0.4rem 0.85rem;
  border-color: #ff2a6d;
  color: #ffd0dc;
  font-size: 0.9rem;
}

#kp-save:hover,
#kp-save:focus-visible {
  background: #ff2a6d;
  color: #1a050b;
}

.my-kp { margin: 0.8rem 0 0.2rem; }
.my-kp h2 { margin-bottom: 0.35rem; }
.my-kp-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0.28rem 0;
  color: var(--ink);
  text-decoration: none;
}
.my-kp-row span { white-space: nowrap; }
.my-kp-row i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  flex: none;
}
.my-kp-row em,
.my-kp-row small {
  color: var(--dim);
  font-style: normal;
  font-size: 0.78rem;
}

.kp-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
  gap: 0.85rem;
  margin: 0.8rem 0 1rem;
}

.kp-tile {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  min-height: 12.5rem;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  overflow: hidden;
}

.kp-tile .post-portrait {
  width: 100%;
  height: 100%;
  min-height: 12.5rem;
  margin: 0;
  border: 0;
  border-right: 1px solid var(--line);
}

.kp-tile strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.kp-tile p,
.kp-tile small {
  margin: 0;
  color: var(--dim);
  font-size: 0.75rem;
  line-height: 1.3;
}

.kp-tile p span {
  display: block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.65rem;
}

.kp-board-slots {
  grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
}

.kp-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12.5rem;
  border-style: dashed;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  text-align: center;
}

.kp-slot-empty strong {
  color: var(--dim);
}

.kp-looks {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.face-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
}

.face-frame strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.face-frame p {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.own-notes {
  margin: 0.85rem 0 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.own-notes h2 { margin-bottom: 0.25rem; }

.own-notes-box textarea {
  width: 100%;
  min-height: 9.5rem;
  resize: vertical;
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1.45;
}

.panel-ideas {
  margin: 0 0 1rem;
  padding: 0.65rem 0.7rem;
  border: 1px dashed var(--line);
  border-radius: 3px;
}

.panel-ideas h2 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
}

.panel-ideas-list {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

.panel-ideas-list li { margin: 0.15rem 0; }

.track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.track-meta button,
.track-chip {
  margin: 0;
  padding: 0.12rem 0.4rem;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  border-radius: 2px;
  cursor: pointer;
}

.track-chip.is-on,
.track-meta button.is-on {
  border-color: var(--table);
  background: color-mix(in srgb, var(--table) 22%, transparent);
}

.track-card-body {
  display: grid;
  gap: 0.2rem;
}

.track .track-line {
  margin: 0;
  font-size: 0.78rem;
  color: var(--dim);
}

.track .track-deadline {
  color: var(--ink);
  font-weight: 600;
}

.scene-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
  margin: 0 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--field);
}

.scene-head {
  margin: 0 0 0.95rem;
}

.scene-head .scene-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.2;
}

.scene-blurb {
  margin: 0.45rem 0 0;
  max-width: 48rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}

body.is-log .forum-board .session-card {
  padding: 1.15rem 1.25rem 1.3rem;
}

body.is-log .forum-board .list {
  display: grid;
  gap: 0.65rem;
}

body:not(.is-log) .forum-board .session-card {
  padding: 1.2rem 1.35rem 1.35rem;
}

body:not(.is-log) .forum-board .session-card h2 {
  font-size: 1.45rem;
}

body:not(.is-log) main {
  min-width: 0;
}

body:not(.is-log) .layout {
  max-width: 88rem;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem);
}

.face-frame small {
  color: var(--dim);
  font-size: 0.78rem;
}

.esper-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.kp-own {
  position: relative;
  display: grid;
}

button.kp-drop {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  z-index: 2;
  min-height: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}

.esper-face {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.esper-face .post-portrait,
.esper-face .sheet-avatar,
.esper-face .sheet-avatar.is-empty {
  width: 100%;
  height: auto;
  flex: 1;
  min-height: 22rem;
  margin: 0;
  object-fit: cover;
}

.esper-data {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.esper-file input { width: auto; }

.profile-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  margin: 0 0 1rem;
}

.profile-head .post-portrait {
  width: 72px;
  height: 120px;
}

.profile-head h2 { margin: 0; }

.hp-bar {
  display: block;
  height: 0.38rem;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  overflow: hidden;
}

.hp-bar i {
  display: block;
  height: 100%;
  background: #c44536;
}

.stock-box { margin: 0.6rem 0; }

.stock-grid {
  display: grid;
  grid-template-columns: repeat(5, 2.5rem);
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.stock-pick {
  width: 2.5rem;
  height: 4.2rem;
  padding: 0;
  border: 1px solid var(--line);
  background-color: #111;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.stock-pick.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 1px #fff;
}

.mini-play {
  margin: 0.4rem 0 0.8rem;
  padding: 0.7rem 0.8rem 0.85rem;
  border: 1px solid rgba(0, 209, 255, 0.35);
  background: rgba(0, 20, 16, 0.35);
}
.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.mini-head h3 { margin: 0; letter-spacing: 0.08em; }
.race-track, .pole-grid { display: flex; flex-wrap: wrap; gap: 0.28rem; margin: 0.55rem 0; }
.race-cell, .pole-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 2.8rem;
  min-height: 3.3rem;
  padding: 0.15rem;
  border: 1px solid rgba(0, 209, 255, 0.45);
  background: #03140f;
  color: #d7f6ff;
  font-size: 0.8rem;
}
.pole-grid { display: grid; grid-template-columns: repeat(4, 4.4rem); }
.pole-cell { width: 4.4rem; height: 4.4rem; min-height: 0; }
.mini-window.is-small .race-cell { width: 1.7rem; min-height: 2.2rem; font-size: 0.68rem; }
.mini-window.is-small .pole-grid { grid-template-columns: repeat(4, 2.3rem); }
.mini-window.is-small .pole-cell { width: 2.3rem; height: 2.3rem; }
.race-cell i, .score-dot {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.12rem;
  border-radius: 50%;
}
.mini-score { margin: 0.35rem 0; padding: 0; list-style: none; }
.mini-score li { display: flex; gap: 0.4rem; align-items: center; margin: 0.15rem 0; }
.mini-log { margin: 0.35rem 0 0; color: var(--dim); font-size: 0.82rem; }

.esper-line-3 {
  display: grid;
  grid-template-columns: 1.4fr 0.5fr 0.9fr;
  gap: 0.35rem;
}

.esper-line-3 b,
.esper-line-3 span:last-child { text-align: right; }

.esper-line.head span,
.esper-line.head b {
  color: #00d1ff;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.esper-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.8rem;
}

.esper-vitals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.25rem 0 0.35rem;
  text-align: center;
}

.esper-vitals span { font-size: 0.82rem; color: rgba(215, 246, 255, 0.62); }
.esper-vitals b {
  display: block;
  margin-top: 0.2rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 1.45rem;
}
.esper-vitals i { color: #00d1ff; font-style: normal; }

.esper-kicker { margin-top: 0.45rem; }

.esper-lore {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.4rem;
  gap: 0.8rem;
  align-items: start;
}

.esper-lore p,
.esper-note {
  margin: 0.2rem 0 0.45rem;
  min-height: 3rem;
  color: #00d1ff;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.12rem;
  line-height: 1.45;
}

.esper-lore .post-portrait {
  width: 6.4rem;
  height: 8rem;
}

.esper-mod {
  flex: none;
  margin-top: 0.35rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(0, 209, 255, 0.5);
}

body.is-log .editor-sheet { min-height: 22rem; }
body.is-log .post-body { font-size: 1.12rem; }

main { min-width: 0; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  min-height: 1.4rem;
  margin: 0 0 0.65rem;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0;
}

.note {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.worlds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.lore-drawer + .lore-drawer { margin-top: 0.85rem; }

.lore-drawer,
.lore-sub,
.lore-part {
  border-bottom: 1px solid var(--line);
  margin: 0 0 0.35rem;
}

.lore-drawer > summary,
.lore-sub > summary,
.lore-part > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  padding: 0.55rem 0;
  font-family: var(--sans);
  color: var(--ink);
}

.lore-drawer > summary::-webkit-details-marker,
.lore-sub > summary::-webkit-details-marker,
.lore-part > summary::-webkit-details-marker { display: none; }

.lore-drawer > summary::before,
.lore-sub > summary::before,
.lore-part > summary::before {
  content: "▸";
  color: var(--dim);
  font-size: 0.85rem;
}

.lore-drawer[open] > summary::before,
.lore-sub[open] > summary::before,
.lore-part[open] > summary::before { content: "▾"; }

.lore-dot {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  align-self: center;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink) 28%, transparent);
}

.is-blue > summary > .lore-dot { background: #3d7eb8; }
.is-red > summary > .lore-dot { background: #c44536; }
.is-green > summary > .lore-dot { background: #3d8f5a; }

.lore-drawer > summary span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--dim);
}

.lore-drawer > summary strong {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.lore-sub { margin-left: 0.15rem; }

.lore-sub > summary { font-weight: 700; font-size: 0.95rem; }

.lore-part { margin-left: 0.85rem; }

.lore-part > summary { font-weight: 650; font-size: 0.9rem; }

.lore-drawer-body,
.lore-sub > div,
.lore-part > div {
  max-width: 42rem;
  padding-bottom: 0.35rem;
}

.home-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.1rem;
  min-height: 12rem;
  padding: 1.6rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--bg) 72%, transparent) 18%, color-mix(in srgb, var(--card) 55%, transparent) 70%),
    url("assets/earth-night.jpg") center / cover no-repeat;
  color: var(--ink);
}

/* Panel gracza na home — wieści / śledztwa (nad kafelkami światów) */
.player-brief {
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
}

.brief-visual {
  position: relative;
  min-height: 9.5rem;
  max-height: 14rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #12160f;
}

.brief-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 9.5rem;
  max-height: 14rem;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}

.brief-stamp {
  position: absolute;
  left: 0.85rem;
  bottom: 0.7rem;
  padding: 0.2rem 0.45rem;
  background: color-mix(in srgb, #0c100c 72%, transparent);
  color: #d7e0c8;
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
}

.brief-block {
  padding: 1rem 1.05rem 1.1rem;
}

.brief-tactical {
  border-right: 1px solid var(--line);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--ink) 5%, transparent), transparent 58%);
}

.brief-head { margin: 0 0 0.55rem; }

.brief-kicker {
  margin: 0 0 0.3rem;
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.brief-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.brief-tag {
  margin: 0 0 0.55rem;
  color: var(--table);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brief-block > p {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 40rem;
}

.brief-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0 0 0.85rem !important;
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--dim);
}

.brief-meters strong {
  color: var(--ink);
  font-weight: 700;
}

.brief-wiki {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brief-wiki:hover,
.brief-wiki:focus-visible {
  border-color: var(--table);
  color: var(--table);
}

.brief-case-list {
  display: grid;
  gap: 0.55rem;
}

.brief-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 55%, var(--card));
}

.brief-case-main {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brief-case-main strong {
  display: block;
  font-size: 1rem;
  line-height: 1.25;
}

.brief-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0;
  margin: 0.25rem 0 0;
  color: var(--dim);
  font-size: 0.78rem;
}

.brief-case-meta > * + *::before {
  content: "·";
  margin: 0 0.4rem;
  color: var(--line);
}

.brief-case-flag {
  display: inline-block;
  margin-top: 0.25rem;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--danger);
}

.brief-empty {
  margin: 0;
  color: var(--dim);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lore-home {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.8fr);
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.lore-board {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1rem 1.05rem 1.1rem;
}

.lore-note {
  margin: 0 0 0.75rem;
  color: var(--dim);
  font-size: 0.88rem;
  line-height: 1.4;
}

.lore-table-head,
.lore-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.38fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.lore-table-head {
  padding: 0 0 0.35rem;
  color: var(--dim);
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lore-row {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.lore-row h3,
.lore-once h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.lore-row p,
.lore-once > p {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.lore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.lore-once .lore-note { margin-top: 0.65rem; }

@media (max-width: 860px) {
  .lore-home { grid-template-columns: 1fr; }
  .lore-table-head, .lore-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .brief-grid { grid-template-columns: 1fr; }
  .brief-tactical { border-right: 0; border-bottom: 1px solid var(--line); }
  .brief-visual,
  .brief-visual img { min-height: 7.5rem; max-height: 10rem; }
  .brief-case {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .brief-case .brief-wiki { justify-self: start; }
}

.home-hero-copy {
  position: relative;
  max-width: 34rem;
}

.home-hero-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.home-hero h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  line-height: 1.15;
}

.home-hero p {
  margin: 0;
  max-width: 32rem;
  color: var(--dim);
  font-size: 1.02rem;
  line-height: 1.45;
}

.triad {
  position: relative;
  max-width: 44rem;
  height: 22rem;
  margin: 0.2rem auto 0.4rem;
}

.triad svg {
  position: absolute;
  left: 7.2rem;
  right: 7.2rem;
  top: 0.55rem;
  bottom: 2.5rem;
  width: auto;
  height: auto;
  overflow: visible;
}

.triad polygon {
  fill: color-mix(in srgb, var(--table) 10%, transparent);
  stroke: var(--table);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.triad-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--sans);
  z-index: 1;
}

.triad-node i {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background: var(--table);
  box-shadow: 0 0 0 0.28rem color-mix(in srgb, var(--table) 28%, transparent);
  flex: 0 0 auto;
}

.triad-node strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
}

.triad-node small {
  display: block;
  color: var(--dim);
  font-size: 0.72rem;
}

.triad-node.is-left {
  left: 7.2rem;
  top: 0.55rem;
  transform: translate(-100%, -50%);
  flex-direction: row-reverse;
  text-align: right;
}

.triad-node.is-right {
  right: 7.2rem;
  top: 0.55rem;
  transform: translate(100%, -50%);
}

.triad-node.is-apex {
  left: 50%;
  bottom: 2.5rem;
  transform: translate(-50%, 35%);
  flex-direction: column;
  text-align: center;
}

@media (max-width: 720px) {
  .triad {
    height: 18rem;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
  }

  .triad svg,
  .triad-node.is-left { left: 5.4rem; }

  .triad svg { right: 5.4rem; }

  .triad-node.is-right { right: 5.4rem; }

  .triad-node strong { font-size: 0.86rem; }
}

.triad-node:hover strong { color: var(--table); }

.sea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 1.4fr) minmax(0, 1fr);
  grid-template-areas:
    ". north ."
    "west core east"
    ". south .";
  gap: 0.85rem;
  align-items: stretch;
  margin: 0 0 1.2rem;
}

.sea-north { grid-area: north; }
.sea-west { grid-area: west; }
.sea-core { grid-area: core; }
.sea-east { grid-area: east; }
.sea-south { grid-area: south; }

.sea-more {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.lore-aside {
  margin: 1.1rem 0 0.4rem;
  padding: 0.85rem 0 0.2rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}

.lore-aside h3 {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.lore-aside p { margin: 0 0 0.55rem; font-size: 0.92rem; }

.sea .world { height: 100%; box-sizing: border-box; }

@media (max-width: 800px) {
  .sea {
    grid-template-columns: 1fr;
    grid-template-areas:
      "core"
      "south"
      "north"
      "west"
      "east";
  }
}

.list { display: flex; flex-direction: column; gap: 0.75rem; }

.world {
  min-height: 10.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
}

.help-link {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.tutorial { display: flex; flex-direction: column; gap: 0.85rem; max-width: 40rem; }
.tutorial section { border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.tutorial h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.mini-solo { margin: 0.45rem 0 0; font-size: 0.78rem; opacity: 0.8; }

.flag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.9rem;
  margin: 0.2rem 0 0.8rem;
}

.flag-grid label {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.92rem;
}

.world, .row, .post, .composer {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.world, .row {
  display: block;
  padding: 1rem 1.05rem 1.05rem;
  color: inherit;
}

.worlds .world,
.sea .world {
  min-height: 10.5rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
}

.sea .world.is-core {
  min-height: 14rem;
  border-color: var(--table);
}

.world:hover, .row:hover {
  background: color-mix(in srgb, var(--table) 10%, transparent);
  text-decoration: none;
}

.world h2, .row h2, .thread-head h2, .composer h2 {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 1.2rem;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ink);
}

.meta, .blurb, .account-lead, .account-status {
  color: var(--dim);
  font-family: var(--sans);
  line-height: 1.5;
}

.blurb { margin: 0.35rem 0 0; }

.world-lore {
  margin: 0 0 1.1rem;
  max-width: 42rem;
}
.world-lore .blurb { margin: 0 0 0.8rem; }
.lore-title {
  margin: 1rem 0 0.45rem;
  text-align: left;
  font-family: var(--sans);
  letter-spacing: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.scene-title {
  margin: 0 0 0.2rem;
  text-align: left;
  font-family: var(--sans);
  letter-spacing: 0;
  text-transform: none;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
}

.scene-sub,
.scene-head .meta {
  margin: 0;
  text-align: left;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.table-side { width: 100%; margin: 0; }

.play-panel > button,
.gm-panel > button,
.table-side > button { width: 100%; }
.table-side[hidden] { display: none; }

.mini-tile {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: auto;
  margin: 0;
  padding: 0.5rem 0.9rem;
  border: 0;
  background: var(--table);
  color: var(--table-ink);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.95rem;
}
.mini-tile[hidden] { display: none; }
.mini-pawn { width: 1.35rem; height: 1.35rem; display: block; }
.mini-window-bar .mini-pawn {
  width: 0.95rem;
  height: 0.95rem;
  display: inline-block;
  vertical-align: -0.12rem;
  margin-right: 0.25rem;
}

.mini-window {
  position: fixed;
  z-index: 36;
  width: min(28rem, calc(100vw - 1rem));
  max-height: min(72vh, 36rem);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.mini-window[hidden] { display: none; }
.mini-window.is-play {
  width: min(58rem, calc(100vw - 1rem));
  max-height: min(92vh, 52rem);
}
.mini-window.is-play.is-small {
  width: min(26rem, calc(100vw - 1rem));
  max-height: min(72vh, 34rem);
}
.mini-play-body {
  overflow: auto;
  padding: 0.55rem 0.7rem 0.85rem;
}
.mini-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  cursor: grab;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  user-select: none;
  touch-action: none;
}
.mini-window-bar strong { flex: 1; min-width: 0; font-weight: 700; }
.mini-window-bar button { width: auto; flex: none; min-height: 0; padding: 0.2rem 0.5rem; font-size: 0.82rem; }
#mini-body { overflow: auto; padding: 0.55rem 0.65rem 0.75rem; }
.mini-who { margin: 0.2rem 0 0.55rem; }
.mini-live { margin: 0 0 0.75rem; padding-bottom: 0.65rem; border-bottom: 1px solid var(--line); }
.mini-live h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.mini-live p { margin: 0.15rem 0; }
.mini-live-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.mini-kinds { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mini-kinds button { font-size: 0.9rem; padding: 0.45rem 0.7rem; }
.krzyzyk-grid {
  display: grid;
  grid-template-columns: repeat(3, 6.4rem);
  gap: 0.35rem;
  margin: 0.55rem 0;
}
.krzyzyk-cell {
  width: 6.4rem;
  height: 6.4rem;
  padding: 0;
  font-size: 2.8rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}
.mini-window.is-small .krzyzyk-grid { grid-template-columns: repeat(3, 3.1rem); }
.mini-window.is-small .krzyzyk-cell { width: 3.1rem; height: 3.1rem; font-size: 1.35rem; }
.ludo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  margin: 0.35rem 0;
}
.ludo-pawn {
  min-width: 3.4rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
}
.ludo-pawn:disabled { opacity: 0.55; }

.ludo-map {
  --ludo: 2rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(11, var(--ludo));
  gap: 2px;
  width: max-content;
  margin: 0.35rem 0 0.6rem;
}
.mini-window.is-small .ludo-map { --ludo: 1.15rem; }
.ludo-sq {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--ludo);
  height: var(--ludo);
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
}
.ludo-sq.is-path { border-color: var(--line); background: var(--field); }
.ludo-sq.is-start { box-shadow: inset 0 0 0 2px var(--pawn, var(--table)); }
.ludo-sq.is-home { border-color: var(--line); background: color-mix(in srgb, var(--pawn, #888) 46%, var(--field)); }
.ludo-sq.is-base { border-color: var(--line); background: color-mix(in srgb, var(--pawn, #888) 24%, transparent); }
.ludo-token {
  width: 72%;
  height: 72%;
  margin: 0;
  padding: 0;
  border: 2px solid #111;
  border-radius: 50%;
  min-height: 0;
}
.ludo-die {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}
.mini-window.is-small .ludo-die { width: 1.8rem; height: 1.8rem; font-size: 1rem; }

.mini-table {
  margin: 0 0 0.55rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--table) 9%, var(--card));
}
.mini-table-label {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.mini-seats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mini-seat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 0.4rem;
  align-items: center;
  min-width: 8.5rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid var(--line);
  background: var(--card);
}
.mini-seat.is-turn { border: 2px solid #e10600; box-shadow: inset 0 0 0 1px #e10600; }
.mini-seat.is-out { opacity: 0.45; }
.mini-seat .post-portrait { width: 2.3rem; height: 3.1rem; grid-row: 1 / span 2; }
.mini-seat strong,
.mini-seat em,
.mini-seat span { display: block; }
.mini-seat em { font-style: normal; font-weight: 700; }
.mini-seat span { font-size: 0.75rem; color: var(--dim); }
.mini-win {
  margin: 0.15rem 0 0.45rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--table);
  font-weight: 700;
}
.mini-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.45rem 0 0.2rem; }
.mini-actions button { width: auto; }

.pamiec-grid {
  display: grid;
  grid-template-columns: repeat(4, 4.2rem);
  gap: 0.35rem;
  margin: 0.55rem 0;
}

.pamiec-card {
  width: 4.2rem;
  height: 4.2rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.35rem;
}
.mini-window.is-small .pamiec-grid { grid-template-columns: repeat(4, 2.3rem); }
.mini-window.is-small .pamiec-card { width: 2.3rem; height: 2.3rem; font-size: 1rem; }

.czworki-drops {
  display: grid;
  grid-template-columns: repeat(7, 2.7rem);
  gap: 0.28rem;
}

.czworki-drops button {
  padding: 0.2rem 0;
  min-height: 0;
}

.czworki-grid {
  display: grid;
  grid-template-columns: repeat(7, 2.7rem);
  gap: 0.28rem;
  margin: 0.35rem 0 0.55rem;
}

.czworki-cell {
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(22, 22, 22, 0.28);
}
.mini-window.is-small .czworki-drops,
.mini-window.is-small .czworki-grid { grid-template-columns: repeat(7, 1.5rem); }
.mini-window.is-small .czworki-cell { width: 1.5rem; height: 1.5rem; }

.mini-who.is-steady { min-height: 2.6rem; }

.statki-rule {
  min-height: 2.6rem;
  margin: 0.15rem 0 0.35rem;
}

.statki-stage {
  display: grid;
  grid-template-columns: max-content minmax(8.5rem, 12rem);
  gap: 0.75rem 1rem;
  align-items: start;
}

.statki-pair {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 0.75rem 1.1rem;
  align-items: start;
}

.statki-sheet {
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
}

.statki-sheet h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.statki-sheet .meta {
  max-width: 22rem;
  min-height: 2.4rem;
  margin: 0 0 0.25rem;
}

.statki-axis {
  --ship: 2rem;
  display: grid;
  grid-template-columns: 1.35rem auto;
  grid-template-rows: 1.15rem auto;
  gap: 2px;
  width: max-content;
}

.mini-window.is-small .statki-axis { --ship: 1.12rem; }

.statki-letters,
.statki-numbers {
  display: grid;
  color: var(--dim);
  font-size: 0.72rem;
  text-align: center;
  align-items: center;
}

.statki-letters {
  grid-column: 2;
  grid-template-columns: repeat(var(--n, 10), var(--ship));
}

.statki-numbers {
  grid-row: 2;
  grid-template-rows: repeat(var(--n, 10), var(--ship));
}

.statki-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(var(--n, 10), var(--ship));
  gap: 2px;
  margin: 0;
}

.statki-cell {
  width: var(--ship, 2rem);
  height: var(--ship, 2rem);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1;
}

.statki-cell.is-ship { background: #4d7ea8; }
.statki-cell.is-hit { background: #c44848; color: #fff; }
.statki-cell.is-sunk { background: #6b3030; color: #fff; }
.statki-cell.is-miss { color: var(--dim); }

.statki-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-height: 2.5rem;
  margin: 0 0 0.35rem;
}

.statki-tools button { width: auto; }

.statki-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: flex-start;
}

.statki-dock.is-vertical .statki-piece { flex-direction: column; }

.statki-piece {
  display: inline-flex;
  gap: 2px;
  width: auto;
  min-height: 0;
  padding: 0.18rem;
  border: 1px solid var(--line);
  background: var(--field);
  touch-action: none;
  cursor: grab;
}

.statki-piece.is-picked { outline: 2px solid #e10600; outline-offset: 1px; }

.statki-piece i,
.statki-ghost i {
  display: block;
  width: 0.78rem;
  height: 0.78rem;
  background: #4d7ea8;
}

.statki-ghost {
  position: fixed;
  z-index: 80;
  display: inline-flex;
  gap: 2px;
  padding: 0.18rem;
  border: 1px solid var(--line);
  background: var(--field);
  pointer-events: none;
}

.statki-ghost.is-vertical { flex-direction: column; }

.statki-salvos {
  max-height: 22rem;
  overflow: auto;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.78rem;
}

.statki-salvos h3 { margin: 0 0 0.3rem; font-size: 0.92rem; }
.statki-salvos ul { list-style: none; margin: 0; padding: 0; }
.statki-salvos li { margin: 0.12rem 0; }

.warcaby-frame { --cell: 2.85rem; }
.mini-window.is-small .warcaby-frame { --cell: 1.4rem; }

.warcaby-files,
.warcaby-ranks {
  display: grid;
  color: var(--dim);
  font-size: 0.72rem;
  text-align: center;
  align-items: center;
}

.warcaby-files { grid-template-columns: 1.15rem repeat(8, var(--cell)); }
.warcaby-body { display: grid; grid-template-columns: 1.15rem auto; }
.warcaby-ranks { grid-template-rows: repeat(8, var(--cell)); }

.warcaby-grid {
  display: grid;
  grid-template-columns: repeat(8, var(--cell, 2.85rem));
  gap: 0;
  margin: 0;
  width: auto;
}

.warcaby-cell {
  position: relative;
  width: var(--cell, 2.85rem);
  height: var(--cell, 2.85rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #6b5344;
  color: #161616;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.warcaby-name {
  position: absolute;
  left: 0.12rem;
  top: 0.02rem;
  font-size: 0.58rem;
  font-weight: 400;
  opacity: 0.72;
  pointer-events: none;
}

.mini-window.is-small .warcaby-name { display: none; }

.warcaby-taken {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  margin: 0.35rem 0 0;
}

.warcaby-taken .warcaby-piece {
  position: static;
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.warcaby-cell.is-light { background: #d7c4a3; }
.warcaby-cell.is-selected { outline: 2px solid var(--table); outline-offset: -2px; }
.warcaby-cell.is-aim { box-shadow: inset 0 0 0 3px #f4f1ea; }

.warcaby-cell .warcaby-piece {
  position: absolute;
  left: 15%;
  top: 18%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70%;
  height: 70%;
  margin: 0;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}

.warcaby-piece.is-king { box-shadow: inset 0 0 0 2px #f7f4ee; }

.miasta-letter {
  margin: 0.15rem 0;
  font-size: 5.2rem;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.04em;
}
.mini-window.is-small .miasta-letter { font-size: 2.4rem; }

.miasta-form label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0.28rem 0;
}

.miasta-form label input { flex: 1; min-width: 0; }

.miasta-table {
  width: 100%;
  margin: 0.2rem 0 0.6rem;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.miasta-table th,
.miasta-table td {
  padding: 0.15rem 0.2rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.play-panel,
.table-side .gm-panel,
.table-side .composer,
.gm-panel .composer {
  margin: 0;
  padding: 0.15rem 0 0.35rem;
  border: 0;
  background: transparent;
}

.play-panel h2,
.table-side h2,
.table-side h3,
.gm-panel h2,
.gm-panel h3 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--sans);
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 700;
  font-size: 1rem;
  color: var(--table);
}

.table-side .trait-grid { grid-template-columns: 1fr; }

.side-notes { margin-top: 0.85rem; }

.side-notes textarea {
  min-height: 9rem;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  line-height: 1.45;
}

.table-side button { margin-top: 0.55rem; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.8rem 0;
}

.pager span { color: var(--dim); }

.join-gate {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(27, 36, 32, 0.82);
}

.join-gate[hidden] { display: none; }

.join-card {
  width: min(36rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.3rem 1.2rem 1.4rem;
  border: 0;
  background: var(--card);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.35);
}

.join-card h2 {
  margin: 0 0 0.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--table);
}

.join-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.join-actions button { width: 100%; }

.gm-panel {
  margin: 0;
  padding: 0.15rem 0 0.35rem;
  border: 0;
  background: transparent;
}

.gm-panel h2,
.gm-panel h3 {
  margin: 0.35rem 0 0.4rem;
  font-family: var(--sans);
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 700;
  font-size: 1rem;
  color: var(--table);
}

.journal {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
}

.access-pick {
  border: 0;
  margin: 0.2rem 0 0.8rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.access-pick legend {
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.access-pick label {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.invites {
  margin-top: 1rem;
}

.invites h2 {
  margin: 0 0 0.35rem;
}

.invite-list,
.invite-desk {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite,
.invite-desk li {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--table);
}

.invite span,
.invite-desk span {
  font-size: 0.82rem;
}

.invite-actions,
.invite-desk li {
  align-items: center;
}

.invite-desk li {
  grid-template-columns: 1fr auto;
}

.tracker {
  margin-top: 1rem;
}

.tracker h2 {
  margin: 0 0 0.35rem;
}

.tracker-watch-title {
  margin-top: 1.15rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.tracker-watch .track {
  border-left-color: #c9a227;
}

.track-date {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tracker-flag {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
}

.tracker-list {
  display: grid;
  gap: 0.65rem;
  max-height: 32rem;
  overflow: auto;
}

.track {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line);
  border-left-width: 3px;
  text-decoration: none;
  color: inherit;
}

.track strong,
.track span,
.track em,
.track p {
  margin: 0;
}

.track span,
.track p {
  font-size: 0.82rem;
}

.track em {
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.track.is-due {
  border-left-color: #e10600;
}

.track.is-done {
  border-left-color: #2f6f4e;
}

.track.is-quiet {
  border-left-color: var(--line);
}

.track-banner {
  margin: 0.8rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
}

.track-banner p {
  margin: 0;
}

.turn-toggle {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.55rem;
  width: fit-content;
  font-weight: 600;
}

.turn-toggle input {
  width: auto;
  padding: 0;
  margin: 0;
}

.track-banner button {
  width: fit-content;
  margin-top: 0.35rem;
}

.journal li {
  margin: 0 0 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.journal p { margin: 0.15rem 0; }

.gm-progress h3 {
  font-family: Inter, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

button.danger-btn {
  color: var(--danger);
  border: 1px solid var(--danger);
  background: transparent;
}

button.danger-btn:hover,
button.danger-btn:focus-visible {
  background: var(--danger);
  color: var(--bg);
}

.session-brief {
  margin: 0 0 0.85rem;
  max-width: 40rem;
  text-align: left;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
}

.scene-row h2 {
  font-family: Inter, "Segoe UI", sans-serif;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ink);
}

.cast {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.cast li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.92rem;
}

.cast .post-portrait {
  width: 2.4rem;
  height: 2.8rem;
}

.cast .post-portrait span { font-size: 0.95rem; }

.log { display: flex; flex-direction: column; gap: 0.75rem; }

.post {
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr);
  gap: 0.65rem 0.8rem;
  align-items: start;
  padding: 0.65rem 0.8rem 0.7rem;
  margin: 0;
  height: fit-content;
}

.post-portrait {
  position: relative;
  width: 6.4rem;
  height: 8.4rem;
  background: #0c1611;
  border: 1px solid var(--line);
  overflow: hidden;
}

.post-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-portrait span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.8rem;
  color: var(--table);
}

.post-copy { min-width: 0; }

.post-copy header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.8rem;
  margin-bottom: 0.45rem;
}

.post-copy h3 {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

.post-copy time {
  color: var(--dim);
  font-size: 0.75rem;
}

.post-actions {
  margin-left: auto;
  display: flex;
  gap: 0.35rem;
}

.post-edit-open,
.post-drop,
.post-edit-cancel {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
}

.post-edited {
  color: var(--dim);
  font-size: 0.72rem;
}

.post-history {
  margin-top: 0.55rem;
}

.post-history summary {
  color: var(--dim);
  cursor: pointer;
  font-size: 0.75rem;
}

.post-before {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.post-edit .editor-sheet {
  height: auto;
  min-height: 8rem;
  max-height: 18rem;
}

.post-edit .editor-size,
.post-edit .editor-grip,
.post-edit .help-toggle,
.post-edit .editor-help {
  display: none;
}

.post-edit-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.post-body {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 4;
  color: #9aa4ad;
}
.post-body.is-rich { white-space: normal; }
.post-body b, .post-body strong,
.editor-sheet b, .editor-sheet strong { font-weight: 700; }
.post-body i, .post-body em,
.editor-sheet i, .editor-sheet em { font-style: italic; }
.post-body u, .editor-sheet u { text-decoration: underline; }
.post-body s, .editor-sheet s { text-decoration: line-through; }
.post-body h3, .editor-sheet h3 {
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.4rem;
  line-height: 1.35;
  margin: 0.7rem 0 0.3rem;
  font-weight: 700;
}
.post-body blockquote, .editor-sheet blockquote {
  margin: 0.7rem 0;
  padding: 0.15rem 0 0.15rem 0.95rem;
  border-left: 3px solid var(--table);
}
.post-body ul, .post-body ol,
.editor-sheet ul, .editor-sheet ol {
  margin: 0.45rem 0 0.45rem 1.3rem;
  padding: 0;
}
.post-body a, .editor-sheet a { color: inherit; text-decoration: underline; }

.editor-hint {
  margin: 0 0 0.75rem;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.5;
}

.editor {
  margin-top: 0.35rem;
}

.editor-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.28rem 0.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom: 0;
}

.editor-tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.16rem;
  padding: 0;
  background: transparent;
  border: 0;
  flex: 0 0 auto;
}

.editor-tools .tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  min-height: 0;
  height: 1.7rem;
  padding: 0 0.28rem;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
  line-height: 1;
}

.editor-tools .tool:hover,
.editor-tools .tool:focus-visible {
  background: var(--table);
  color: var(--table-ink);
}

.editor-tools .tool.is-on {
  border-color: #ff2a6d;
  box-shadow: 0 0 0 1px #ff2a6d;
  color: #fff;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.9rem;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  line-height: 1;
}
.mark-b { font-weight: 800; }
.mark-i { font-style: italic; }
.mark-u { text-decoration: underline; }
.mark-s { text-decoration: line-through; }

.editor-bar .swatches {
  flex-wrap: nowrap;
  gap: 0.22rem;
  margin: 0 0 0 0.15rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--line);
}

.editor-help {
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: #101820;
  border: 1px solid rgba(0, 209, 255, 0.35);
  border-bottom: 0;
  color: #d7e7df;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
}

.editor-help[hidden] { display: none; }
.editor-help p { margin: 0.2rem 0; }
.editor-help b { color: #fff; }

.editor-tools .help-toggle {
  min-width: 1.7rem;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 700;
}

.editor-sheet {
  width: 100%;
  min-height: 22rem;
  height: max(22rem, 46vh);
  flex-shrink: 0;
  padding: 0.85rem 1rem 1rem;
  background: var(--field);
  color: #9aa4ad;
  border: 1px solid var(--line);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.16rem;
  line-height: 1.55;
  outline: none;
  white-space: pre-wrap;
  tab-size: 4;
  overflow-wrap: anywhere;
  overflow-y: auto;
}

.editor-grip {
  position: relative;
  height: 0.85rem;
  margin-top: -1px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--card);
  cursor: ns-resize;
  touch-action: none;
}

.editor-grip:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.6rem;
  height: 3px;
  transform: translate(-50%, -50%);
  background: rgba(231, 195, 154, 0.85);
  border-radius: 2px;
  box-shadow: 0 -5px 0 rgba(231, 195, 154, 0.85);
}

.editor-grip:hover:before,
.editor-grip:focus-visible:before { background: var(--table); box-shadow: 0 -5px 0 var(--table); }

.editor.is-column {
  position: fixed;
  z-index: 35;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
}

body.editor-open.is-log #view {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.editor.is-column .editor-sheet {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.editor.is-column .editor-grip { flex: none; }

.editor[hidden] { display: none; }

.editor-sheet:focus {
  border-color: var(--table);
  box-shadow: inset 0 0 0 1px var(--table);
}

.editor-sheet.is-empty:before {
  content: attr(data-placeholder);
  color: #8ea396;
  pointer-events: none;
}

.composer-submit {
  min-height: 2.8rem;
  padding-inline: 1.2rem;
  background: var(--table);
  color: var(--table-ink);
  font-size: 0.95rem;
}

.composer {
  margin-top: 1.1rem;
  padding: 1rem 1.05rem 1.1rem;
}

label {
  display: block;
  margin: 0.75rem 0 0.3rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(142, 168, 154, 0.45);
  font-style: italic;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 0.65rem 0.7rem;
  border-radius: 2px;
}

textarea {
  min-height: 11rem;
  resize: vertical;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.08rem;
  line-height: 1.65;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  padding: 0;
}

textarea.slim { min-height: 5.5rem; }

body.is-guest .layout,
body.is-guest .drawer-toggles { display: none; }

.login-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 8rem);
  padding: 1.25rem 1rem 3rem;
}

.login-gate[hidden] { display: none; }

.login-card {
  width: min(42rem, 100%);
  padding: 2.4rem 2.1rem 2rem;
  border: 0;
  background: var(--card);
  box-shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.28);
}

.login-card h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.14em;
  font-weight: 400;
  color: var(--table);
}

.login-card .account-lead {
  font-size: 1rem;
  line-height: 1.5;
}

.login-card input {
  font-size: 1.12rem;
  padding: 0.9rem 0.85rem;
}

.login-card button {
  font-size: 0.95rem;
  padding: 0.9rem 1rem;
}

button, .go {
  min-height: 2.45rem;
  border: 0;
  border-radius: 3px;
  background: var(--table);
  color: var(--table-ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

button:hover, .go:hover { filter: brightness(1.12); }

.editor-bar .swatch,
.editor-bar .color-input,
.editor-bar .editor-size,
.editor-bar .editor-send,
.editor-tools .tool,
.color-choice,
.krzyzyk-cell,
.ludo-pawn,
.ludo-token,
.statki-cell,
.warcaby-cell,
.pamiec-card,
#roster-list .roster-head {
  min-height: 0;
  font-weight: 400;
  filter: none;
}

.composer-bar, .account-actions, .swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.75rem;
}

.editor-bar .swatch {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
}

.editor-bar .swatch.is-on,
.editor-bar .color-input.is-on,
.color-choice.is-on {
  border-color: #ff2a6d;
  box-shadow: 0 0 0 2px #ff2a6d;
}

.swatch.ink-swatch-light,
.color-choice.ink-swatch-light {
  box-shadow: inset 0 0 0 1px #161616, 0 0 0 1px rgba(22, 22, 22, 0.4);
}

.swatch.ink-swatch-dark,
.color-choice.ink-swatch-dark {
  box-shadow: inset 0 0 0 1px #f7f4ee, 0 0 0 1px rgba(247, 244, 238, 0.75);
}

html[data-tone="light"] .ink-light,
html[data-tone="light"] .post-body[style*="#ffffff"],
html[data-tone="light"] .post-body[style*="#f7f4ee"],
html[data-tone="light"] .editor-sheet span[style*="#ffffff"],
html[data-tone="light"] .editor-sheet span[style*="#f7f4ee"],
html[data-tone="light"] .editor-sheet span[style*="rgb(255, 255, 255)"],
html[data-tone="light"] .editor-sheet span[style*="rgb(247, 244, 238)"],
html[data-tone="light"] .post-body span[style*="#ffffff"],
html[data-tone="light"] .post-body span[style*="#f7f4ee"],
html[data-tone="light"] .post-body span[style*="rgb(255, 255, 255)"],
html[data-tone="light"] .post-body span[style*="rgb(247, 244, 238)"],
html[data-tone="light"] .post-copy h3[style*="#ffffff"],
html[data-tone="light"] .post-copy h3[style*="#f7f4ee"],
html[data-tone="light"] .roster-copy strong[style*="#ffffff"],
html[data-tone="light"] .roster-copy strong[style*="#f7f4ee"],
html[data-tone="light"] .ludo-row span[style*="#ffffff"],
html[data-tone="light"] .ludo-row span[style*="#f7f4ee"] {
  color: #161616 !important;
  background: none;
  text-shadow: none;
  padding: 0;
}

html[data-tone="dark"] .ink-dark,
html[data-tone="dark"] .post-body[style*="#161616"],
html[data-tone="dark"] .post-body[style*="#000000"],
html[data-tone="dark"] .editor-sheet span[style*="#161616"],
html[data-tone="dark"] .editor-sheet span[style*="#000000"],
html[data-tone="dark"] .editor-sheet span[style*="rgb(22, 22, 22)"],
html[data-tone="dark"] .editor-sheet span[style*="rgb(0, 0, 0)"],
html[data-tone="dark"] .post-body span[style*="#161616"],
html[data-tone="dark"] .post-body span[style*="#000000"],
html[data-tone="dark"] .post-body span[style*="rgb(22, 22, 22)"],
html[data-tone="dark"] .post-body span[style*="rgb(0, 0, 0)"],
html[data-tone="dark"] .post-copy h3[style*="#161616"],
html[data-tone="dark"] .post-copy h3[style*="#000000"],
html[data-tone="dark"] .roster-copy strong[style*="#161616"],
html[data-tone="dark"] .roster-copy strong[style*="#000000"],
html[data-tone="dark"] .ludo-row span[style*="#161616"],
html[data-tone="dark"] .ludo-row span[style*="#000000"] {
  color: #c8cdd2 !important;
  background: none;
  text-shadow: none;
  padding: 0;
}

.session-map {
  display: block;
  width: 100%;
  height: auto;
}

.editor-bar .color-input {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
}

.join-inline { margin: 0.2rem 0 0.9rem; }
.join-inline .join-actions { flex-direction: row; flex-wrap: wrap; }
.join-inline .join-actions button { width: auto; min-width: 9.5rem; }

.join-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.55rem 0 0.75rem;
}

.join-pick.face-card {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  width: 100%;
  min-height: 11.5rem;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.join-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: auto;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  font-family: var(--sans);
}

.join-card strong { font-size: 1.02rem; }
.join-card span,
.join-card small { color: var(--dim); font-size: 0.86rem; }

.forum-board .session-card { padding: 1.05rem 1.15rem 1.2rem; }
.forum-board .session-card h2 { font-size: 1.35rem; line-height: 1.25; }
.forum-board .session-card .blurb { margin: 0.25rem 0 0; max-width: none; }
.forum-board .session-card .dossier-meta { margin: 0.6rem 0 0; }

body:not(.is-log) .forum-board .list { max-width: none; }
body:not(.is-log) .forum-board .session-card {
  width: 100%;
  box-sizing: border-box;
}

.tool-body .composer { margin: 0; border: 0; padding: 0; }

.editor-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  position: sticky;
  right: 0;
  z-index: 1;
  padding-left: 0.35rem;
  background: var(--card);
  flex: 0 0 auto;
}

.editor-bar .editor-size {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  min-height: 0;
  padding: 0;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.editor-bar .editor-size:hover,
.editor-bar .editor-size:focus-visible,
.editor-bar .editor-size[aria-pressed="true"] {
  background: var(--table);
  color: var(--table-ink);
}

.editor-bar .preview-toggle,
.editor-bar .editor-send {
  flex: 0 0 auto;
  height: 1.7rem;
  min-height: 0;
  padding: 0 0.55rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  z-index: 1;
}

.editor-bar .preview-toggle {
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--ink);
}

.editor-bar .preview-toggle[aria-pressed="true"] {
  border-color: var(--table);
  background: color-mix(in srgb, var(--table) 20%, transparent);
}

.editor-bar .editor-send {
  background: #c62828;
  border-color: #ff5a4a;
  color: #fff;
}

.editor-bar .editor-send:hover,
.editor-bar .editor-send:focus-visible {
  background: #e53935;
  border-color: #ff8a80;
  color: #fff;
}

.account {
  align-self: start;
  position: sticky;
  top: 0.75rem;
  padding: 0.15rem 0.2rem 0.95rem;
  border: 0;
  background: transparent;
}

.account h2 {
  margin: 0 0 0.55rem;
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--ink);
}

.account-lead, .account-status { font-size: 0.82rem; }

.account-status {
  color: var(--table);
  min-height: 1.45em;
  margin: 0.75rem 0 0;
}

.account-actions button { flex: 1 1 auto; }

.account-admin {
  display: inline-block;
  margin-top: 0.85rem;
  letter-spacing: 0.08em;
}

.account-admin[hidden] { display: none; }

#seat-character:not([hidden]) {
  display: block;
  margin-top: 0.35rem;
}

#account-form[hidden],
#seat-box[hidden] { display: none; }

.seat-who {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--ink);
}

.seat-who.has-face {
  display: grid;
  grid-template-columns: 6.2rem minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: 8.4rem;
  border: 1px solid var(--line);
  overflow: hidden;
}

.seat-who .post-portrait {
  width: 100%;
  height: 100%;
  min-height: 8.4rem;
  border: 0;
  border-right: 1px solid var(--line);
}

#seat-sheets h3,
.seat-table {
  margin: 0.75rem 0 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 400;
  color: var(--table);
}

#seat-stand,
#seat-logout {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
}

#seat-stand[hidden],
#seat-logout[hidden] {
  display: none;
}

#seat-logout {
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
}

#seat-logout:hover {
  background: var(--danger);
  color: #1a120c;
}

.players {
  margin-top: 1rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}

.players h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  font-weight: 400;
  color: var(--table);
}

.players ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.players li {
  display: block;
  margin: 0.35rem 0;
  font-size: 0.82rem;
}

.player-link {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.players .post-portrait {
  width: 4.6rem;
  height: 6.2rem;
}

.players li.is-on .post-portrait {
  box-shadow: 0 0 0 1px #00e676;
}

.players li.player-empty {
  display: block;
  color: var(--dim);
  font-size: 0.78rem;
}

.player-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #3d4a44;
  align-self: center;
}

.players li.is-on .player-dot {
  background: #00e676;
  box-shadow: 0 0 6px #00e676;
}

.players li.is-off .player-name { color: var(--dim); }

.player-state {
  color: var(--dim);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.players [hidden] { display: none; }

.player-face,
.sheet-avatar {
  width: 1.7rem;
  height: 1.7rem;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid var(--line);
}

.sheet-avatar {
  width: 100px;
  height: 200px;
  margin-top: 0.6rem;
  object-fit: cover;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.8rem;
}

.sheet-list {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

.sheet-list li { margin: 0.25rem 0; }

.sheet-list button {
  padding: 0.2rem 0.45rem;
  letter-spacing: 0.04em;
}

.roster {
  width: 100%;
  border-collapse: collapse;
}

.roster th,
.roster td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.82rem;
}

.roster input[type="password"] { width: 100%; }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.admin-mark { color: var(--table); }

.row-note { min-height: 1.2rem; }

.color-pick {
  margin: 0.7rem 0 0.2rem;
  padding: 0.45rem 0.55rem 0.6rem;
  border: 1px solid var(--line);
}

.color-pick legend {
  padding: 0 0.35rem;
  color: var(--table);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.color-choices { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.color-choice {
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.28);
}

.color-choice.is-on { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.color-choice:disabled { opacity: 0.28; cursor: not-allowed; }
.color-choice:disabled:hover { background: transparent; color: inherit; }

.seat-color { margin-top: 0.8rem; }
.seat-color p {
  margin: 0 0 0.45rem;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.4;
}

.play-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: none;
  padding: 0.55rem 0 0.1rem;
  background: var(--bg);
}

.play-dock[hidden] { display: none; }

.side-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.85rem 0 0;
}

.side-tools button {
  position: relative;
  flex: 1 1 calc(50% - 0.35rem);
  min-width: 0;
  min-height: 2.2rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
}

.ping {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.4rem 0.08rem 0;
  border-radius: 50%;
  background: #e10600;
  vertical-align: middle;
}

.side-tools button.has-ping::after,
.row.has-ping > h2 .ping { background: #e10600; }

.side-tools button.has-ping::after {
  content: "";
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 2;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #e10600;
  box-shadow: 0 0 0 1px var(--card);
}

.forum-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.55rem;
}

.forum-head h2 { margin: 0; }

.forum-head button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.forum-board { margin: 0.4rem 0 1.1rem; }

.creator-windows {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 22rem);
  gap: 0.9rem;
  align-items: start;
}

.creator-window {
  border: 1px solid var(--line);
  background: var(--card);
  min-height: 18rem;
}

.creator-window-bar {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.creator-window-body { padding: 0.75rem 0.95rem 1rem; }

.creator-org-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.creator-org-kicker.is-blue { color: #3d8ec8; }
.creator-org-kicker.is-red { color: #c44536; }
.creator-org-kicker.is-green { color: #3d8f5a; }

.creator-org-body {
  max-height: min(70vh, 36rem);
  overflow: auto;
}

.creator-org-body p { margin: 0.45rem 0; }

.creator-org-body h3,
.creator-org-body h4 { margin: 0.85rem 0 0.2rem; font-size: 1rem; }

.creator-org-body ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }

@media (max-width: 860px) {
  .creator-windows { grid-template-columns: 1fr; }
}

.forum { margin: 1.1rem 0 0.4rem; }
.forum h2 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.row.is-here { box-shadow: inset 3px 0 0 var(--ink); }

.thread-fresh {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.6rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #e10600;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.thread-fresh[hidden] { display: none; }

.play-dock button { min-width: 6.2rem; }

.play-dock button[aria-pressed="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.tool-dock {
  display: contents;
}

.tool-dock[hidden] { display: none; }

.tool-tabs { display: none; }

.tool-sheet {
  position: fixed;
  z-index: 32;
  left: 4.5rem;
  top: 5.5rem;
  width: min(32rem, calc(100vw - 1.5rem));
  max-height: min(72vh, 38rem);
  display: flex;
  flex-direction: column;
  background: var(--card);
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.tool-sheet[hidden] { display: none; }

.tool-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem 0.2rem;
  font-family: var(--sans);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.tool-sheet-bar strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.tool-sheet.is-wide {
  width: min(46rem, calc(100vw - 1.5rem));
}

.tool-body,
#tool-body {
  overflow: auto;
  padding: 0.35rem 0.9rem 0.95rem;
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.55;
}

.tool-lore { max-width: none; }
.tool-lore .blurb { font-size: 1.02rem; }

.dice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0.8rem;
}

.dice-row button {
  width: auto;
  min-width: 3.1rem;
  margin-top: 0;
}

.dice-result {
  margin: 0 0 0.55rem;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.dice-log {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--dim);
}

.dice-log li { margin: 0.15rem 0; }

.gm-dice { margin: 0 0 0.9rem; }

.gm-dice-count {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
}

.gm-dice select { width: auto; }

.chat-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 16rem;
  overflow: auto;
}

.chat-line { margin: 0; }

.chat-name { font-weight: 700; }

.chat-name.is-weak {
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
}

.chat-line.is-whisper {
  color: var(--dim);
  font-style: italic;
}

.chat-line.is-dice { font-weight: 700; }

.chat-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.7rem;
}

.chat-form input { flex: 1 1 8rem; min-width: 0; }

.chat-form select { width: auto; }

.drawer-toggles { display: none; }

@media (max-width: 980px) {
  .kp-preview { overflow: auto; }
  .kp-card {
    height: auto;
    min-height: calc(100vh - 0.8rem);
    overflow: visible;
  }
  .esper-kp { display: block; }
  .esper-sheet { grid-template-columns: 1fr; height: auto; }
  .esper-face .post-portrait,
  .esper-face .sheet-avatar,
  .esper-face .sheet-avatar.is-empty { min-height: 18rem; height: 20rem; flex: none; }
  .esper-meta,
  .esper-cols { grid-template-columns: 1fr; }
  .esper-cols > section {
    height: auto;
    display: block;
    margin-top: 1rem;
    padding: 0;
    border-left: 0;
    border-top: 1px solid rgba(0, 209, 255, 0.35);
  }
  .esper-cols > section:first-child { margin-top: 0; border-top: 0; }
  .esper-col-body { overflow: visible; }
}

@media (max-width: 860px) {
  .top { align-items: flex-start; }
  .look-switch {
    width: 100%;
    margin-left: 0;
  }
  .look-switch select { flex: 1 1 auto; min-width: 0; }
  .layout, body.is-log .layout { grid-template-columns: 1fr; }
  .layout, body.is-log .layout {
    padding: 0.15rem 0.1rem 0.35rem;
    gap: 0;
  }
  .drawer-toggles {
    display: flex;
    position: static;
    gap: 0.35rem;
    padding: 0.15rem 0.1rem 0.3rem;
    background: transparent;
  }
  .drawer-toggle {
    flex: 1 1 0;
    min-height: 2.2rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.92rem;
  }
  body:not(.is-log) #open-roster { display: none; }
  body.is-log { padding-bottom: 0; }
  body.is-log .play-dock { display: none; }
  .side-tools { margin: 0.85rem 0 0; }
  .tool-dock.is-phone {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 34;
    max-height: 72vh;
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .tool-tabs {
    display: flex;
    gap: 0.3rem;
    overflow: auto;
    padding: 0.35rem 0.4rem 0;
    background: var(--card);
  }
  .tool-tabs button {
    width: auto;
    margin: 0;
    min-height: 2.2rem;
    white-space: nowrap;
  }
  .tool-tabs button[aria-pressed="true"] {
    background: var(--table);
    color: var(--table-ink);
  }
  .tool-sheet {
    position: static;
    display: none;
    width: 100%;
    max-width: none;
    max-height: 62vh;
    height: auto;
    transform: none;
    left: auto;
    top: auto;
    bottom: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .tool-sheet.is-phone-on { display: flex; }
  .tool-sheet.is-wide { width: 100%; }
  body.has-tools { padding-bottom: 2.6rem; }
  .chat-form { flex-direction: column; align-items: stretch; }
  .chat-form input,
  .chat-form select,
  .chat-form button { width: 100%; }
  .composer {
    margin-top: 0.35rem;
    padding: 0.2rem 0 0;
    border: 0;
  }
  .editor-bar {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
  .editor-bar .editor-tools,
  .editor-bar .swatches {
    flex: 1 1 auto;
  }
  .editor-bar .editor-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
    padding-left: 0;
  }
  body.is-log .editor-sheet,
  .editor-sheet {
    width: 100%;
    min-height: 22rem;
    height: max(22rem, 46vh);
    font-size: 1.12rem;
  }
  .scene-cover { aspect-ratio: 16 / 7; }
  .editor-grip { display: none; }
  .drawer-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 24;
    border: 0;
    background: color-mix(in srgb, var(--ink) 40%, transparent);
  }
  .drawer-scrim[hidden] { display: none; }
  .roster-side, .account {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 26;
    width: min(22rem, 86vw);
    max-height: none;
    overflow: auto;
    transition: transform 0.2s ease;
    background: var(--bg);
    padding: 0.85rem 0.75rem 1.2rem;
  }
  .roster-side {
    left: 0;
    transform: translateX(-105%);
  }
  .account {
    right: 0;
    left: auto;
    order: 0;
    transform: translateX(105%);
  }
  body.is-log { display: block; height: auto; overflow: auto; }
  body.is-log .layout { overflow: visible; }
  body.is-log main { display: block; overflow: visible; height: auto; }
  body.is-log #view { overflow: visible; }
  body.is-log .roster-side,
  body.is-log .account {
    position: fixed;
    height: auto;
    max-height: none;
    align-self: auto;
  }
  body.roster-open .roster-side { transform: none; }
  body.account-open .account { transform: none; }
  body.roster-open, body.account-open { overflow: hidden; }
  .editor-tools .tool, .color-choice { min-width: 1.7rem; min-height: 1.7rem; }
  .post { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0.4rem; }
  .post > .post-portrait { width: 2.4rem; height: 2.9rem; }
}

.site-foot {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.2rem 1.25rem 1.4rem;
}

.site-foot[hidden] {
  display: none !important;
}

body.is-log .site-foot {
  flex: none;
  max-width: none;
  padding: 0 0.85rem 0.45rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.site-log summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.75rem;
  min-height: 2.9rem;
  padding: 0.55rem 0.1rem;
  cursor: pointer;
  list-style: none;
}

.site-log summary::-webkit-details-marker { display: none; }

.site-log summary::after {
  content: "rozwiń";
  margin-left: auto;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-log[open] summary::after { content: "zwiń"; }

.site-log-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}

.site-log-note,
.site-log-lead {
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.4;
}

.site-log-lead { margin: 0.15rem 0 0.45rem; }

.site-log-day {
  margin: 0.85rem 0 0.1rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
}

.site-log-day:first-of-type { margin-top: 0.2rem; }

.site-log ol {
  margin: 0;
  padding: 0 0 0.35rem;
  list-style: none;
}

.site-log li {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.2rem 0.75rem;
  margin: 0.4rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
}

.site-log time {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

body.is-log .site-log-body {
  max-height: min(42vh, 18rem);
  overflow: auto;
}

@media (max-width: 860px) {
  .site-foot { padding: 0.35rem 0.85rem 1.6rem; }
  body.is-log .site-foot { padding-bottom: 1.2rem; }
  .site-log summary { align-items: flex-start; }
  .site-log summary::after { margin-left: 0; flex-basis: 100%; }
  .site-log li { grid-template-columns: 1fr; gap: 0.05rem; }
  body.is-log .site-log-body { max-height: none; }
}

.jb-board {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  grid-template-rows: repeat(11, minmax(2.35rem, auto));
  gap: 1px;
  margin: 0.45rem 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.jb-cell {
  position: relative;
  min-width: 0;
  min-height: 2.35rem;
  background: var(--field);
  color: var(--ink);
  overflow: hidden;
}
.jb-cell.is-mort { opacity: 0.55; }
.jb-hit {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  min-height: 2.35rem;
  margin: 0;
  padding: 0.05rem 0.08rem 0.55rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.58rem;
  line-height: 1.05;
  text-align: center;
}
.jb-hit span {
  display: block;
  overflow: hidden;
  max-height: 2.2rem;
}
.jb-bar {
  display: block;
  height: 0.28rem;
  margin: 0 0 0.08rem;
}
.jb-owner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.18rem;
}
.jb-pawns {
  position: absolute;
  left: 0.08rem;
  right: 0.08rem;
  bottom: 0.22rem;
  display: flex;
  gap: 1px;
  pointer-events: none;
}
.jb-pawns i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.jb-center {
  grid-column: 2 / 11;
  grid-row: 2 / 11;
  overflow: auto;
  padding: 0.45rem 0.55rem;
  background: var(--card);
  color: var(--ink);
}
.jb-actions,
.jb-manage,
.jb-picks,
.jb-trade {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin: 0.35rem 0;
}
.jb-manage,
.jb-picks { list-style: none; padding: 0; }
.jb-manage li,
.jb-trade label,
.jb-bid { font-size: 0.85rem; }
.jb-actions button,
.jb-manage button,
.jb-trade button { width: auto; }
.jb-bid input,
.jb-trade input,
.jb-trade select { width: auto; min-width: 4.5rem; }
.jb-deed { margin-top: 0.35rem; font-size: 0.88rem; }
.jb-deed p { margin: 0.15rem 0; }
.mini-window.is-small .jb-hit span,
.mini-window.is-small .jb-hit em { display: none; }
.mini-window.is-small .jb-center { font-size: 0.82rem; }

body.is-guest .top,
body.is-guest .site-foot { display: none; }

body.is-guest .login-gate {
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  width: min(22rem, 100%);
}

.login-card .kicker { display: none; }
.login-card .account-lead { display: block; margin: 0 0 0.85rem; }

.login-card label { display: block; margin: 0.75rem 0 0; }
.login-card label[hidden] { display: none; }
.login-card input { width: 100%; box-sizing: border-box; }
.login-card #seat-enter { width: 100%; margin-top: 1rem; }

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
}

.login-links button {
  background: transparent;
  color: var(--dim);
  font-weight: 400;
  min-height: 0;
  padding: 0;
  text-decoration: underline;
}

.corner-dock {
  position: fixed;
  z-index: 70;
  top: 0.7rem;
  right: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  padding: 0.42rem;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 0.45rem 1.4rem rgba(0, 0, 0, 0.16);
  transition: background 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.corner-dock[hidden] { display: none; }

.dock-btn {
  width: 3.35rem;
  height: 3.35rem;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.dock-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.dock-btn svg { width: 1.7rem; height: 1.7rem; display: block; }

/* Na widoku mapy (LIMEN) dock bierze cyan/panel mapy, żeby nie gryzł się z UI. */
body.is-limen .corner-dock {
  background: color-mix(in srgb, #050d13 92%, #00c8ff 8%);
  border-color: #24536b;
  color: #c9d7e5;
  box-shadow: 0 0.45rem 1.4rem rgba(0, 20, 32, 0.55), 0 0 0 1px rgba(0, 200, 255, 0.12);
}

body.is-limen .dock-btn { color: #c9d7e5; }
body.is-limen .dock-btn:hover {
  background: color-mix(in srgb, #00c8ff 16%, transparent);
  border-color: color-mix(in srgb, #00c8ff 45%, transparent);
}
body.is-limen .gear-list {
  background: #050d13;
  color: #c9d7e5;
  border: 1px solid #173344;
  box-shadow: 0 0.6rem 1.6rem rgba(0, 20, 32, 0.55);
}
body.is-limen .gear-list a,
body.is-limen .gear-list > button { color: #c9d7e5; }

.gear-wrap { position: relative; }

.gear-list {
  position: absolute;
  top: 0;
  bottom: auto;
  right: calc(100% + 0.45rem);
  min-width: 10.5rem;
  max-height: min(70vh, calc(100vh - 4.5rem));
  overflow: auto;
  padding: 0.3rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}

.gear-list[hidden] { display: none; }

.gear-list a,
.gear-list > button {
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  min-height: 2.1rem;
  text-align: left;
  padding: 0.35rem 0.65rem;
}

.gear-options { padding: 0.35rem 0.7rem 0.65rem; }
.gear-options[hidden] { display: none; }
.gear-options .look-switch {
  width: 100%;
  margin: 0.45rem 0 0.2rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  font-size: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.gear-options .look-switch legend {
  padding: 0;
  font-weight: 700;
}
.look-options {
  display: grid;
  gap: 0.15rem;
}
.look-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.38rem 0.45rem;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.look-options input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--table);
}
.look-options label:has(input:checked) {
  border-color: var(--table);
  background: var(--table);
  color: var(--table-ink);
}
.gear-options .site-log {
  margin: 0.55rem 0 0.2rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}
.gear-options .site-log summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  gap: 0.15rem;
  padding: 0.35rem 0.1rem;
}
.gear-options .site-log summary::-webkit-details-marker { display: none; }
.gear-options .site-log-title {
  font-weight: 700;
  font-size: 1rem;
}
.gear-options .site-log-note,
.gear-options .site-log-lead {
  color: var(--dim);
  font-size: 0.82rem;
}
.gear-options .site-log-body {
  max-height: min(50vh, 22rem);
  overflow: auto;
  padding: 0.2rem 0.1rem 0.4rem;
  font-size: 0.88rem;
}
.gear-options .site-log-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}
.gear-options .site-log-body li {
  margin: 0.25rem 0;
}
.gear-options .site-log-body time {
  display: inline-block;
  min-width: 2.6rem;
  margin-right: 0.35rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.gear-options a[hidden] { display: none; }
.gear-options a {
  display: block;
  min-height: 2rem;
  padding: 0.3rem 0.1rem;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.gear-list { min-width: 16.5rem; }

body:not(.is-guest) .layout,
body:not(.is-guest).is-log .layout {
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem);
}

@media (min-width: 861px) {
  body:not(.is-guest):has(.roster-side:not([hidden])).is-log .layout {
    grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr) minmax(14rem, 17rem);
  }
}

@media (max-width: 860px) {
  body:not(.is-guest) .layout,
  body:not(.is-guest).is-log .layout {
    grid-template-columns: 1fr;
  }
}

.logout-ask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.logout-ask[hidden] { display: none; }

.logout-ask-card {
  width: min(22rem, calc(100% - 2rem));
  padding: 1.1rem 1.15rem 1rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
}

.logout-ask-card p { margin: 0 0 0.9rem; }

.logout-ask-actions { display: flex; gap: 0.5rem; }
.logout-ask-actions button { flex: 1; }

.world-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 1.25rem;
}

.world-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--ink) 6%, transparent), transparent 55%),
    var(--card);
  min-height: 7.5rem;
}

.world-tile strong {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.world-tile small {
  color: var(--dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.world-tile p {
  margin: 0.35rem 0 0;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.35;
}

.world-tile:hover {
  border-color: var(--ink);
}

.world-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .home-hero {
    min-height: 10rem;
    padding: 1.2rem 1rem;
  }

  .home-hero h2 { font-size: 1.45rem; }

  .world-board {
    grid-template-columns: 1fr;
  }

  .gear-list { min-width: min(18rem, calc(100vw - 1.5rem)); }

  .kp-board-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.agent-hud {
  position: sticky;
  top: 0;
  z-index: 19;
  width: 100%;
  max-width: none;
  margin: 0 0 0.35rem;
  padding: 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.agent-hud.is-shut {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  width: auto;
  margin: 0;
  z-index: 40;
  background: transparent;
  border: 0;
}

body:not([data-mod="worlds"]) .top,
body:not([data-mod="worlds"]) .agent-hud,
body.is-wiki .top,
body.is-limen .top,
body.is-wiki .agent-hud,
body.is-limen .agent-hud,
body.is-wiki #agent-purse,
body.is-limen #agent-purse,
body.is-wiki #agent-profile,
body.is-limen #agent-profile {
  display: none;
}

.agent-hud-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem 0.6rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.agent-hud-fold {
  padding: 0.28rem;
  border: 3px solid var(--line);
  background: var(--card);
  min-height: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 3px;
}

.agent-hud-fold:hover .agent-hud-avatar,
.agent-hud-fold:focus-visible .agent-hud-avatar {
  border-color: var(--ink);
}

.agent-hud.is-shut .agent-hud-sheet {
  display: none;
}

.agent-hud.is-shut .agent-hud-card,
.agent-hud.is-shut .agent-hud-card.is-admin {
  display: block;
  width: auto;
  padding: 0;
  box-shadow: none;
}

.agent-hud.is-shut + .top {
  padding-left: var(--corner-clear, 5.4rem);
}

.agent-hud.is-shut .agent-hud-fold {
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.28);
}

.agent-hud.is-shut .agent-hud-avatar {
  width: 2.7rem;
  height: 3.6rem;
}

.agent-hud-card.is-admin {
  border-color: color-mix(in srgb, var(--dock) 70%, var(--line));
  box-shadow: inset 0.28rem 0 0 var(--dock);
}

.agent-hud-sheet {
  min-width: 0;
}

.agent-hud-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.agent-hud-main:hover .agent-hud-copy strong,
.agent-hud a,
.agent-hud a:hover,
.corner-dock a,
.corner-dock a:hover {
  text-decoration: none;
}

.agent-hud-role {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.8rem;
  align-items: baseline;
  margin: 0;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.agent-hud-rank {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.agent-hud-card.is-admin .agent-hud-rank {
  color: var(--dock);
}

.agent-hud-rights {
  color: var(--dim);
  font-size: 0.82rem;
}

#agent-hud-admin {
  margin-left: auto;
  font-size: 0.82rem;
}

.agent-hud-avatar {
  width: 2.7rem;
  height: 3.6rem;
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--field);
  border: 2px solid var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}

.agent-hud[data-paradigm="blue"] {
  background: color-mix(in srgb, #2f6fed 16%, var(--card));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #2f6fed 48%, transparent);
}
.agent-hud[data-paradigm="red"] {
  background: color-mix(in srgb, #c44536 16%, var(--card));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #c44536 48%, transparent);
}
.agent-hud[data-paradigm="green"] {
  background: color-mix(in srgb, #2f8f4e 16%, var(--card));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #2f8f4e 48%, transparent);
}
.agent-hud[data-paradigm="blue"] .agent-hud-fold { border-color: #2f6fed; }
.agent-hud[data-paradigm="red"] .agent-hud-fold { border-color: #c44536; }
.agent-hud[data-paradigm="green"] .agent-hud-fold { border-color: #2f8f4e; }
.agent-hud[data-paradigm="blue"] .agent-hud-avatar { border-color: #2f6fed; }
.agent-hud[data-paradigm="red"] .agent-hud-avatar { border-color: #c44536; }
.agent-hud[data-paradigm="green"] .agent-hud-avatar { border-color: #2f8f4e; }
.agent-hud.is-shut[data-paradigm="blue"],
.agent-hud.is-shut[data-paradigm="red"],
.agent-hud.is-shut[data-paradigm="green"] {
  background: transparent;
  box-shadow: none;
}

.agent-hud-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-hud-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.agent-hud-kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--dim);
}

.agent-hud-copy strong {
  font-size: 1.05rem;
}

.agent-hud-bio {
  color: var(--dim);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-hud-place {
  color: var(--ink);
  font-size: 0.82rem;
  white-space: normal;
}

.agent-hud-account {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.12rem;
}

#agent-hud-code {
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}

#agent-hud-balance {
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .agent-hud-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .agent-hud-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-hud-account {
    grid-column: auto;
    align-items: flex-start;
    text-align: left;
  }

  .agent-hud-bio { white-space: normal; }

  #agent-hud-admin { margin-left: 0; }
}

.admin-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.admin-meters li {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.55rem 0.7rem;
}

.admin-meters strong {
  display: block;
  font-size: 1.25rem;
}

.admin-faults {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.admin-session {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 8rem auto auto;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.45rem;
}

.admin-session small {
  grid-column: 1 / -1;
  color: var(--dim);
}

@media (max-width: 720px) {
  .admin-meters { grid-template-columns: 1fr 1fr; }
  .admin-session { grid-template-columns: 1fr; }
}

.agent-hud-repute {
  flex-basis: 100%;
  color: var(--dim);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.agent-hud-list {
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--bg);
  padding: 0.4rem 0.7rem 0.7rem;
}

.agent-hud-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agent-hud-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.agent-hud-list button[aria-current="true"] {
  border-color: var(--ink);
}

.agent-profile h3 {
  margin: 0.2rem 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-profile ul {
  margin: 0.4rem 0 0.6rem;
  padding-left: 1.1rem;
}

.agent-gear-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.agent-gear-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--line);
}

.agent-gear-list em {
  font-style: normal;
  color: var(--dim);
}

.agent-purse {
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.agent-purse h2,
.agent-board h2 {
  margin: 0.15rem 0;
  letter-spacing: 0.08em;
}

.agent-code {
  margin: 0;
  font-family: "IBM Plex Mono", "Share Tech Mono", ui-monospace, monospace;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
}

.agent-balance {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.agent-board {
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--line);
  background: var(--card);
}

.agent-ledger {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.agent-ledger li {
  display: grid;
  grid-template-columns: 6.4rem 4.6rem minmax(0, 1fr);
  gap: 0.45rem;
  align-items: baseline;
  padding: 0.4rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.agent-ledger em {
  font-style: normal;
  color: var(--dim);
}

/* Kartoteka Agentów */
.kartoteka-archive,
.kartoteka-creator {
  max-width: 46rem;
}

.kartoteka-archive h2,
.kartoteka-creator h3 {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.kartoteka-new {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.kartoteka-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
}

.kartoteka-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.kartoteka-step i {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid currentColor;
  font-style: normal;
  font-size: 0.72rem;
}

.kartoteka-step.is-on { color: var(--ink); font-weight: 600; }
.kartoteka-step.is-done { color: var(--ink); opacity: 0.72; }
.kartoteka-rail {
  width: 1.1rem;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.kartoteka-form label { display: block; margin: 0.55rem 0; }
.kartoteka-traits {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
}

.kartoteka-trait .trait-help {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--dim);
  line-height: 1.35;
}

.kartoteka-neotyka {
  margin: 0.4rem 0 0;
  padding: 0.45rem 0.6rem;
  border-left: 3px solid var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.kartoteka-avatar-slot {
  width: min(100%, 18rem);
  height: 24rem;
  margin: 0.6rem 0 0.9rem;
  border: 1px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      color-mix(in srgb, var(--ink) 6%, transparent) 6px,
      color-mix(in srgb, var(--ink) 6%, transparent) 7px
    );
  display: grid;
  place-items: center;
  overflow: hidden;
}

.kartoteka-avatar-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kartoteka-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.post-portrait.dossier-face.is-empty,
.sheet-avatar.is-empty {
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 5px,
      color-mix(in srgb, var(--ink) 7%, transparent) 5px,
      color-mix(in srgb, var(--ink) 7%, transparent) 6px
    );
  border: 1px dashed color-mix(in srgb, var(--ink) 35%, transparent);
}

.post-portrait.dossier-face.is-empty span,
.sheet-avatar.is-empty { color: transparent; }

.sheet-avatar.is-empty {
  display: block;
  width: 6.5rem;
  height: 8.5rem;
  margin: 0.5rem 0;
}

/* —— Mapa organizacji (schemat kołowy) —— */
.org-map {
  --org-blue: #3d8ec8;
  --org-cyan: #5eb8d4;
  --org-red: #c44536;
  --org-green: #3d8f5a;
  --org-gold: #c9a227;
  --org-amber: #d4a84b;
  --org-orange: #c4622d;
  --org-mute: rgba(140, 148, 156, 0.75);
  --org-stage: min(92vw, 640px);
  margin: 1.2rem 0 2rem;
}
.org-map-top {
  text-align: center;
  margin: 0 0 0.85rem;
}
.org-map-top h2 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.06em;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
}
.org-map-top p {
  margin: 0.25rem 0 0;
  opacity: 0.75;
  font-size: 0.92rem;
}
.org-map-layout,
.org-map-board {
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(20rem, 1.2fr);
  gap: 1.15rem 1.4rem;
  align-items: stretch;
  justify-content: center;
}
.org-side {
  font-size: 0.82rem;
  line-height: 1.35;
  padding: 0.6rem 0.15rem;
}
.org-side h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
.org-side h3:first-child { margin-top: 0; }
.org-side p { margin: 0 0 0.45rem; opacity: 0.85; }
.org-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.org-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.org-legend-item i {
  width: 1.1rem;
  height: 0;
  border-top: 2px solid;
  flex: none;
  opacity: 0.9;
}
.org-map-stage {
  --orbit: calc(var(--org-stage) * 0.39);
  --orbit-axis: calc(var(--org-stage) * 0.28);
  position: relative;
  width: var(--org-stage);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(20, 28, 36, 0.55) 0%, transparent 42%),
    conic-gradient(
      from -60deg,
      rgba(61, 142, 200, 0.14) 0deg 120deg,
      rgba(196, 69, 54, 0.13) 120deg 240deg,
      rgba(201, 162, 39, 0.15) 240deg 360deg
    );
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 0 0 1px color-mix(in srgb, var(--line) 50%, transparent);
  overflow: visible;
}
.org-ring {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  pointer-events: none;
}
.org-ring-mid { inset: 8%; opacity: 0.55; }
.org-ring-inner { inset: 28%; opacity: 0.4; }
.org-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.org-links path {
  opacity: 0.45;
  transition: opacity 0.25s ease, stroke-width 0.25s ease;
}
.org-links path.is-dim { opacity: 0.12; }
.org-links path.is-hot {
  opacity: 0.95;
  stroke-width: 0.7;
  filter: drop-shadow(0 0 2px currentColor);
}
.org-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 28%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 40% 35%, rgba(90, 140, 180, 0.35), transparent 55%),
    radial-gradient(circle at 60% 70%, rgba(40, 20, 30, 0.5), #0c1016 70%);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem;
  text-align: center;
  font: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.org-hub:hover,
.org-hub.is-on {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: var(--org-cyan);
  box-shadow: 0 0 18px rgba(94, 184, 212, 0.25);
}
.org-hub-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.org-hub strong {
  font-family: Orbitron, sans-serif;
  font-size: clamp(0.55rem, 1.6vw, 0.78rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
}
.org-hub small {
  font-size: 0.48rem;
  line-height: 1.25;
  opacity: 0.65;
  max-width: 90%;
}
.org-axis {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--orbit-axis))) rotate(calc(-1 * var(--a)));
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0.7;
  white-space: nowrap;
}
.org-axis.is-blue { color: var(--org-blue); }
.org-axis.is-red { color: var(--org-red); }
.org-axis.is-green { color: var(--org-gold); }
.org-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 5.6rem;
  min-height: 5.6rem;
  margin: 0;
  padding: 0.4rem 0.35rem 0.45rem;
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--orbit))) rotate(calc(-1 * var(--a)));
  transform-origin: center center;
  border-radius: 50%;
  border: 1.5px solid var(--tile-line, var(--line));
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tile) 28%, transparent), transparent 55%),
    color-mix(in srgb, var(--card, #12161c) 88%, black);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, filter 0.28s ease;
}
.org-tile.is-blue { --tile: var(--org-blue); --tile-line: color-mix(in srgb, var(--org-blue) 70%, var(--line)); }
.org-tile.is-red { --tile: var(--org-red); --tile-line: color-mix(in srgb, var(--org-red) 70%, var(--line)); }
.org-tile.is-green { --tile: var(--org-gold); --tile-line: color-mix(in srgb, var(--org-gold) 70%, var(--line)); }
.org-tile:hover,
.org-tile.is-on {
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--orbit))) rotate(calc(-1 * var(--a))) scale(1.08);
  border-color: var(--tile);
  box-shadow: 0 0 0 1px var(--tile), 0 8px 22px color-mix(in srgb, var(--tile) 35%, transparent);
  z-index: 5;
}
.org-map.has-pick .org-tile:not(.is-on) { filter: saturate(0.65) brightness(0.88); }
.org-tile-n {
  position: absolute;
  top: 0.25rem;
  right: 0.45rem;
  font-size: 0.62rem;
  opacity: 0.55;
  font-family: Orbitron, sans-serif;
}
.org-tile-mark {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--tile) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile) 55%, transparent);
  color: var(--tile);
}
.org-tile-name {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15;
  max-width: 5.1rem;
}
.org-tile-blurb {
  font-size: 0.48rem;
  line-height: 1.2;
  opacity: 0.7;
  max-width: 5rem;
}
.org-tile.is-open-name .org-tile-name { font-style: italic; }
.org-detail {
  min-height: 18rem;
  padding: 0.9rem 1rem 1.1rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card, transparent) 92%, transparent);
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.org-detail.is-open {
  opacity: 1;
  transform: translateY(0);
}
.org-detail-head h2 {
  margin: 0.15rem 0 0.35rem;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.org-detail-n {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  border: 1px solid var(--line);
}
.org-detail-head.is-blue .org-detail-n { border-color: var(--org-blue); color: var(--org-blue); }
.org-detail-head.is-red .org-detail-n { border-color: var(--org-red); color: var(--org-red); }
.org-detail-head.is-green .org-detail-n { border-color: var(--org-gold); color: var(--org-gold); }
.org-detail-paradigm {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.org-detail-blurb {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  opacity: 0.85;
}
.org-detail-open {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--org-amber);
}
.org-detail-body p { margin: 0 0 0.65rem; font-size: 0.95rem; line-height: 1.45; }
.org-detail-body h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.org-focus {
  margin: 0 0 0.5rem;
  padding: 0 0 0 1rem;
  font-size: 0.9rem;
}
.org-related-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}
.org-related {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.org-related strong { font-size: 0.85rem; }
.org-related span { font-size: 0.72rem; opacity: 0.7; }
.org-related:hover { border-color: var(--org-cyan); }
.org-detail-back {
  margin-top: 0.5rem;
  border: 0;
  background: none;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.org-detail-motto {
  margin-top: 1rem !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}
.org-map-foot {
  text-align: center;
  margin: 1rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}
.org-map-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin: 0.85rem 0 1.1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--org-blue, #3d8ec8) 12%, transparent), transparent 45%),
    linear-gradient(300deg, color-mix(in srgb, var(--org-red, #c44536) 10%, transparent), transparent 40%);
}
.org-map-entry p { margin: 0; max-width: 36rem; font-size: 0.92rem; }
.org-map-entry a {
  font-family: Orbitron, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  color: inherit;
}
.org-map-entry a:hover { border-color: var(--org-cyan, #5eb8d4); }

@media (max-width: 1100px) {
  .org-map-layout,
  .org-map-board {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .org-side {
    width: min(100%, var(--org-stage));
    order: 2;
  }
  .org-map-stage,
  .org-pie-wrap { order: 1; }
  .org-detail,
  .org-read {
    order: 3;
    width: min(100%, 40rem);
  }
}
@media (max-width: 720px) {
  .org-map { --org-stage: min(96vw, 420px); }
  .org-map-stage { --orbit: calc(var(--org-stage) * 0.37); }
  .org-tile {
    width: 4.35rem;
    min-height: 4.35rem;
  }
  .org-tile-blurb { display: none; }
  .org-tile-name { font-size: 0.55rem; }
  .org-hub strong { font-size: 0.55rem; }
  .org-hub small { display: none; }
  .org-axis { font-size: 0.5rem; }
}

body.is-guest .top,
body.is-guest .site-foot { display: none; }

body.is-guest .login-gate {
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  width: min(22rem, 100%);
}

.login-card .kicker { display: none; }
.login-card .account-lead { display: block; margin: 0 0 0.85rem; }

.login-card label { display: block; margin: 0.75rem 0 0; }
.login-card label[hidden] { display: none; }
.login-card input { width: 100%; box-sizing: border-box; }
.login-card #seat-enter { width: 100%; margin-top: 1rem; }

.login-links {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
}

.login-links button {
  background: transparent;
  color: var(--dim);
  font-weight: 400;
  min-height: 0;
  padding: 0;
  text-decoration: underline;
}

.corner-dock {
  position: fixed;
  z-index: 70;
  top: 0.7rem;
  right: 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  padding: 0.42rem;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 0.45rem 1.4rem rgba(0, 0, 0, 0.16);
  transition: background 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.corner-dock[hidden] { display: none; }

.dock-btn {
  width: 3.35rem;
  height: 3.35rem;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.dock-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.dock-btn svg { width: 1.7rem; height: 1.7rem; display: block; }

/* Na widoku mapy (LIMEN) dock bierze cyan/panel mapy, żeby nie gryzł się z UI. */
body.is-limen .corner-dock {
  background: color-mix(in srgb, #050d13 92%, #00c8ff 8%);
  border-color: #24536b;
  color: #c9d7e5;
  box-shadow: 0 0.45rem 1.4rem rgba(0, 20, 32, 0.55), 0 0 0 1px rgba(0, 200, 255, 0.12);
}

body.is-limen .dock-btn { color: #c9d7e5; }
body.is-limen .dock-btn:hover {
  background: color-mix(in srgb, #00c8ff 16%, transparent);
  border-color: color-mix(in srgb, #00c8ff 45%, transparent);
}
body.is-limen .gear-list {
  background: #050d13;
  color: #c9d7e5;
  border: 1px solid #173344;
  box-shadow: 0 0.6rem 1.6rem rgba(0, 20, 32, 0.55);
}
body.is-limen .gear-list a,
body.is-limen .gear-list > button { color: #c9d7e5; }

.gear-wrap { position: relative; }

.gear-list {
  position: absolute;
  top: 0;
  bottom: auto;
  right: calc(100% + 0.45rem);
  min-width: 10.5rem;
  max-height: min(70vh, calc(100vh - 4.5rem));
  overflow: auto;
  padding: 0.3rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}

.gear-list[hidden] { display: none; }

.gear-list a,
.gear-list > button {
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  min-height: 2.1rem;
  text-align: left;
  padding: 0.35rem 0.65rem;
}

.gear-options { padding: 0.35rem 0.7rem 0.65rem; }
.gear-options[hidden] { display: none; }
.gear-options .look-switch {
  width: 100%;
  margin: 0.45rem 0 0.2rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  font-size: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.gear-options .look-switch legend {
  padding: 0;
  font-weight: 700;
}
.look-options {
  display: grid;
  gap: 0.15rem;
}
.look-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.38rem 0.45rem;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.look-options input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--table);
}
.look-options label:has(input:checked) {
  border-color: var(--table);
  background: var(--table);
  color: var(--table-ink);
}
.gear-options .site-log {
  margin: 0.55rem 0 0.2rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}
.gear-options .site-log summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  gap: 0.15rem;
  padding: 0.35rem 0.1rem;
}
.gear-options .site-log summary::-webkit-details-marker { display: none; }
.gear-options .site-log-title {
  font-weight: 700;
  font-size: 1rem;
}
.gear-options .site-log-note,
.gear-options .site-log-lead {
  color: var(--dim);
  font-size: 0.82rem;
}
.gear-options .site-log-body {
  max-height: min(50vh, 22rem);
  overflow: auto;
  padding: 0.2rem 0.1rem 0.4rem;
  font-size: 0.88rem;
}
.gear-options .site-log-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}
.gear-options .site-log-body li {
  margin: 0.25rem 0;
}
.gear-options .site-log-body time {
  display: inline-block;
  min-width: 2.6rem;
  margin-right: 0.35rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.gear-options a[hidden] { display: none; }
.gear-options a {
  display: block;
  min-height: 2rem;
  padding: 0.3rem 0.1rem;
  color: var(--ink);
  font-weight: 400;
  text-decoration: none;
}

.gear-list { min-width: 16.5rem; }

body:not(.is-guest) .layout,
body:not(.is-guest).is-log .layout {
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 18rem);
}

@media (min-width: 861px) {
  body:not(.is-guest):has(.roster-side:not([hidden])).is-log .layout {
    grid-template-columns: minmax(11rem, 13.5rem) minmax(0, 1fr) minmax(14rem, 17rem);
  }
}

@media (max-width: 860px) {
  body:not(.is-guest) .layout,
  body:not(.is-guest).is-log .layout {
    grid-template-columns: 1fr;
  }
}

.logout-ask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.logout-ask[hidden] { display: none; }

.logout-ask-card {
  width: min(22rem, calc(100% - 2rem));
  padding: 1.1rem 1.15rem 1rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.28);
}

.logout-ask-card p { margin: 0 0 0.9rem; }

.logout-ask-actions { display: flex; gap: 0.5rem; }
.logout-ask-actions button { flex: 1; }

.org-map-board {
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(20rem, 1.2fr);
  gap: 1.15rem 1.4rem;
  align-items: stretch;
}

.org-pie-wrap {
  width: min(100%, 34rem);
  margin: 0;
  justify-self: center;
  align-self: center;
  position: relative;
}

.org-pie {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0.55rem 1.4rem rgba(0, 0, 0, 0.35));
}

.org-pie-spin {
  transform-origin: 50px 50px;
}

.org-pie-wrap::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(94, 184, 212, 0.22);
  pointer-events: none;
  animation: org-ring-pulse 3.6s ease-in-out infinite;
}

.org-pie-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
  animation: org-glow 4.8s ease-in-out infinite;
}

@keyframes org-ring-pulse {
  0%, 100% { transform: scale(0.98); opacity: 0.45; }
  50% { transform: scale(1.03); opacity: 0.9; }
}

@keyframes org-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 0 0 rgba(94, 184, 212, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(94, 184, 212, 0.28), 0 0 1.4rem rgba(94, 184, 212, 0.18); }
}

.org-slice {
  cursor: pointer;
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.35;
  transform-origin: 50px 50px;
  transition: filter 0.28s ease, stroke-width 0.2s ease, opacity 0.28s ease;
}

.org-slice:hover {
  filter: brightness(1.12);
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 0.55;
}

.org-slice.is-on {
  stroke: #fff;
  stroke-width: 0.9;
  filter: brightness(1.18) drop-shadow(0 0 0.45px #fff);
}

.org-map.has-pick .org-slice:not(.is-on) { opacity: 0.55; }

.org-slice-label,
.org-core-title,
.org-core-sub {
  pointer-events: none;
  font-family: Orbitron, system-ui, "Segoe UI", sans-serif;
}

.org-slice-label {
  fill: #fff;
  font-size: 2.35px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.org-core {
  fill: #12181e;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.45;
  cursor: pointer;
  transition: stroke 0.25s ease, fill 0.25s ease;
}

.org-core:hover,
.org-core.is-on {
  stroke: #5eb8d4;
  fill: #0e151c;
}

.org-core-title {
  fill: #f7f4ee;
  font-size: 3.1px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.org-core-sub {
  fill: rgba(247, 244, 238, 0.78);
  font-size: 2.05px;
}

.org-read {
  width: auto;
  margin: 0;
  min-height: 22rem;
  height: 100%;
  font-size: 1.08rem;
  line-height: 1.62;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #5eb8d4 20%);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--card, #161b22) 92%, #3d8ec8 8%), transparent 42%),
    color-mix(in srgb, var(--card, #12161c) 94%, transparent);
  box-shadow: 0 0.7rem 1.8rem rgba(0, 0, 0, 0.22);
  overflow: auto;
}

.org-detail {
  opacity: 0;
  transform: translateX(0.85rem);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.org-detail.is-open {
  opacity: 1;
  transform: translateX(0);
}

.org-detail-head h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.org-detail-body p { font-size: 1.02rem; }

.wiki-frame .org-map {
  background: #101418;
  color: #f4f7f8;
  padding: 1.1rem 1rem 1.5rem;
}

.wiki-frame .org-read {
  background: #f6f7f8;
  color: #1c2126;
  border-color: rgba(28, 33, 38, 0.18);
  box-shadow: 0 0.55rem 1.4rem rgba(0, 0, 0, 0.12);
}

.wiki-frame .org-read h2,
.wiki-frame .org-read h3,
.wiki-frame .org-read p,
.wiki-frame .org-read li,
.wiki-frame .org-read button {
  color: #1c2126;
}

@media (max-width: 980px) {
  .org-map-board {
    grid-template-columns: 1fr;
  }
  .org-pie-wrap {
    width: min(100%, 28rem);
  }
  .org-read {
    min-height: 16rem;
  }
  .org-detail {
    transform: translateY(0.7rem);
  }
  .org-detail.is-open { transform: translateY(0); }
}

.gear-wrap { padding-top: 0.28rem; margin-top: 0.1rem; border-top: 1px solid var(--line); }

.corner-dock {
  top: auto;
  left: auto;
  right: 0.7rem;
  bottom: 0.7rem;
  width: max-content;
  height: max-content;
  transform: none;
  flex-direction: row;
  align-items: flex-end;
  max-width: none;
  padding: 0;
  gap: 0;
  background: #f4f1ea;
  color: #16130f;
  border: 2px solid #16130f;
  border-radius: 4px;
  box-shadow: 0 0.4rem 1.1rem rgba(0, 0, 0, 0.38);
}
.dock-panel {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.28rem;
  width: max-content;
  max-width: var(--dock-room, 70vw);
  padding: 0.32rem;
  background: #f4f1ea;
  color: #16130f;
  border: 2px solid #16130f;
  border-radius: 4px;
  box-shadow: 0 0.4rem 1.1rem rgba(0, 0, 0, 0.38);
  transform: scaleX(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.corner-dock.is-open .dock-panel,
.corner-dock:focus-within .dock-panel {
  transform: scaleX(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.34s ease, opacity 0.34s ease, visibility 0s;
}
.corner-dock[data-rise="up"][data-grow="left"] .dock-panel {
  right: 0;
  bottom: calc(100% + 0.35rem);
  transform-origin: right bottom;
}
.corner-dock[data-rise="up"][data-grow="right"] .dock-panel {
  left: 0;
  bottom: calc(100% + 0.35rem);
  transform-origin: left bottom;
}
.corner-dock[data-rise="down"][data-grow="left"] .dock-panel {
  right: 0;
  top: calc(100% + 0.35rem);
  transform-origin: right top;
}
.corner-dock[data-rise="down"][data-grow="right"] .dock-panel {
  left: 0;
  top: calc(100% + 0.35rem);
  transform-origin: left top;
}
.corner-dock[data-rise="side"][data-grow="left"] .dock-panel {
  right: calc(100% + 0.35rem);
  top: 0;
  transform-origin: right center;
}
.corner-dock[data-rise="side"][data-grow="right"] .dock-panel {
  left: calc(100% + 0.35rem);
  top: 0;
  transform-origin: left center;
}
.dock-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.dock-launcher-name,
.dock-caption {
  display: block;
  max-width: 6.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.corner-dock[data-axis="col"] .dock-panel,
.corner-dock[data-axis="col"] .dock-icons {
  flex-direction: column;
  align-items: stretch;
}
.corner-dock[data-axis="col"] .dock-icons {
  max-width: none;
  max-height: var(--dock-room, 70vh);
  overflow-x: hidden;
  overflow-y: auto;
}
.corner-dock[data-axis="col"] .dock-icons .dock-btn {
  flex-direction: row;
  justify-content: flex-start;
  min-width: 8.4rem;
  min-height: 2.8rem;
  gap: 0.45rem;
}
.corner-dock[data-axis="col"] .dock-caption,
.corner-dock[data-axis="col"] .dock-launcher-name {
  text-align: left;
}
.dock-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.32rem;
  max-width: var(--dock-room, 70vw);
  overflow-x: auto;
}
.dock-files { position: relative; }
.dock-agents {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.28rem;
  max-width: min(78vw, var(--dock-room, 78vw));
  padding: 0.28rem;
  background: #f4f1ea;
  border: 2px solid #16130f;
  border-radius: 4px;
  box-shadow: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}
.corner-dock[data-rise="down"] .dock-agents {
  top: calc(100% + 0.35rem);
  bottom: auto;
}
.corner-dock[data-rise="up"] .dock-agents,
.corner-dock[data-rise="side"] .dock-agents {
  bottom: calc(100% + 0.35rem);
  top: auto;
}
.corner-dock[data-grow="left"] .dock-agents { right: 0; left: auto; }
.corner-dock[data-grow="right"] .dock-agents { left: 0; right: auto; }
.corner-dock.is-agents .dock-agents {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s;
}
.dock-agent {
  width: 2.4rem;
  height: 2.4rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.dock-agent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dock-agent.is-on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.corner-dock .gear-wrap {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.corner-dock[data-rise="up"] .gear-list {
  top: auto;
  bottom: calc(100% + 0.35rem);
}
.corner-dock[data-rise="down"] .gear-list,
.corner-dock[data-rise="side"] .gear-list {
  top: calc(100% + 0.35rem);
  bottom: auto;
}
.corner-dock[data-grow="left"] .gear-list { right: 0; left: auto; }
.corner-dock[data-grow="right"] .gear-list { left: 0; right: auto; }
.corner-dock .gear-list {
  max-height: min(70vh, calc(100vh - 8rem));
  background: #f4f1ea;
  color: #16130f;
  border: 2px solid #16130f;
}
.corner-dock .gear-list a,
.corner-dock .gear-list > button { color: #16130f; }
.corner-dock.is-open .dock-launcher,
.corner-dock:focus-within .dock-launcher {
  background: #fffdf8;
  animation: none;
}
.corner-dock:not(.is-open):not(:focus-within) .dock-launcher {
  animation: dock-pulse 2.4s ease-out infinite;
}
@keyframes dock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 19, 15, 0.45); }
  70% { box-shadow: 0 0 0 0.55rem rgba(22, 19, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 19, 15, 0); }
}
.dock-agent-new {
  border-style: dashed;
  box-shadow: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #16130f;
  background: #f4f1ea;
}
@media (prefers-reduced-motion: reduce) {
  .dock-launcher { animation: none; }
  .dock-panel,
  .dock-agents { transition: none; }
}

body.is-limen .corner-dock,
body.is-limen .corner-dock .dock-panel,
body.is-limen .corner-dock .dock-agents,
body.is-limen .corner-dock .gear-list,
body.is-wiki .corner-dock,
body.is-wiki .corner-dock .dock-panel,
body.is-wiki .corner-dock .dock-agents,
body.is-wiki .corner-dock .gear-list {
  background: #f4f1ea;
  color: #16130f;
  border-color: #16130f;
}
.corner-dock .dock-btn,
body.is-limen .corner-dock .dock-btn,
body.is-wiki .corner-dock .dock-btn,
body[data-mod="worlds"] .corner-dock #home-btn,
body.is-limen .corner-dock #globe-btn,
body.is-wiki .corner-dock #book-btn,
body[data-mod="kartoteka"] .corner-dock #kartoteka-btn,
body[data-mod="character"] .corner-dock #kartoteka-btn {
  width: auto;
  height: auto;
  min-width: 4.4rem;
  min-height: 3.5rem;
  padding: 0.28rem 0.38rem 0.32rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  color: #16130f;
  background: #f4f1ea;
  border: 2px solid #16130f;
  box-shadow: none;
}
.corner-dock .dock-launcher {
  width: auto;
  height: auto;
  min-width: 5.8rem;
  min-height: 4.7rem;
  padding: 0.38rem 0.5rem 0.42rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  cursor: grab;
  touch-action: none;
}
.corner-dock.is-dragging .dock-launcher { cursor: grabbing; }
.corner-dock .dock-btn svg { width: 1.85rem; height: 1.85rem; }
.corner-dock .dock-btn:hover,
body.is-limen .corner-dock .dock-btn:hover {
  color: #16130f;
  background: #fffdf8;
  border-color: #16130f;
}
body[data-mod="worlds"]:not(.is-limen):not(.is-wiki) .corner-dock #home-btn,
body.is-limen .corner-dock #globe-btn,
body.is-wiki .corner-dock #book-btn,
body[data-mod="kartoteka"]:not(.is-wiki) .corner-dock #kartoteka-btn,
body[data-mod="character"]:not(.is-wiki) .corner-dock #kartoteka-btn {
  background: #16130f;
  color: #f4f1ea;
  border-color: #16130f;
}
.dock-icons {
  flex-wrap: nowrap;
  justify-content: flex-start;
  max-width: var(--dock-room, 70vw);
}
@media (max-width: 860px) {
  .corner-dock .dock-btn { min-width: 4rem; min-height: 3.2rem; }
  .corner-dock .dock-launcher {
    min-width: 5.2rem;
    min-height: 4.3rem;
  }
  .corner-dock .dock-btn svg { width: 1.55rem; height: 1.55rem; }
}
