.control-dialog,
.catalog-dialog {
  background: #0b120f;
  color: #eef5eb;
  border: 1px solid #334138;
  padding: 38px;
  width: min(880px, 94vw);
  max-height: 92svh;
  margin: auto;
  box-shadow: 0 40px 150px #0009;
  border-radius: 4px;
}
.control-dialog::backdrop,
.catalog-dialog::backdrop {
  background: #020704e6;
  backdrop-filter: blur(12px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.dialog-top .icon-button {
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
}
.control-dialog h2,
.catalog-dialog h2 {
  font-family: Barlow, sans-serif;
  font-size: 52px;
  line-height: 1;
  margin: 22px 0;
  letter-spacing: -0.8px;
}
.control-dialog h2 span,
.catalog-dialog h2 span {
  color: var(--lime);
}
.connection-status {
  font-size: 12px;
  color: #bbd2bc;
  border-block: 1px solid #ffffff16;
  padding: 15px 0;
  margin-bottom: 24px;
}
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 25px;
}
.mode-switch label {
  cursor: pointer;
  position: relative;
}
.mode-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
}
.mode-switch span {
  display: block;
  border: 1px solid #425246;
  padding: 20px;
  font:
    bold 26px Barlow,
    sans-serif;
}
.mode-switch small {
  display: block;
  font:
    11px Manrope,
    sans-serif;
  color: #9eaba1;
  margin-top: 5px;
}
.mode-switch input:checked + span {
  background: #c6ff3a12;
  border-color: var(--lime);
  color: var(--lime);
}
.mode-switch input:focus-visible + span {
  outline: 2px solid white;
  outline-offset: 3px;
}
.setup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 12px;
}
.setup-grid label,
.catalog-filters label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #b8c6ba;
  font-size: 11px;
}
.setup-grid input,
.setup-grid select,
.catalog-filters input,
.catalog-filters select {
  width: 100%;
  min-height: 44px;
  background: #15211a;
  border: 1px solid #34463a;
  color: #fff;
  padding: 11px;
  font:
    12px Manrope,
    sans-serif;
  border-radius: 2px;
  color-scheme: dark;
}
.auto-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin: 25px 0 18px;
}
.auto-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
}
.setup-help {
  font-size: 11px;
  color: #9eaba1;
  line-height: 1.8;
}
.setup-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 25px;
}
.setup-actions .button {
  min-height: 50px;
  font-size: 10px;
}
.setup-actions .control-button {
  font-size: 9px;
}
#setup-error {
  font-size: 12px;
  color: #ffd5a9;
  min-height: 18px;
  margin-top: 15px;
}
.toast {
  position: fixed;
  z-index: 1000;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 17px 24px;
  background: var(--lime);
  color: #0b120f;
  font-size: 12px;
  max-width: 90vw;
  border-radius: 3px;
  box-shadow: 0 10px 50px #0008;
}
.catalog-dialog {
  width: min(1220px, 94vw);
}
.catalog-filters {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  align-items: end;
  gap: 15px;
}
.catalog-filters .button {
  min-height: 44px;
  font-size: 10px;
}
#catalog-summary {
  font-size: 12px;
  color: #abc3ae;
  margin: 25px 0;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 32px 16px;
  min-height: 260px;
}
.catalog-item {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s;
}
.catalog-item:hover {
  transform: translateY(-7px);
}
.catalog-item > span {
  font-size: 9px;
  color: #b6c9ba;
  display: block;
  margin-top: 12px;
}
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid #ffffff20;
  font-size: 12px;
}
.catalog-source {
  font-size: 10px;
  color: #96a89a;
  line-height: 1.8;
  margin: 24px 0 0;
}
.live-card {
  color: var(--card-ink);
  position: relative;
}
.live-card .card-stats,
.live-card .card-rating,
.live-card .card-name {
  color: inherit;
}
.live-card .card-face {
  object-fit: contain;
}
.live-card .card-badges {
  gap: 8%;
  justify-content: center;
}
.live-card .card-badges img {
  max-width: 16%;
  height: 100%;
  object-fit: contain;
}
.live-card.concealed .card-frame {
  filter: brightness(0.72) saturate(0.8);
}
/* Gizli kart: metin ve silüet çerçevenin kendi mürekkep rengini kullanır (altın koyu, hero açık). */
.live-card.concealed .card-name,
.live-card.concealed .card-rating,
.live-card.concealed .card-stats {
  color: var(--card-ink, #332b17);
  text-shadow: 0 0.3cqw 0.8cqw #00000022;
}
.unknown-player {
  position: absolute;
  left: 22%;
  top: 17.65%;
  width: 64.285%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.unknown-player svg {
  position: absolute;
  inset: 4% 8% 0;
  width: 84%;
  height: 96%;
  fill: var(--card-ink, #332b17);
  opacity: 0.82;
  filter: drop-shadow(0 1cqw 1.5cqw #0000002e);
}
.unknown-player b {
  position: relative;
  z-index: 1;
  margin-top: 6%;
  color: #ffffffd9;
  font:
    900 7cqw Barlow,
    sans-serif;
  text-shadow: 0 0.4cqw 1cqw #0006;
  animation: questionPulse 2.8s ease-in-out infinite;
}
.card-hero .unknown-player b,
.card-special .unknown-player b {
  color: #1a1a1acc;
  text-shadow: 0 0.3cqw 1cqw #ffffff55;
}
@keyframes questionPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}
/* Küçük kartlarda (Rush, mobil) sayılar okunur kalsın. */
@container (max-width: 200px) {
  .card-stats span {
    font-size: 7.6cqw;
  }
  .card-stats small {
    font-size: 5cqw;
  }
  .card-name {
    font-size: 10.5cqw;
  }
  .fc-card.concealed .card-name {
    font-size: 6.9cqw;
    letter-spacing: 0.3cqw;
  }
}
.card-winner {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #c6ff3a60;
  background: #101e14;
  color: #efffe7;
  font-size: 10px;
  padding: 8px 14px;
  border-radius: 2px;
  white-space: nowrap;
  z-index: 5;
}
.card-winner b {
  color: var(--lime);
  margin-left: 10px;
}
.live-board {
  border-top: 1px solid #ffffff20;
  padding-top: 20px;
  margin-top: auto;
}
.live-board h3 {
  font-size: 9px;
  letter-spacing: 2px;
  margin: 0 0 16px;
  color: #9db6a3;
}
.live-board ol,
.alltime ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.live-board li,
.alltime li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 12px;
}
.live-board li b,
.alltime li b {
  font-size: 11px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-board strong,
.alltime strong {
  margin-left: auto;
  color: var(--lime);
  font:
    bold 22px Barlow,
    sans-serif;
}
.rank {
  color: #65806d;
  font-size: 9px;
}
.board-empty {
  color: #9bb0a1;
  font-size: 10px !important;
  line-height: 1.7;
}
.alltime {
  margin-top: 20px;
  border-top: 1px solid #ffffff16;
  padding-top: 16px;
}
.alltime summary {
  font-size: 8px;
  letter-spacing: 1px;
  color: #a9c1af;
  cursor: pointer;
}
.chat-log {
  max-height: 250px;
  min-height: 140px;
}
.overlay-body {
  overflow: hidden;
}
.overlay-game {
  width: 100vw;
  height: 100vh;
  position: fixed;
  inset: 0;
  border: 0;
  background: #07100c;
}
.overlay-body .game-header {
  justify-content: center;
}
.overlay-body .game-content {
  padding-top: 25px;
}
.overlay-body .game-cards {
  height: calc(100vh - 280px);
}
.overlay-body .game-cards.rush-grid {
  height: calc(100vh - 280px);
}
.overlay-body .rush-grid .game-card-slot {
  width: min(215px, calc((100vh - 360px) * 0.35));
}
.overlay-body .alltime {
  display: none;
}
.overlay-body .chat-panel {
  max-height: calc(100vh - 190px);
}
.detail-intro {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 36px;
  align-items: center;
}
.detail-intro h2 {
  font-size: 44px;
}
.detail-intro p {
  font-size: 12px;
  line-height: 1.9;
  color: #abbcad;
}
.detail-stars {
  font-size: 10px;
  color: var(--lime);
  margin-block: 20px;
}
.detail-intro .text-link {
  font-size: 10px;
}
.attribute-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 30px;
}
.attribute-grid > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff18;
  padding: 8px 0;
  font-size: 11px;
}
.attribute-grid span {
  text-transform: capitalize;
  color: #adc1b2;
}
.attribute-grid b {
  color: var(--lime);
}
.image-missing {
  visibility: hidden;
}
.platform-note {
  font-size: 9px;
  color: #a5baaa;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}
@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .setup-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .control-dialog,
  .catalog-dialog {
    padding: 24px;
  }
  .detail-intro {
    grid-template-columns: 180px 1fr;
    gap: 20px;
  }
  .game-content {
    padding-top: 20px;
  }
  .chat-log {
    max-height: 160px;
  }
}
@media (max-width: 600px) {
  .control-dialog h2,
  .catalog-dialog h2 {
    font-size: 38px;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
  }
  .catalog-filters {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-filters label:first-child {
    grid-column: 1/-1;
  }
  .catalog-filters .button {
    padding: 12px;
  }
  .mode-switch span {
    font-size: 23px;
    padding: 15px;
  }
  .setup-grid {
    gap: 16px 10px;
  }
  .detail-intro {
    display: flex;
    flex-direction: column;
  }
  .detail-intro > .fc-card {
    width: 210px;
  }
  .attribute-grid {
    grid-template-columns: 1fr 1fr;
  }
  .setup-actions {
    gap: 18px;
  }
  .auto-option {
    font-size: 10px;
  }
  .card-winner {
    font-size: 7px;
    padding: 5px 8px;
  }
  .card-winner b {
    margin-left: 4px;
  }
  .live-board {
    margin-top: 12px;
  }
  .game-controls {
    gap: 15px;
  }
  .chat-log {
    min-height: 80px;
  }
  .control-dialog {
    max-height: 94svh;
  }
  .catalog-pagination .control-button {
    font-size: 8px;
  }
}
html:has(dialog[open]) {
  overflow: hidden;
}
@media (min-width: 901px) {
  /* Kart + harf tahtası + kazanan etiketi sahne yüksekliğine sığar. */
  .game-cards:not(.rush-grid) .game-card-slot {
    width: min(340px, calc((100svh - 420px) * 0.6));
  }
}
.live-card.portrait-full .card-face {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  aspect-ratio: 252/350;
}
.live-card.portrait-full .card-face {
  mask-image: linear-gradient(#000 50%, transparent 69%);
}
/* ---------- v2: harf tahtası, katman rozeti, sıralama sekmeleri, deneme şeridi ---------- */
:root {
  --tier-legend: #ffd35a;
  --tier-star: #c6ff3a;
  --tier-known: #5be3ff;
  --tier-squad: #ff9f4a;
  --tier-expert: #ff6ad5;
}
[data-tier='legend'] {
  --tier: var(--tier-legend);
}
[data-tier='star'] {
  --tier: var(--tier-star);
}
[data-tier='known'] {
  --tier: var(--tier-known);
}
[data-tier='squad'] {
  --tier: var(--tier-squad);
}
[data-tier='expert'] {
  --tier: var(--tier-expert);
}
.game-card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.game-card-slot > .fc-card {
  width: 100%;
}
.game-card-slot .card-winner {
  position: static;
  transform: none;
  margin-top: -2px;
}
.game-card-slot.solved:after {
  bottom: auto;
  top: 3%;
  right: 5%;
}
.tier-badge {
  position: absolute;
  top: 3.5%;
  left: 6%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 5px;
  border-radius: 2px;
  background: #07100ce0;
  border: 1px solid color-mix(in srgb, var(--tier, var(--lime)) 55%, transparent);
  color: var(--tier, var(--lime));
  font:
    700 10px Barlow,
    sans-serif;
  letter-spacing: 1.6px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.tier-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tier, var(--lime));
  box-shadow: 0 0 10px var(--tier, var(--lime));
}
.rush-grid .tier-badge {
  font-size: 8px;
  padding: 4px 7px 3px;
  gap: 5px;
  letter-spacing: 1px;
}
.catalog-item {
  position: relative;
}
.catalog-item .tier-badge {
  top: auto;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  padding: 4px 8px 3px;
}
.detail-intro .tier-badge {
  position: static;
  vertical-align: middle;
}
.letter-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: max-content;
  max-width: min(calc(100% + 140px), 96vw);
  min-height: 42px;
  perspective: 700px;
}
.letter-board.n10 .tile {
  --w: 24px;
  --h: 32px;
}
.letter-board.n14 .tile {
  --w: 19px;
  --h: 26px;
}
.overlay-body .letter-board.n10 .tile {
  --w: 27px;
  --h: 36px;
}
.overlay-body .letter-board.n14 .tile {
  --w: 21px;
  --h: 28px;
}
.rush-grid .letter-board.n10 .tile {
  --w: 14px;
  --h: 20px;
}
.rush-grid .letter-board.n14 .tile {
  --w: 11px;
  --h: 16px;
}
.tile {
  --w: 30px;
  --h: 40px;
  width: var(--w);
  height: var(--h);
  display: grid;
  place-items: center;
  border-radius: 3px;
  border: 1px solid #ffffff1c;
  background: linear-gradient(#141f18, #0b120f);
  color: #4f6555;
  font:
    900 calc(var(--h) * 0.6) Barlow,
    sans-serif;
  line-height: 1;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}
.tile.gap {
  width: calc(var(--w) * 0.45);
  border: 0;
  background: none;
}
.tile.punct {
  width: calc(var(--w) * 0.5);
  border: 0;
  background: none;
  color: #9db6a3;
}
.tile.hidden {
  animation: tilePulse 2.6s ease-in-out infinite;
}
.tile.revealed {
  color: var(--lime);
  border-color: #c6ff3a66;
  background: linear-gradient(#1a2a17, #0d160f);
  box-shadow:
    0 0 0 1px #c6ff3a1a,
    0 0 18px #c6ff3a2e,
    inset 0 -2px 0 #c6ff3a33;
  text-shadow: 0 0 12px #c6ff3a77;
}
.tile.flip {
  animation: tileFlip 0.55s var(--ease) both;
}
.letter-board.complete .tile.revealed {
  color: #f4ffe0;
  border-color: #c6ff3a88;
}
.letter-board.complete .tile.sweep {
  animation: tileSweep 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
.rush-grid .tile {
  --w: 18px;
  --h: 25px;
}
.rush-grid .letter-board {
  gap: 3px;
  min-height: 26px;
}
.overlay-body .tile {
  --w: 34px;
  --h: 46px;
}
.overlay-body .rush-grid .tile {
  --w: 20px;
  --h: 28px;
}
@keyframes tileFlip {
  0% {
    transform: rotateX(-92deg) translateY(-6px);
    background: var(--lime);
    color: #0b120f;
    text-shadow: none;
  }
  55% {
    transform: rotateX(14deg);
    background: var(--lime);
    color: #0b120f;
  }
  100% {
    transform: rotateX(0);
  }
}
@keyframes tileSweep {
  0% {
    transform: translateY(8px) scale(0.85);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@keyframes tilePulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 0 #c6ff3a00;
    color: #4f6555;
  }
  50% {
    box-shadow: inset 0 0 14px 0 #c6ff3a22;
    color: #7c9a84;
  }
}
/* Gümüş kart: altın çerçeve gri tonlanır. */
.card-silver .card-frame {
  filter: grayscale(1) brightness(1.18) contrast(1.05);
}
.live-card.concealed.card-silver .card-frame {
  filter: grayscale(1) brightness(0.8);
}
.card-silver .card-rating,
.card-silver .card-name,
.card-silver .card-stats {
  color: #2b3038;
}
.board-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid #ffffff14;
}
.board-tab {
  flex: 1;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 4px 10px;
  color: #7f9686;
  font:
    700 9px Barlow,
    sans-serif;
  letter-spacing: 1.8px;
  transition:
    color 0.25s,
    border-color 0.25s;
}
.board-tab.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.board-tab:not(:disabled):hover {
  color: #eef5eb;
}
.overlay-body .board-tab {
  pointer-events: none;
}
.board-period {
  margin: 12px 0 0;
  font-size: 8px;
  letter-spacing: 2px;
  color: #65806d;
  min-height: 12px;
}
.access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  margin-bottom: 22px;
  border: 1px solid #c6ff3a44;
  background: linear-gradient(90deg, #c6ff3a12, transparent 70%);
  border-radius: 3px;
}
.access-banner p {
  margin: 8px 0 0;
  font-size: 12px;
  color: #d5e6d3;
  line-height: 1.6;
}
.access-banner .eyebrow {
  margin: 0;
}
.access-banner[data-state='expired'] {
  border-color: #ff9f4a77;
  background: linear-gradient(90deg, #ff9f4a14, transparent 70%);
}
.access-banner[data-state='expired'] .eyebrow {
  color: #ffb26a;
}
.access-banner .button.small {
  flex-shrink: 0;
}
.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #b8c6ba;
}
.tier-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.tier-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tier, var(--lime));
  box-shadow: 0 0 8px var(--tier, var(--lime));
}
.tier-legend b {
  color: var(--tier, var(--lime));
}
.pricing-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 90px 4vw 40px;
  border-top: 1px solid var(--line);
}
.pricing-strip h2 {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.95;
  margin: 18px 0 0;
  letter-spacing: -1.5px;
}
.pricing-strip h2 span {
  color: var(--lime);
}
.pricing-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
}
.pricing-strip li {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.pricing-strip b {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.3px;
}
.pricing-strip small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .pricing-strip {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 60px;
  }
  .pricing-strip ul {
    grid-template-columns: 1fr;
  }
  .access-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tile {
    --w: 24px;
    --h: 32px;
  }
}
@media (max-width: 600px) {
  .rush-grid .tile {
    --w: 13px;
    --h: 18px;
  }
  .rush-grid .letter-board {
    gap: 2px;
  }
  .board-tab {
    font-size: 8px;
    letter-spacing: 1px;
    padding: 6px 2px 8px;
  }
  .tier-badge {
    font-size: 8px;
    padding: 4px 7px 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile.hidden,
  .tile.flip,
  .letter-board.complete .tile.sweep {
    animation: none;
  }
}
.rush-grid .game-card-slot {
  width: 160px;
  gap: 6px;
}
.tier-badge {
  top: 2%;
}
.card-winners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: min(calc(100% + 120px), 96vw);
}
.card-winners span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ffffff22;
  background: #101e14;
  color: #dfeedd;
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 2px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-winners span.first {
  border-color: #c6ff3a80;
  color: #f4ffe0;
  box-shadow: 0 0 14px #c6ff3a2a;
}
.card-winners i {
  font-style: normal;
  color: #7f9686;
  font-size: 9px;
}
.card-winners b {
  color: var(--lime);
}
.card-winners small {
  align-self: center;
  font-size: 9px;
  color: #9db6a3;
}
.rush-grid .card-winners span {
  font-size: 8px;
  padding: 3px 6px;
  gap: 4px;
}
/* ---------- v3: ×2 bonus rozeti, rütbe mesajları, kanal ayarları penceresi ---------- */
.bonus-badge {
  position: absolute;
  top: 2%;
  right: 6%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 5px;
  border-radius: 2px;
  background: linear-gradient(120deg, #ffd35a, #fff2b0 45%, #ffb020);
  color: #3a2a00;
  font:
    900 10px Barlow,
    sans-serif;
  letter-spacing: 1.6px;
  box-shadow:
    0 0 0 1px #ffd35a88,
    0 0 22px #ffd35a88;
  animation: bonusPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}
.bonus-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a2a00;
}
.rush-grid .bonus-badge {
  font-size: 8px;
  padding: 4px 7px 3px;
}
@keyframes bonusPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px #ffd35a88,
      0 0 14px #ffd35a66;
  }
  50% {
    box-shadow:
      0 0 0 1px #ffd35a,
      0 0 30px #ffd35acc;
  }
}
.chat-log .rank-message {
  color: #ffd35a;
  border-left: 2px solid #ffd35a;
  padding-left: 8px;
}
.settings-dialog {
  width: min(960px, 94vw);
}
.settings-block {
  border-top: 1px solid #ffffff16;
  padding-top: 22px;
  margin-top: 22px;
}
.settings-block h3 {
  font:
    700 12px Barlow,
    sans-serif;
  letter-spacing: 2px;
  color: #9db6a3;
  margin: 0 0 14px;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.settings-row h3 {
  margin: 0;
}
.rank-editor {
  display: grid;
  gap: 8px;
}
.rank-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 150px auto auto;
  gap: 10px;
  align-items: center;
}
.rank-row input,
.rank-row select {
  min-height: 42px;
  background: #15211a;
  border: 1px solid #34463a;
  color: #fff;
  padding: 10px;
  font:
    12px Manrope,
    sans-serif;
  border-radius: 2px;
  color-scheme: dark;
  width: 100%;
}
.rank-row input[readonly] {
  color: #7f9686;
}
.rank-row-name {
  font:
    700 14px Barlow,
    sans-serif;
}
.rank-viewers {
  font-size: 9px;
  letter-spacing: 1px;
  color: #7f9686;
  white-space: nowrap;
}
.rank-emblem.small {
  width: 34px;
  height: 38px;
}
.rank-emblem.small b {
  font-size: 14px;
}
.settings-block.danger .control-button.danger {
  color: #ff9f74;
}
.reset-log {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 10px;
  color: #9db6a3;
  display: grid;
  gap: 6px;
}
#settings-error {
  font-size: 12px;
  color: #ffd5a9;
}
@media (max-width: 700px) {
  .rank-row {
    grid-template-columns: 34px minmax(0, 1fr) 110px auto;
  }
  .rank-viewers {
    display: none;
  }
}
/* ---------- B fazı: hareketli kartlar, kutlama, canlı sohbet, mobil uygulama hissi ---------- */
.game-card-slot > .fc-card {
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s var(--ease);
  animation: cardFloat 7s ease-in-out infinite;
}
.game-card-slot > .fc-card.tilting {
  animation: none;
  transition: transform 0.08s linear;
}
.game-card-slot:nth-child(2) > .fc-card {
  animation-delay: -1.5s;
}
.game-card-slot:nth-child(3) > .fc-card {
  animation-delay: -3s;
}
.game-card-slot:nth-child(4) > .fc-card {
  animation-delay: -4.5s;
}
.game-card-slot:nth-child(5) > .fc-card {
  animation-delay: -6s;
}
.game-card-slot:nth-child(6) > .fc-card {
  animation-delay: -2.2s;
}
.live-card .card-shine {
  opacity: 1;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent calc(var(--shine-x, 30%) - 18%),
    #ffffff2e var(--shine-x, 30%),
    transparent calc(var(--shine-x, 30%) + 18%),
    transparent 100%
  );
  animation: shineSweep 9s ease-in-out infinite;
}
.live-card.tilting .card-shine {
  animation: none;
}
.live-card.concealed .card-shine {
  mix-blend-mode: screen;
}
/* ×2 bonus kart: altın aura + ışık halkası */
.game-card-slot:has(.bonus-badge) > .fc-card {
  filter: drop-shadow(0 0 18px #ffd35a77) drop-shadow(0 0 40px #ffd35a33);
  animation:
    cardFloat 7s ease-in-out infinite,
    bonusAura 2.4s ease-in-out infinite;
}
.game-card-slot.solved > .fc-card {
  filter: drop-shadow(0 0 16px #c6ff3a55);
}
@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }
  50% {
    transform: translateY(-7px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  }
}
@keyframes shineSweep {
  0%,
  70%,
  100% {
    --shine-x: -30%;
    opacity: 0;
  }
  78% {
    opacity: 1;
  }
  92% {
    --shine-x: 130%;
    opacity: 0;
  }
}
@keyframes bonusAura {
  0%,
  100% {
    filter: drop-shadow(0 0 14px #ffd35a66) drop-shadow(0 0 30px #ffd35a22);
  }
  50% {
    filter: drop-shadow(0 0 26px #ffd35aaa) drop-shadow(0 0 60px #ffd35a44);
  }
}
/* Rütbe kutlaması: sahne merkezinde patlayan parçacıklar + kayan yazı */
.play-area {
  position: relative;
}
.stage-burst {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}
.stage-burst .burst-text {
  font:
    900 clamp(20px, 3vw, 40px) Barlow,
    sans-serif;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffd35a;
  letter-spacing: 1px;
  text-shadow:
    0 0 22px #ffd35a99,
    0 8px 30px #000;
  animation: burstText 2.4s var(--ease) both;
  background: #07100cd9;
  padding: 14px 26px;
  border: 1px solid #ffd35a88;
  border-radius: 4px;
}
.stage-burst i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--lime);
  transform: rotate(var(--a)) translateY(0);
  animation: burstParticle 1.6s var(--ease) both;
  animation-delay: calc(var(--d) * 60ms);
}
.stage-burst i:nth-child(3n) {
  background: #ffd35a;
}
.stage-burst i:nth-child(3n + 1) {
  background: #fff;
}
@keyframes burstParticle {
  0% {
    transform: rotate(var(--a)) translateY(0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: rotate(var(--a)) translateY(calc(-160px * var(--d))) scale(1);
    opacity: 0;
  }
}
@keyframes burstText {
  0% {
    transform: translateY(20px) scale(0.85);
    opacity: 0;
  }
  15%,
  80% {
    transform: none;
    opacity: 1;
  }
  100% {
    transform: translateY(-16px);
    opacity: 0;
  }
}
/* Canlı sohbet satırları */
.chat-log .chat-line {
  color: #b8c6ba;
}
.chat-log .chat-line .guess-name {
  color: #dfeedd;
}
.chat-log .answer-message {
  color: #9fd7a5;
  font-style: italic;
}
.chat-log li {
  animation: lineIn 0.35s var(--ease) both;
}
@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Sıralama satırları akarak gelir */
.live-board li {
  animation: boardIn 0.4s var(--ease) both;
}
@keyframes boardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* Mobil: kumanda alt çubukta sabit, uygulama hissi */
@media (max-width: 700px) {
  .game-controls {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin: 18px -5vw 0;
    padding: 12px 5vw calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(#07100c00, #07100c 30%);
    backdrop-filter: blur(10px);
  }
  .game-controls .button {
    flex: 1 1 100%;
  }
  .site-header .button.small {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .game-card-slot > .fc-card,
  .game-card-slot:has(.bonus-badge) > .fc-card,
  .live-card .card-shine,
  .chat-log li,
  .live-board li {
    animation: none;
  }
}
@media (max-width: 700px) {
  /* Mobilde sahne yüksekliği içeriğe göre: harf tahtası ve kazanan rozeti taşmaz. */
  .game-cards,
  .game-cards.rush-grid {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 12px;
  }
}

/* ---- "Kağıt" kumanda (18 Eylül 2026, sahip seçimi B): açık zemin, koyu düğmeler ------------ */
.control-dialog.paper {
  background: #f7f8f4;
  color: #101410;
  border: 1px solid #0f1a1424;
  border-radius: 22px;
  padding: 26px 30px 30px;
  width: min(1060px, 94vw);
  box-shadow: 0 30px 90px #0009;
  color-scheme: light;
}
.control-dialog.paper::backdrop {
  background: #050907cc;
  backdrop-filter: blur(10px);
}
.paper .eyebrow {
  color: #3f8a00;
  font:
    600 13.5px Manrope,
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
.paper .dialog-top .icon-button {
  color: #101410;
  background: #fff;
  border: 1px solid #0f1a1424;
  border-radius: 50%;
}
.paper .dialog-top .icon-button:hover {
  background: #e6efe4;
}
.control-dialog.paper h2 {
  font:
    800 30px/1.1 Manrope,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 10px 0 6px;
  color: #101410;
  text-transform: none;
}
.control-dialog.paper h2 span {
  color: #3f8a00;
}
.paper .connection-status {
  color: #5b655f;
  border-block: 0;
  border-bottom: 1px solid #0f1a1412;
  padding: 0 0 14px;
  margin-bottom: 16px;
  font-size: 13px;
}
.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.paper #login-required p {
  color: #2f3733;
  margin: 0 0 12px;
}
.paper .button {
  background: #101410;
  border-color: #101410;
  color: #c6ff3a;
  border-radius: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  gap: 10px;
}
.paper .button:hover {
  background: #1e2822;
  box-shadow: none;
  transform: translateY(-1px);
}
.paper .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.step {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}
.step legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0;
  font:
    800 14px Manrope,
    sans-serif;
  color: #101410;
}
.step-no {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #101410;
  color: #c6ff3a;
  display: grid;
  place-items: center;
  font:
    800 12px Manrope,
    sans-serif;
}
.pillset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.paper .mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}
.pillset label {
  position: relative;
  cursor: pointer;
  min-width: 0;
}
.pillset input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
}
.paper .pillset span {
  display: block;
  padding: 10px 14px;
  border: 1px solid #0f1a1424;
  border-radius: 14px;
  background: #fff;
  font:
    600 14px Manrope,
    sans-serif;
  color: #101410;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.paper .pillset span b {
  display: block;
  font:
    800 17px Manrope,
    sans-serif;
  letter-spacing: -0.01em;
}
.paper .pillset span small {
  display: block;
  font:
    12px Manrope,
    sans-serif;
  color: #5b655f;
  margin-top: 2px;
}
.paper .pillset input:checked + span {
  background: #101410;
  border-color: #101410;
  color: #f4f4e9;
}
.paper .pillset input:checked + span b {
  color: #c6ff3a;
}
.paper .pillset input:checked + span small {
  color: #b7c0ba;
}
.paper .pillset input:focus-visible + span {
  outline: 3px solid #3f8a00;
  outline-offset: 2px;
}
.paper .pillset label:hover span {
  border-color: #101410;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 14px;
  color: #101410;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: #3f8a00;
  margin: 0;
}
.check small {
  color: #5b655f;
  font-size: 12px;
}
.advanced {
  margin-top: 8px;
  border: 1px solid #0f1a1412;
  border-radius: 14px;
  background: #fff;
}
.advanced summary {
  cursor: pointer;
  padding: 12px 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font:
    700 14px Manrope,
    sans-serif;
}
.advanced summary::-webkit-details-marker {
  display: none;
}
.advanced summary small {
  color: #5b655f;
  font-weight: 500;
  flex: 1;
}
.advanced summary::after {
  content: '+';
  font-size: 20px;
  line-height: 1;
  color: #3f8a00;
}
.advanced[open] summary::after {
  content: '–';
}
.paper .setup-grid {
  padding: 0 14px 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.paper .setup-grid label {
  color: #5b655f;
  font-size: 12px;
  font-weight: 600;
}
.paper .setup-grid input,
.paper .setup-grid select,
.paper .tempo input,
.paper input[type='text'],
.paper input[type='number'],
.paper select {
  background: #fff;
  border: 1px solid #0f1a1424;
  color: #101410;
  border-radius: 10px;
  color-scheme: light;
  font:
    14px Manrope,
    sans-serif;
  min-height: 44px;
  padding: 0 12px;
}
.paper .tier-legend {
  padding: 0 14px 14px;
  margin: 0;
}
.paper .tier-legend span {
  color: #101410;
}
.tempo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 380px;
}
.tempo label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5b655f;
}
.setup-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
}
.setup-preview {
  background: #e6efe4;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.preview-card {
  width: 168px;
  margin: 0 auto 12px;
  container-type: inline-size;
}
.preview-card .fc-card {
  width: 100%;
}
.preview-pool {
  margin: 0;
  font:
    800 14px Manrope,
    sans-serif;
  color: #101410;
}
.preview-clues {
  margin: 6px 0 0;
  font-size: 12px;
  color: #5b655f;
  line-height: 1.5;
}
.paper .setup-actions {
  display: grid;
  gap: 8px;
  margin: 0;
}
.paper .setup-actions .button {
  min-height: 52px;
}
.paper .control-button,
.paper .setup-actions .control-button {
  border: 1px solid #0f1a1424;
  border-radius: 12px;
  background: #fff;
  color: #101410;
  font:
    700 12px Manrope,
    sans-serif;
  letter-spacing: 0.02em;
  min-height: 44px;
  text-transform: none;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
.paper .control-button:not(:disabled):hover {
  background: #e6efe4;
  color: #101410;
}
.paper .access-banner {
  background: #e6efe4;
  border: 1px solid #0f1a1412;
  border-radius: 14px;
  color: #101410;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.paper .access-banner p {
  color: #2f3733;
}
.paper .access-banner .eyebrow {
  color: #3f8a00;
}
.paper .access-banner[data-state='expired'] {
  background: #fbeaea;
  border-color: #d63c3c33;
}
.paper .access-banner[data-state='expired'] .eyebrow {
  color: #b3261e;
}
.paper #setup-error {
  color: #b3261e;
}
.paper .settings-block {
  border-top-color: #0f1a1412;
}
.paper .settings-block h3,
.paper .settings-row h3 {
  color: #3f8a00;
  font:
    700 14px Manrope,
    sans-serif;
  letter-spacing: 0;
  text-transform: none;
}
.paper .settings-block label,
.paper .rank-row-name {
  font-family: Manrope, sans-serif;
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
}
.paper .settings-status,
.paper #settings-error,
.paper .settings-block p,
.paper .settings-block small {
  color: #5b655f;
}
/* Ayarlar penceresi (kağıt): rütbe satırı alanları ve tehlikeli işlemler açık zemine uyar. */
.paper .rank-row input,
.paper .rank-row select,
.paper .settings-block input,
.paper .settings-block select {
  background: #fff;
  border: 1px solid #0f1a1424;
  color: #101410;
  border-radius: 10px;
  color-scheme: light;
}
.paper .rank-row input[readonly] {
  background: #e6efe4;
  color: #5b655f;
}
.paper .rank-row-name {
  color: #101410;
}
.paper .settings-block.danger .control-button.danger {
  border-color: #d63c3c66;
  color: #b3261e;
  background: #fff;
}
.paper .settings-block.danger .control-button.danger:not(:disabled):hover {
  background: #fbeaea;
}
@media (max-width: 860px) {
  .control-dialog.paper {
    padding: 18px 16px 24px;
    border-radius: 18px;
    width: 96vw;
  }
  .control-dialog.paper h2 {
    font-size: 34px;
  }
  .setup-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .setup-side {
    position: static;
  }
  .paper .setup-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tempo {
    max-width: none;
  }
}
