/* ============================================================
   Dotify — stil dosyası
   ============================================================ */

:root {
  --topbar-h: 62px;
  --bg: #0c0c11;
  --bg-soft: #121219;
  --panel: #15151e;
  --panel-2: #1a1a24;
  --line: #24242f;
  --line-strong: #33333f;
  --tx: #f3f0ea;
  --tx-2: #a3a0b0;
  --tx-3: #6d6a7d;
  --acc: #ff6b4a;
  --acc-2: #8b7cff;
  --acc-3: #2fb37a;
  --danger: #ff5c5c;
  --dot: rgba(255, 255, 255, 0.05);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

[data-theme='light'] {
  --bg: #f6f3ed;
  --bg-soft: #efeae1;
  --panel: #ffffff;
  --panel-2: #f8f5ef;
  --line: #e3ddd2;
  --line-strong: #cfc7b9;
  --tx: #17161b;
  --tx-2: #5b5763;
  --tx-3: #8a8592;
  --acc: #e8542f;
  --acc-2: #6b5cff;
  --acc-3: #1f9c66;
  --danger: #d93a3a;
  --dot: rgba(24, 24, 32, 0.07);
  --shadow: 0 30px 60px -40px rgba(70, 58, 36, 0.4);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--tx);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: rgba(255, 107, 74, 0.3);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--acc-2);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 20px;
}

.tiny {
  font-size: 11.5px;
  color: var(--tx-3);
}
.accent {
  color: var(--acc);
}
.empty {
  color: var(--tx-3);
  font-size: 12.5px;
  margin: 12px 0;
}
.link {
  color: var(--tx-2);
}
.link:hover {
  color: var(--acc);
}

/* ------------------------------ butonlar ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--tx);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.16s, border-color 0.16s, transform 0.12s, color 0.16s;
  white-space: nowrap;
}
.btn:hover {
  background: var(--panel);
  border-color: var(--tx-3);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: linear-gradient(120deg, var(--acc), #ff8a5c);
  border-color: transparent;
  color: #1a0d08;
  font-weight: 700;
}
.btn.primary:hover {
  filter: brightness(1.06);
}
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--tx-2);
}
.btn.ghost:hover {
  color: var(--tx);
  border-color: var(--line-strong);
}
.btn.lg {
  padding: 13px 24px;
  font-size: 14px;
  border-radius: 12px;
}
.btn.sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
}
.btn.wide {
  width: 100%;
}
.btn.on {
  border-color: var(--acc);
  color: var(--acc);
  background: rgba(255, 107, 74, 0.12);
}
.btn.danger {
  border-color: rgba(255, 92, 92, 0.4);
  color: var(--danger);
  background: transparent;
}
.btn.danger:hover {
  background: rgba(255, 92, 92, 0.12);
  border-color: var(--danger);
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  color: var(--tx);
  outline: none;
  font-size: 14px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.input:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.15);
}
.input.sm {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag-input {
  width: 92px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-align: center;
}

.color-input {
  width: 38px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-soft);
  cursor: pointer;
  flex: none;
}

.label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-3);
  margin: 0;
  font-weight: 600;
}
.label.spaced {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-error {
  margin: 0;
  font-size: 12.5px;
  color: var(--danger);
}

/* ------------------------------ üst bar ------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--topbar-h);
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 3px;
}
.brand-mark i {
  border-radius: 50%;
  background: var(--tx-3);
}
.brand-mark i:nth-child(1),
.brand-mark i:nth-child(5),
.brand-mark i:nth-child(9) {
  background: var(--acc);
}
.brand-mark i:nth-child(3),
.brand-mark i:nth-child(7) {
  background: var(--acc-2);
}
.brand-mark i:nth-child(2),
.brand-mark i:nth-child(6) {
  background: var(--acc-3);
}
.brand-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--tx-2);
  transition: background 0.16s, color 0.16s;
}
.nav a:hover {
  color: var(--tx);
  background: var(--panel);
}
.nav a.on {
  color: var(--tx);
  background: var(--panel-2);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12px;
  color: var(--tx-2);
  white-space: nowrap;
}
.pill b {
  color: var(--tx);
  font-weight: 600;
}
.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc-3);
  box-shadow: 0 0 8px var(--acc-3);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
.pill.user {
  cursor: pointer;
  color: var(--tx);
  border-color: var(--line-strong);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill.user:hover {
  border-color: var(--acc);
  color: var(--acc);
}

/* ------------------------------- ana sayfa ---------------------------- */

#view {
  min-height: calc(100dvh - var(--topbar-h));
}

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--topbar-h));
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--tx-3);
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 600;
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0 58px;
  border-bottom: 1px solid var(--line);
}
.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  font-weight: 750;
}
.hero-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--acc), var(--acc-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--tx-2);
  max-width: 54ch;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.72;
}
.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 36px;
  margin: 38px 0 0;
  padding-top: 24px;
  border-top: 1px dashed var(--line-strong);
}
.hero-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats dt {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.hero-stats dd {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--mono);
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at 50% 45%, var(--panel-2), var(--bg-soft));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.hero-art canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--line-strong);
  font-size: 11px;
  color: var(--tx-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
}

.block {
  padding: 54px 0;
  border-bottom: 1px solid var(--line);
}
.block-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.block-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}
.block-head p {
  margin: 0;
  color: var(--tx-3);
  font-size: 13px;
}

/* --------------------------- tek tuval bloğu -------------------------- */

.canvas-cta {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(700px 320px at 8% 0%, rgba(255, 107, 74, 0.12), transparent 68%),
    radial-gradient(600px 320px at 96% 100%, rgba(139, 124, 255, 0.14), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow);
}
.canvas-cta-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.canvas-cta-copy .lead {
  font-size: 14px;
  margin-bottom: 18px;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.meta-row span {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--tx-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--bg-soft);
}

.canvas-preview {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, 0.8);
}
.canvas-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 200;
  image-rendering: pixelated;
}
.preview-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-2);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}

/* -------------------------------- adımlar ----------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.step-no {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--acc);
  font-family: var(--mono);
}
.step h3 {
  margin: 12px 0 6px;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.65;
}

/* ------------------------------- paneller ----------------------------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.callout {
  background:
    radial-gradient(400px 240px at 100% 0%, rgba(139, 124, 255, 0.16), transparent 70%),
    var(--panel);
}
.callout h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.callout p {
  margin: 0;
  font-size: 13px;
  color: var(--tx-2);
  line-height: 1.7;
}
.callout .btn {
  align-self: flex-start;
  margin-top: 4px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rank-row {
  display: grid;
  grid-template-columns: 22px 46px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 13px;
}
.rank-row:nth-child(odd) {
  background: color-mix(in srgb, var(--tx) 3%, transparent);
}
.rank-row.me {
  background: rgba(255, 107, 74, 0.1);
}
.rank-no {
  color: var(--tx-3);
  font-size: 11px;
  font-family: var(--mono);
}
.rank-tag {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-family: var(--mono);
}
.rank-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-px {
  color: var(--tx-2);
  font-size: 12px;
  font-family: var(--mono);
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 0 8px;
  margin-top: auto;
  font-size: 11.5px;
  color: var(--tx-3);
  flex-wrap: wrap;
}
.foot-brand {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--tx-2);
}

/* -------------------------------- oyun -------------------------------- */

.play {
  height: calc(100dvh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.play-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  height: 50px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  flex: none;
}
.back {
  font-size: 12px;
  color: var(--tx-2);
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.back:hover {
  color: var(--tx);
  border-color: var(--line-strong);
}
.play-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
}
.canvas-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
}
.play-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cooldown {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
}
.cd-label {
  font-size: 11px;
  color: var(--tx-2);
  min-width: 40px;
  text-align: right;
  font-family: var(--mono);
}
.cd-bar {
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.cd-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--acc);
  transition: width 0.1s linear;
}
.cooldown.ready {
  border-color: rgba(47, 179, 122, 0.45);
}
.cooldown.ready .cd-label {
  color: var(--acc-3);
}
.cooldown.ready .cd-bar i {
  background: var(--acc-3);
}

.play-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.stage-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.stage-wrap {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, var(--panel), var(--bg) 74%);
  touch-action: none;
}
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}
.stage-canvas.busy {
  cursor: not-allowed;
}
.stage-hud {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.coords {
  font-size: 11px;
  color: var(--tx-2);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px 8px;
  letter-spacing: 0.05em;
  font-family: var(--mono);
  backdrop-filter: blur(6px);
}
.coords b {
  color: var(--tx);
  font-weight: 600;
}
.mini-wrap {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.9);
}
.mini {
  display: block;
  width: 152px;
  height: auto;
  image-rendering: pixelated;
  cursor: pointer;
}
.mini-label {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tx-2);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  padding: 1px 6px;
  pointer-events: none;
}

.toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.color-btn {
  gap: 8px;
}
.color-dot {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--acc);
}

/* Palet haritanın üzerinde durur (arka plansız) ve akıcı açılır/kapanır */
.palette-panel {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 6;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transform-origin: left bottom;
  transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.22, 0.9, 0.25, 1),
    visibility 0s linear 0.26s;
}
.palette-panel.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 0.9, 0.25, 1), visibility 0s;
}
.palette {
  display: grid;
  grid-template-columns: repeat(7, 24px);
  gap: 5px;
}
.swatch {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  padding: 0;
  box-shadow: 0 2px 7px -2px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s;
}
.swatch:hover {
  transform: scale(1.18);
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.6);
}
.swatch.erase,
.color-dot.erase {
  background:
    linear-gradient(45deg, transparent 44%, #e60000 44%, #e60000 56%, transparent 56%),
    repeating-conic-gradient(#d8d8d8 0% 25%, #ffffff 0% 50%) 0 0 / 8px 8px;
}
.swatch.on {
  outline: 2px solid var(--tx);
  outline-offset: 1px;
  z-index: 3;
}
.toolbar-right {
  display: flex;
  gap: 6px;
  flex: none;
  margin-left: auto;
}

/* ------------------------------ kenar çubuğu -------------------------- */

.side {
  width: 336px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tabs button {
  flex: 1;
  padding: 12px 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--tx-3);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tabs button:hover {
  color: var(--tx-2);
  background: color-mix(in srgb, var(--tx) 3%, transparent);
}
.tabs button.on {
  color: var(--tx);
  border-bottom-color: var(--acc);
}
.side-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.chat-row {
  display: grid;
  grid-template-columns: 38px auto 1fr;
  gap: 7px;
  align-items: baseline;
  font-size: 12.5px;
  line-height: 1.5;
}
.chat-time {
  color: var(--tx-3);
  font-size: 10px;
  font-family: var(--mono);
}
.chat-name {
  color: var(--acc-2);
  font-size: 11.5px;
  font-weight: 600;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-text {
  color: var(--tx-2);
  word-break: break-word;
}
.chat-form {
  display: flex;
  gap: 6px;
  flex: none;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* --------------------------- sağ tık menüsü ------------------------- */

.ctx-menu {
  position: fixed;
  z-index: 80;
  min-width: 150px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}
.ctx-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.ctx-item:hover {
  background: color-mix(in srgb, var(--tx) 8%, transparent);
}

/* -------------------------------- klan -------------------------------- */

.clan-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.my-clan {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.my-clan-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.my-clan-meta {
  min-width: 0;
}
.clan-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0d0b10;
  background: transparent;
  font-family: var(--mono);
}
.clan-tag.big {
  min-width: 64px;
  height: 42px;
  font-size: 15px;
}
.clan-create,
.clan-join {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.clan-pending {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.clan-pending .btn {
  align-self: flex-start;
}
.clan-requests {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.clan-req {
  display: flex;
  align-items: center;
  gap: 7px;
}
.clan-req-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.clan-gate {
  margin: 0;
  font-size: 11.5px;
  color: var(--tx-2);
  line-height: 1.5;
}
.gate-bar {
  height: 5px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}
.gate-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  transition: width 0.2s;
}
.clan-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.clan-row {
  display: grid;
  grid-template-columns: 8px 38px 1fr 30px 52px;
  align-items: center;
  gap: 8px;
  padding: 6px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.clan-row:nth-child(odd) {
  background: color-mix(in srgb, var(--tx) 3%, transparent);
}
.clan-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.clan-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-row-num {
  color: var(--tx-3);
  font-size: 11px;
  text-align: right;
  font-family: var(--mono);
}

/* ----------------------------- klanlar sayfası ------------------------ */

.page-head {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.6vw, 52px);
  letter-spacing: -0.04em;
}
.page-head .lead {
  margin: 0;
  max-width: 62ch;
}
.clan-page-panel {
  margin-top: 26px;
  padding: 24px;
  max-width: 780px;
}
.clan-page-panel .clan-panel {
  gap: 16px;
}
.clan-page-panel .clan-tag {
  background: transparent;
}

/* -------------------------------- kapı -------------------------------- */

.gate-wrap {
  min-height: calc(100dvh - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.gate-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  padding: 34px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.gate-card h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.gate-card p {
  margin: 0;
  color: var(--tx-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.gate-dots {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  gap: 6px;
}
.gate-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--acc);
}
.gate-dots i:nth-child(2),
.gate-dots i:nth-child(6) {
  background: var(--acc-2);
}
.gate-dots i:nth-child(3),
.gate-dots i:nth-child(7) {
  background: var(--acc-3);
}
.gate-dots i:nth-child(5) {
  background: var(--tx-3);
}

/* ------------------------------- modaller ----------------------------- */

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 6, 10, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s linear 0.26s;
}
.modal-back.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.24s ease, visibility 0s;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.3s cubic-bezier(0.22, 0.9, 0.25, 1);
}
.modal-back.open .modal {
  opacity: 1;
  transform: none;
}
.modal-brand {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
}
.modal-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.modal-x {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--tx-3);
  font-size: 20px;
  line-height: 1;
}
.modal-x:hover {
  color: var(--tx);
  border-color: var(--line-strong);
}
.modal-hint {
  margin: 0;
  font-size: 11px;
  color: var(--tx-3);
  text-align: center;
  line-height: 1.6;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.auth-tabs button {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--tx-2);
  font-size: 13px;
  font-weight: 600;
}
.auth-tabs button.on {
  background: var(--panel-2);
  color: var(--tx);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.6);
}

#authForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-weight: 600;
}

.captcha {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--bg-soft);
}
.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.link-btn {
  border: none;
  background: transparent;
  color: var(--acc-2);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
}
.link-btn:hover {
  text-decoration: underline;
}
.captcha-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--tx-2);
}
.captcha-digits {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 4px 0;
}
.captcha-digits span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 46px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 23px;
  font-weight: 700;
  transform: rotate(var(--rot, 0deg)) translateY(var(--dy, 0));
  user-select: none;
}
.captcha-input {
  text-align: center;
  letter-spacing: 0.4em;
  font-family: var(--mono);
}
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------- ayarlar ------------------------------ */

.setting {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--tx-2);
  font-size: 12.5px;
  font-weight: 500;
}
.seg button:hover {
  color: var(--tx);
}
.seg button.on {
  background: var(--panel-2);
  color: var(--tx);
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.6);
}
.account-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------- bildirim ----------------------------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--tx);
  font-size: 13px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s, transform 0.24s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------ duyarlılık ---------------------------- */

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px 0;
  }
  .hero-art {
    max-width: 460px;
  }
  .canvas-cta {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .side {
    width: 290px;
  }
}

/* --- tablet --- */

@media (max-width: 860px) {
  .topbar {
    gap: 10px;
    padding: 0 14px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .brand-text {
    font-size: 15px;
  }
  .topbar-right {
    gap: 6px;
  }
  .pill {
    padding: 4px 9px;
  }
  .pill.user {
    max-width: 132px;
  }
  .page {
    padding: 0 16px 18px;
  }
  .hero-copy h1 {
    font-size: clamp(34px, 9vw, 46px);
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 26px;
  }
  .steps {
    grid-template-columns: 1fr;
  }

  .play {
    height: auto;
    min-height: calc(100dvh - var(--topbar-h));
    overflow: visible;
  }
  .play-head {
    height: auto;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .play-body {
    flex-direction: column;
  }
  .stage-col {
    height: auto;
    flex: none;
  }
  .stage-wrap {
    height: 52dvh;
    min-height: 240px;
    flex: none;
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }
  .palette {
    grid-template-columns: repeat(7, 20px);
    gap: 5px;
  }
  .toolbar-right {
    margin-left: auto;
  }
  .side {
    width: 100%;
    height: auto;
    min-height: 46dvh;
    max-height: 70dvh;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .side-body {
    padding: 10px;
  }
  .mini {
    width: 96px;
  }
  .mini-wrap {
    right: 8px;
    bottom: 8px;
  }
  .stage-hud {
    left: 8px;
    top: 8px;
  }
  .chat-row {
    grid-template-columns: 34px auto 1fr;
    gap: 6px;
  }
  .chat-name {
    max-width: 88px;
  }
  .modal-back {
    padding: 14px;
  }
  .page-head {
    padding: 34px 0 24px;
  }
}

/* --- telefon --- */

@media (max-width: 620px) {
  :root {
    --topbar-h: 54px;
  }
  .topbar {
    gap: 8px;
    padding: 0 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .brand-text {
    display: none;
  }
  #loginBtn,
  #settingsBtn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .pill.user {
    max-width: 112px;
  }

  .play-title .tiny {
    display: none;
  }
  .play-meta {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .play-meta .pill.mine {
    display: none;
  }
  .cooldown {
    margin-left: auto;
  }
  .stage-wrap {
    height: 46dvh;
    min-height: 220px;
  }
  .palette-panel {
    left: 8px;
    bottom: 8px;
  }
  .palette {
    grid-template-columns: repeat(7, 18px);
    gap: 4px;
  }
  .side {
    min-height: 50dvh;
    max-height: 78dvh;
  }
  .tabs button {
    padding: 12px 4px;
    font-size: 11px;
  }

  .input,
  select.input {
    font-size: 16px;
    height: 44px;
  }
  .input.sm {
    font-size: 15px;
    height: 38px;
  }
  .btn.sm {
    padding: 8px 12px;
    font-size: 12.5px;
    min-height: 36px;
  }

  .modal-back {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: none;
    width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(40px);
  }
  .profile-modal {
    max-width: none;
  }
  .profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .profile-grid b {
    font-size: 13px;
  }
  .captcha-digits {
    gap: 6px;
  }
  .captcha-digits span {
    width: 34px;
    height: 42px;
    font-size: 20px;
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: none;
    align-items: stretch;
  }
  .toast {
    text-align: center;
  }
  .hero-stats dd {
    font-size: 20px;
  }
  .canvas-cta {
    padding: 20px;
  }
  .clan-page-panel {
    padding: 16px;
  }
  .gate-card {
    padding: 26px 20px;
  }
}

@media (max-width: 400px) {
  .topbar {
    padding: 0 8px;
    gap: 6px;
  }
  #settingsBtn {
    font-size: 11.5px;
  }
  .pill {
    font-size: 11.5px;
    padding: 4px 8px;
  }
  .play-head {
    padding: 7px 9px;
  }
  .palette {
    grid-template-columns: repeat(7, 16px);
    gap: 4px;
  }
  .cd-bar {
    width: 48px;
  }
  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (hover: none) {
  .swatch:hover {
    transform: none;
  }
}

/* ------------------------- sayfa geçiş animasyonu --------------------- */

#view.view-enter {
  animation: viewIn 0.32s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #view.view-enter {
    animation: none;
  }
  .modal,
  .modal-back,
  .palette-panel {
    transition: none;
  }
}

/* ------------------------------- bayraklar ---------------------------- */

.flag {
  display: inline-block;
  width: 20px;
  height: 15px;
  flex: none;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  vertical-align: middle;
}
.flag.lg {
  width: 44px;
  height: 33px;
  border-radius: 5px;
}
.select-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}
.select-wrap select {
  flex: 1;
  min-width: 0;
}
.pill.user .flag {
  width: 18px;
  height: 13px;
}
.profile-flag .flag {
  width: 44px;
  height: 33px;
}
.chat-name .flag {
  width: 15px;
  height: 11px;
  margin-right: 4px;
  vertical-align: -1px;
}
.rank-name .flag {
  width: 16px;
  height: 12px;
  margin-right: 5px;
  vertical-align: -1px;
}
.account-line .flag {
  width: 16px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* ------------------------------ ülke seçimi --------------------------- */

select.input {
  height: 40px;
  padding-right: 30px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--tx-3) 50%),
    linear-gradient(135deg, var(--tx-3) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select.input option {
  background: var(--panel);
  color: var(--tx);
}

/* -------------------------------- sohbet ------------------------------ */

.chat-who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 152px;
}
button.chat-name {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
button.chat-name:hover {
  color: var(--acc);
  text-decoration: underline;
}
.chat-row.me .chat-name {
  color: var(--acc);
}
.chat-tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 15px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--line-strong);
  color: #0d0b10;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* -------------------------------- profil ------------------------------ */

.profile-modal {
  max-width: 380px;
  gap: 18px;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 30px;
  line-height: 1;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.profile-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-grid b {
  font-size: 14px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------- dokunmatik ince ayar ---------------------- */

@media (max-width: 620px) {
  select.input {
    height: 44px;
    background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  }
}

/* ------------------------------- anonim ------------------------------- */

.pill.anon {
  color: var(--acc);
  border-color: rgba(255, 107, 74, 0.4);
}
.clan-lock {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--bg-soft);
}
.clan-lock .btn {
  align-self: flex-start;
}

/* ---------------------- klan sohbeti / özel mesaj --------------------- */

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--acc);
  color: #0d0b10;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 1px;
}
.tab-badge[hidden] {
  display: none;
}
.tabs button {
  padding-left: 2px;
  padding-right: 2px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.dm-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}
.dm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.dm-who {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dm-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  font-family: inherit;
  color: var(--tx-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.dm-row:hover {
  background: color-mix(in srgb, var(--tx) 4%, transparent);
}
.dm-row.unread {
  border-color: var(--acc);
}
.dm-row.unread .dm-name {
  color: var(--acc);
}
.dm-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.dm-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tx);
}
.dm-name .flag {
  width: 15px;
  height: 11px;
  margin-right: 4px;
  vertical-align: -1px;
}
.dm-last {
  font-size: 12px;
  color: var(--tx-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-dm {
  margin-top: 14px;
}
.profile-dm[hidden] {
  display: none;
}

/* ------------------- susturma, klan bilgileri, piksel sahibi ------------------- */

.chat-mute {
  flex: none;
  margin: 6px 0 0;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}
.chat-mute[hidden] {
  display: none;
}

.ctx-by,
.ctx-erased {
  margin: 0;
  padding: 6px 10px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--tx-3);
  font-size: 11.5px;
}
.ctx-by b,
.ctx-erased b {
  color: var(--tx);
  font-weight: 700;
}
.ctx-by[hidden],
.ctx-erased[hidden],
.ctx-item[hidden] {
  display: none;
}

.my-clan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.clan-row.clickable {
  cursor: pointer;
}
.clan-row.clickable:hover {
  background: color-mix(in srgb, var(--tx) 8%, transparent);
}

.clan-desc-input {
  resize: vertical;
  min-height: 52px;
  font-family: inherit;
  line-height: 1.4;
}
.clan-desc-count {
  margin: -6px 0 0;
  text-align: right;
}
.clan-desc-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.clan-desc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.clan-desc-actions {
  justify-content: flex-end;
}
.clan-desc-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tx-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.clan-desc-text.empty {
  color: var(--tx-3);
  font-style: italic;
}
.clan-desc-text.preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clan-info-modal {
  max-width: 440px;
}
.clan-info-title {
  margin: 0;
  overflow-wrap: anywhere;
}
.clan-member-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 260px;
  overflow-y: auto;
}
.clan-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}
.clan-member:nth-child(odd) {
  background: color-mix(in srgb, var(--tx) 3%, transparent);
}
.clan-member-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-leader-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--acc) 22%, transparent);
  color: var(--acc);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.clan-member-px {
  flex: none;
  color: var(--tx-3);
  font-family: var(--mono);
  font-size: 11px;
}

/* ---------------------- ad değiştirme, klandan ayrılma onayı ---------------------- */

.name-edit {
  display: flex;
  gap: 8px;
}
.name-edit .input {
  flex: 1;
  min-width: 0;
}
.name-left {
  color: var(--tx-2);
  font-weight: 600;
}
.name-left.empty {
  color: var(--danger);
}
.name-edit .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.clan-leave-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.clan-leave-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}
.clan-leave-confirm p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.clan-leave-confirm .tiny {
  font-weight: 400;
}
.chat-form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------ yönetici ------------------------------- */

.pill.ban {
  border-color: rgba(255, 92, 92, 0.5);
  color: var(--danger);
  background: rgba(255, 92, 92, 0.08);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.admin-durs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-durs .btn {
  flex: 1 1 auto;
}
.admin-note {
  margin: 0;
  line-height: 1.45;
}
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.admin-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.admin-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-name .flag {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  flex: none;
}
.admin-sub {
  color: var(--tx-3);
  font-size: 10.5px;
  white-space: nowrap;
  font-family: var(--mono);
}
.admin-status {
  margin: 0;
  color: var(--danger);
  font-size: 11px;
}
.admin-actions {
  display: flex;
  gap: 6px;
}
.admin-actions .btn {
  flex: 1 1 0;
}

/* -------------------------------- market -------------------------------- */

.pill.gold {
  border-color: rgba(255, 209, 102, 0.45);
  background: rgba(255, 209, 102, 0.08);
  color: #ffd166;
}
.pill.gold b {
  color: #ffd166;
}
.pill.gold .coin {
  color: #ffd166;
  font-size: 10px;
}

.chat-badge {
  color: #ffd166;
  font-size: 9px;
  margin-left: 3px;
  vertical-align: 1px;
}

.market {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.market-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  font-size: 12px;
  color: var(--tx-2);
}
.market-balance b {
  font-size: 18px;
  color: #ffd166;
  font-family: var(--mono);
}
.market-coin {
  color: #ffd166;
  font-size: 10px;
}
.market-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.market-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.market-card.clan {
  border-style: dashed;
}
.market-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.market-name {
  font-size: 12.5px;
  font-weight: 600;
}
.market-price {
  color: #ffd166;
  font-size: 11px;
  font-family: var(--mono);
  white-space: nowrap;
}
.market-desc {
  margin: 0;
  color: var(--tx-2);
  font-size: 11.5px;
  line-height: 1.45;
}
.market-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.market-actions .btn {
  flex: 1 1 auto;
}
.market-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.market-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}
.market-swatch.on {
  border-color: var(--tx);
}
