:root {
  --ink: #070d17;
  --ink-2: #0d1523;
  --panel: rgba(15, 25, 41, 0.76);
  --paper: #f1f5ef;
  --muted: #8997aa;
  --line: rgba(226, 236, 246, 0.14);
  --line-strong: rgba(226, 236, 246, 0.26);
  --lime: #c8ff32;
  --lime-soft: rgba(200, 255, 50, 0.14);
  --blue: #84a7ff;
  --red: #ff705b;
  --mono: "DM Mono", monospace;
  --display: "Space Grotesk", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 8%, rgba(54, 81, 155, 0.2), transparent 31rem),
    var(--ink);
  color: var(--paper);
  font-family: "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-noise {
  position: fixed;
  z-index: 100;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.2;
}

.ambient-a {
  right: -18rem;
  top: 26rem;
  background: #3e5fc1;
}

.ambient-b {
  left: -28rem;
  bottom: 0;
  background: #54765a;
}

.site-header {
  position: relative;
  z-index: 20;
  height: 78px;
  padding: 0 clamp(24px, 5.5vw, 88px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: var(--paper);
  font: 600 15px var(--display);
  letter-spacing: 0.09em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: flex;
  align-items: end;
  gap: 2px;
  width: 22px;
  height: 23px;
}

.brand-mark i {
  display: block;
  width: 6px;
  background: var(--lime);
}

.brand-mark i:first-child {
  height: 12px;
}

.brand-mark i:nth-child(2) {
  height: 22px;
}

.brand-mark i:last-child {
  height: 16px;
}

.world-tag,
.live-dot,
.mono {
  font: 10px var(--mono);
  letter-spacing: 0.08em;
}

.world-tag {
  color: #aab7c9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.world-tag > span,
.live-dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.world-tag > span {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-button,
.header-login,
.profile-menu-button {
  cursor: pointer;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  font: 10px var(--mono);
}

.header-login {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 12px;
}

.header-login span {
  margin-left: 10px;
  color: var(--lime);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 5px;
  border: 1px solid var(--line);
  background: rgba(13, 21, 35, 0.66);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  cursor: pointer;
  font: 16px/1 var(--display);
}

.avatar-visual {
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #d7ff6c, #527223);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.avatar-visual[data-avatar="pulse-knight"] {
  background: linear-gradient(145deg, #d7ff6c, #3b5b20);
  color: #10180b;
}

.avatar-visual[data-avatar="solar-fox"] {
  background: linear-gradient(145deg, #ffdb7b, #d66a2d);
}

.avatar-visual[data-avatar="cosmic-owl"] {
  background: linear-gradient(145deg, #849dff, #344476);
}

.avatar-visual[data-avatar="neon-panther"] {
  background: linear-gradient(145deg, #f696dc, #61418d);
}

.avatar-visual[data-avatar="metal-rook"] {
  background: linear-gradient(145deg, #d9e2ed, #52647a);
  color: #101823;
}

.avatar-visual[data-avatar="star-cat"] {
  background: linear-gradient(145deg, #7dd9ff, #253f8c);
}

.avatar-visual[data-avatar="logic-bot"] {
  background: linear-gradient(145deg, #b5ffe9, #318e83);
}

.avatar-visual[data-avatar="aurora-dragon"] {
  background: linear-gradient(145deg, #8affc7, #a370ff 55%, #253381);
}

.profile-copy {
  min-width: 80px;
  line-height: 1.2;
}

.profile-copy strong {
  display: block;
  max-width: 110px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.profile-copy small {
  color: var(--muted);
  font: 8px var(--mono);
}

.profile-copy b {
  color: var(--lime);
  font-weight: 500;
}

.profile-menu-button {
  align-self: stretch;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.guest-hero {
  min-height: min(790px, calc(100vh - 150px));
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(70px, 8vw, 124px) clamp(24px, 9vw, 150px) 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.8fr);
  align-items: center;
  gap: 7vw;
  position: relative;
}

.guest-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 25px;
  color: #a9b6c8;
  font: 10px var(--mono);
  letter-spacing: 0.11em;
}

.eyebrow > span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.guest-copy h1,
.member-intro h1 {
  margin: 0;
  font: 600 clamp(62px, 8vw, 124px) / 0.88 var(--display);
  letter-spacing: -0.072em;
}

.guest-copy h1 em,
.member-intro h1 em {
  color: var(--lime);
  font-family: Georgia, "Noto Serif SC", serif;
  font-weight: 400;
}

.hero-copy {
  max-width: 590px;
  margin: 35px 0 0;
  color: #a9b7c9;
  font-size: 15px;
  line-height: 1.95;
}

.hero-actions {
  margin-top: 37px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.button {
  border: 1px solid transparent;
  padding: 14px 19px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--lime);
  color: var(--ink);
}

.button-primary:hover {
  background: #d6ff66;
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--paper);
}

.button-quiet:hover {
  border-color: var(--line-strong);
}

.button-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--paper);
}

.button-outline:hover {
  border-color: var(--lime);
}

.button.wide {
  flex: 1;
}

.feature-strip {
  max-width: 680px;
  margin-top: 64px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.feature-strip div {
  padding-right: 20px;
}

.feature-strip div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.feature-strip b,
.feature-strip span {
  display: block;
}

.feature-strip b {
  margin-bottom: 8px;
  font-size: 11px;
}

.feature-strip span {
  color: var(--muted);
  font-size: 9px;
}

.hero-board-wrap {
  min-height: 570px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
}

.board-aura {
  position: absolute;
  inset: 7% -2% 10% 5%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131, 168, 255, 0.3), transparent 65%);
  filter: blur(18px);
}

.preview-board {
  width: min(42vw, 500px);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  transform: perspective(1000px) rotateX(9deg) rotateY(-12deg) rotateZ(4deg);
  border: 1px solid rgba(171, 196, 255, 0.28);
  box-shadow: 36px 50px 90px rgba(0, 0, 0, 0.48), 0 0 80px rgba(98, 137, 242, 0.16);
  animation: board-float 8s ease-in-out infinite;
}

@keyframes board-float {
  50% {
    transform: perspective(1000px) rotateX(7deg) rotateY(-8deg) rotateZ(2deg) translateY(-12px);
  }
}

.preview-square {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font: clamp(29px, 4vw, 54px) Georgia, serif;
}

.preview-piece {
  line-height: 1;
}

.preview-piece.piece-white {
  color: #f7f9f2;
  -webkit-text-stroke: 1px #0a1320;
  text-shadow: 0 2px 3px rgba(4, 10, 19, 0.45);
}

.preview-piece.piece-black {
  color: #0a1320;
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.2);
  text-shadow: 0 2px 3px rgba(4, 10, 19, 0.28);
}

.preview-square.light {
  background: #adc5dc;
  color: #111c32;
}

.preview-square.dark {
  background: #314b80;
  color: #eef4ff;
}

.preview-square.highlight {
  box-shadow: inset 0 0 0 3px var(--lime), inset 0 0 28px rgba(200, 255, 50, 0.48);
}

.preview-label {
  position: absolute;
  z-index: 2;
  padding: 12px 14px;
  border: 1px solid rgba(200, 255, 50, 0.45);
  background: rgba(8, 15, 26, 0.88);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.preview-label span,
.preview-label b,
.preview-label small {
  display: block;
}

.preview-label span {
  color: var(--lime);
  font: 700 25px var(--display);
}

.preview-label b {
  margin-top: 3px;
  font: 500 9px var(--mono);
  letter-spacing: 0.1em;
}

.preview-label small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}

.label-a {
  left: -2%;
  top: 15%;
  animation: label-drift 6s ease-in-out infinite;
}

.label-b {
  right: -4%;
  bottom: 18%;
  border-color: var(--line-strong);
  animation: label-drift 6s 1.3s ease-in-out infinite;
}

@keyframes label-drift {
  50% {
    transform: translateY(-8px);
  }
}

.coordinate {
  position: absolute;
  right: 0;
  bottom: 2%;
  color: #9eabba;
  text-align: right;
  font: 8px/1.8 var(--mono);
}

.coordinate span {
  color: var(--lime);
}

.guest-marquee {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  color: #8e9bad;
  font: 9px var(--mono);
  letter-spacing: 0.8em;
  white-space: nowrap;
}

.guest-marquee i {
  color: var(--lime);
  font-style: normal;
}

.member-view {
  max-width: 1440px;
  margin: 0 auto;
  padding: 76px clamp(24px, 5.5vw, 80px) 115px;
}

.member-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 58px;
}

.member-intro h1 {
  font-size: clamp(48px, 6vw, 88px);
}

.member-intro > div:first-child > p:last-child {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.member-insight {
  min-width: 172px;
  padding: 17px 21px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.member-insight span,
.member-insight small {
  display: block;
  color: var(--muted);
  font: 8px var(--mono);
  letter-spacing: 0.1em;
}

.member-insight strong {
  display: block;
  margin: 4px 0;
  color: var(--lime);
  font: 500 36px var(--display);
}

.club-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.7fr);
  gap: 15px;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(17, 28, 46, 0.82), rgba(10, 17, 28, 0.8));
  backdrop-filter: blur(18px);
}

.play-panel,
.profile-panel,
.challenge-panel,
.leaderboard-panel {
  padding: 26px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.panel-heading > div {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.panel-heading h2 {
  margin: 0;
  font: 500 23px var(--display);
  letter-spacing: -0.045em;
}

.panel-heading.compact h2 {
  font-size: 18px;
}

.section-number {
  color: var(--lime);
  font: 9px var(--mono);
}

.live-dot {
  display: flex;
  align-items: center;
  color: var(--lime);
  white-space: nowrap;
}

.live-dot::before {
  content: "";
  display: block;
  margin-right: 7px;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 2px var(--lime);
  }
}

.panel-lead {
  margin: 19px 0 22px 31px;
  color: var(--muted);
  font-size: 11px;
}

.timer-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.timer-option {
  min-height: 96px;
  padding: 13px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border 180ms, background 180ms, transform 180ms;
}

.timer-option:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 255, 50, 0.42);
}

.timer-option.active {
  border-color: var(--lime);
  background: var(--lime-soft);
}

.timer-option b {
  font: 600 25px var(--display);
}

.timer-option.active b {
  color: var(--lime);
}

.timer-option span {
  margin-top: auto;
  font-size: 10px;
}

.timer-option small {
  color: var(--muted);
  font: 8px var(--mono);
}

.play-actions {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.button-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: dot-pulse 1.8s infinite;
}

@keyframes dot-pulse {
  50% {
    transform: scale(2.1);
    opacity: 0.22;
  }
}

.match-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 9px;
}

.match-note b {
  color: var(--paper);
}

.signal {
  width: 18px;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--lime) 0 2px, transparent 2px 5px);
}

.profile-panel {
  display: flex;
  flex-direction: column;
}

.skin-orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f8fffd, #7598ff 40%, #17284d 70%);
  box-shadow: 0 0 24px rgba(132, 167, 255, 0.35);
}

.active-avatar-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}

.active-avatar-button small {
  display: block;
  margin-top: 4px;
  font: 7px var(--mono);
}

.active-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.record-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 14px;
  margin-top: 28px;
}

.record-row div {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.record-row span,
.record-row strong {
  display: block;
}

.record-row span {
  color: var(--muted);
  font: 8px var(--mono);
}

.record-row strong {
  margin-top: 7px;
  font: 500 20px var(--display);
}

.points-card {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 17px;
  border: 1px solid rgba(200, 255, 50, 0.25);
  background:
    radial-gradient(circle at 100% 0%, rgba(200, 255, 50, 0.17), transparent 55%),
    rgba(200, 255, 50, 0.045);
}

.points-card span {
  color: var(--lime);
  font: 8px var(--mono);
  letter-spacing: 0.11em;
}

.points-card strong {
  display: block;
  margin: 8px 0;
  font: 500 34px var(--display);
}

.points-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.text-link,
.refresh-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}

.text-link {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  color: #bac5d1;
}

.text-link span {
  color: var(--lime);
}

.refresh-button {
  color: var(--muted);
}

.lobby-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.7fr);
  gap: 15px;
}

.challenge-list {
  margin-top: 21px;
  display: grid;
  gap: 8px;
}

.challenge-item {
  min-height: 65px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 15px;
  transition: background 180ms, border 180ms;
}

.challenge-item:hover {
  border-color: rgba(200, 255, 50, 0.38);
  background: rgba(200, 255, 50, 0.035);
}

.challenge-player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-avatar,
.leader-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #18243a;
  color: #b9c9ff;
  font: 600 12px var(--display);
}

.mini-avatar {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.challenge-player div {
  min-width: 0;
}

.challenge-player b,
.challenge-player small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-player b {
  font-size: 11px;
}

.challenge-player small {
  margin-top: 3px;
  color: var(--muted);
  font: 8px var(--mono);
}

.challenge-time {
  text-align: right;
}

.challenge-time b,
.challenge-time small {
  display: block;
}

.challenge-time b {
  font: 500 15px var(--display);
}

.challenge-time small {
  color: var(--muted);
  font: 8px var(--mono);
}

.join-button {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.join-button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.empty-state {
  min-height: 130px;
  border: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  color: #52617b;
  font: 31px Georgia, serif;
}

.empty-state p {
  margin: 8px 0 3px;
  color: #c0c9d6;
  font-size: 11px;
}

.empty-state small {
  font-size: 8px;
}

.leaderboard {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.leaderboard li {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.leaderboard li:first-child {
  border-top: 0;
}

.leader-rank {
  color: var(--muted);
  font: 8px var(--mono);
}

.leaderboard li:first-child .leader-rank {
  color: var(--lime);
}

.leader-avatar {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.leaderboard li b {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard li strong {
  font: 500 10px var(--mono);
}

.reward-explainer {
  margin-top: 15px;
  padding: 34px;
  display: grid;
  grid-template-columns: 0.9fr 1.45fr;
  gap: 7vw;
}

.reward-title h2 {
  margin: 0;
  font: 500 clamp(31px, 3vw, 46px) / 1 var(--display);
  letter-spacing: -0.055em;
}

.reward-title .eyebrow {
  margin-bottom: 18px;
}

.reward-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.reward-rules article {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.reward-rules article > span {
  color: var(--muted);
  font: 8px var(--mono);
}

.reward-rules b {
  display: block;
  margin: 12px 0 8px;
  font-size: 11px;
}

.reward-rules p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.75;
}

.reward-rules .brilliant-rule {
  border-color: var(--lime);
}

.reward-rules .brilliant-rule > span,
.reward-rules .brilliant-rule b {
  color: var(--lime);
}

footer {
  min-height: 112px;
  padding: 26px clamp(24px, 5.5vw, 88px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

footer p {
  margin: 0;
  font: 8px var(--mono);
  letter-spacing: 0.05em;
}

footer > div {
  display: flex;
  gap: 22px;
}

footer a,
footer button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 9px var(--mono);
  text-decoration: none;
  cursor: pointer;
}

.footer-brand {
  font-size: 12px;
}

dialog {
  width: min(92vw, 490px);
  padding: 40px;
  border: 1px solid rgba(198, 211, 231, 0.28);
  background:
    radial-gradient(circle at 105% 0%, rgba(93, 124, 207, 0.22), transparent 45%),
    #0b1321;
  color: var(--paper);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.65);
}

dialog::backdrop {
  background: rgba(2, 6, 12, 0.8);
  backdrop-filter: blur(12px);
}

dialog[open] {
  animation: dialog-in 220ms ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.dialog-close {
  position: absolute;
  right: 15px;
  top: 13px;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.dialog-knight {
  position: absolute;
  right: 22px;
  top: 56px;
  color: rgba(132, 167, 255, 0.09);
  font: 170px Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.auth-dialog .eyebrow,
.collection-dialog .eyebrow,
.rules-dialog .eyebrow {
  position: relative;
  z-index: 1;
}

.auth-dialog h2,
.collection-dialog h2,
.rules-dialog h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font: 500 38px/1.03 var(--display);
  letter-spacing: -0.055em;
}

.dialog-lead {
  position: relative;
  z-index: 1;
  margin: 17px 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  padding: 12px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.auth-tabs button.active {
  border-bottom-color: var(--lime);
  color: var(--paper);
}

.field {
  display: block;
  margin-top: 16px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  color: #aab7c7;
  font: 9px var(--mono);
}

.field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--paper);
  outline: none;
  font-size: 12px;
}

.field input:focus {
  border-color: rgba(200, 255, 50, 0.55);
}

.form-error {
  min-height: 18px;
  margin: 10px 0 3px;
  color: #ff9587;
  font-size: 10px;
}

.privacy-note {
  display: block;
  margin-top: 17px;
  color: #637086;
  font-size: 8px;
  line-height: 1.7;
}

.collection-dialog {
  width: min(94vw, 800px);
}

.avatar-dialog {
  width: min(94vw, 680px);
}

.avatar-dialog h2 {
  margin: 0;
  font: 500 38px/1.03 var(--display);
  letter-spacing: -0.055em;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.avatar-choice {
  min-height: 128px;
  padding: 13px 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.avatar-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 255, 50, 0.42);
}

.avatar-choice.active {
  border-color: var(--lime);
  background: rgba(200, 255, 50, 0.07);
}

.avatar-choice .avatar-visual {
  width: 48px;
  height: 48px;
  margin: 0 auto 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px 15px 5px 15px;
  font-size: 27px;
}

.avatar-choice b,
.avatar-choice small {
  display: block;
}

.avatar-choice b {
  font-size: 10px;
}

.avatar-choice small {
  margin-top: 4px;
  color: var(--muted);
  font: 7px var(--mono);
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skin-card {
  position: relative;
  min-height: 185px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.skin-card.owned {
  border-color: rgba(200, 255, 50, 0.35);
}

.skin-card.equipped {
  background: rgba(200, 255, 50, 0.06);
  border-color: var(--lime);
}

.skin-piece {
  position: absolute;
  right: 10px;
  bottom: -8px;
  color: #d7e3ff;
  font: 112px Georgia, serif;
  opacity: 0.7;
  text-shadow: 0 0 28px #7fa2ff66;
}

.skin-card:nth-child(2) .skin-piece {
  color: #6ff4ff;
  text-shadow: 0 0 20px #55dbff;
}

.skin-card:nth-child(3) .skin-piece {
  color: #ffcf66;
  text-shadow: 0 0 25px #ffb43c;
}

.skin-card:nth-child(4) .skin-piece {
  color: #ff83ef;
  text-shadow: 0 0 30px #59f8ff, 0 0 55px #f56cff;
}

.skin-card > span {
  color: var(--lime);
  font: 8px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skin-card h3 {
  position: relative;
  z-index: 1;
  margin: 9px 0 7px;
  font: 500 22px var(--display);
}

.skin-card p {
  position: relative;
  z-index: 1;
  max-width: 72%;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.skin-card button {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 17px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  background: #0c1626;
  cursor: pointer;
  font-size: 9px;
}

.skin-card button:disabled {
  cursor: default;
  color: var(--muted);
}

.rules-dialog {
  width: min(92vw, 590px);
}

.rules-copy {
  margin-top: 25px;
}

.rules-copy p {
  color: #a3b0c1;
  font-size: 11px;
  line-height: 1.9;
}

.promotion-dialog {
  width: min(92vw, 450px);
  text-align: center;
}

.promotion-dialog > p {
  font: 500 20px var(--display);
}

.promotion-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.promotion-options button {
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.promotion-options span,
.promotion-options b {
  display: block;
}

.promotion-options span {
  color: var(--lime);
  font: 43px Georgia, serif;
}

.promotion-options b {
  margin-top: 4px;
  font-size: 9px;
}

.game-screen {
  position: fixed;
  z-index: 80;
  inset: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 25% 12%, rgba(52, 78, 140, 0.26), transparent 34rem),
    #070d17;
  animation: game-in 260ms ease-out;
}

@keyframes game-in {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
}

.game-header {
  min-height: 68px;
  padding: 0 clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.back-button,
.game-room-copy {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.back-button {
  justify-self: start;
}

.game-room-copy {
  justify-self: end;
  padding: 8px 11px;
  border: 1px solid var(--line);
}

.game-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.game-identity > strong {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  font: 9px var(--mono);
}

.live-dot i {
  display: none;
}

.game-layout {
  width: min(1320px, 100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 54px) 35px;
  display: grid;
  grid-template-columns: minmax(430px, 740px) minmax(270px, 350px);
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
}

.board-column {
  min-width: 0;
}

.game-player {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  font: 600 12px var(--display);
}

.black-avatar {
  background: #1f2a3e;
  color: #d7e2f6;
}

.white-avatar {
  background: #e9efe9;
  color: #111a29;
}

.game-player > div {
  line-height: 1.25;
}

.player-name,
.player-rating {
  display: block;
}

.player-name {
  max-width: 190px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-rating {
  margin-top: 3px;
  color: var(--muted);
  font: 8px var(--mono);
}

.connection-state {
  margin-left: 8px;
  color: #6d7b8f;
  font: 8px var(--mono);
}

.connection-state::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--lime);
}

.game-clock {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  color: #bac5d3;
  font: 500 22px var(--mono);
  font-variant-numeric: tabular-nums;
  transition: color 160ms, background 160ms;
}

.game-player.clock-active .game-clock {
  border-color: rgba(200, 255, 50, 0.42);
  background: var(--lime-soft);
  color: var(--lime);
}

.game-player.clock-low .game-clock {
  border-color: rgba(255, 112, 91, 0.5);
  background: rgba(255, 112, 91, 0.1);
  color: #ff8e7e;
}

.board-shell {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 250px);
  aspect-ratio: 1;
  border: 1px solid rgba(185, 204, 232, 0.29);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  isolation: isolate;
  transition: transform 120ms;
}

.chess-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}

.square {
  position: relative;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: default;
  font: clamp(29px, 4.8vw, 63px)/1 Georgia, "Noto Sans Symbols 2", serif;
  transition: filter 100ms;
}

.square.light {
  background: #b9cce0;
  color: #101a2c;
}

.square.dark {
  background: #3a588c;
  color: #eff4fc;
}

.square.can-move {
  cursor: pointer;
}

.square:hover {
  filter: brightness(1.08);
}

.square.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--lime);
  background: rgba(200, 255, 50, 0.18);
}

.square.legal::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(12, 25, 42, 0.32);
  pointer-events: none;
}

.square.legal.capture::before {
  width: 72%;
  border: 4px solid rgba(12, 25, 42, 0.27);
  background: transparent;
}

.square.last-move::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(200, 255, 50, 0.2);
  pointer-events: none;
}

.square.in-check::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 82, 63, 0.72), transparent 67%);
  animation: check-throb 1.1s infinite;
}

@keyframes check-throb {
  50% {
    opacity: 0.5;
  }
}

.chess-piece {
  position: relative;
  z-index: 3;
  line-height: 0.86;
  transform: translateY(-2%);
  pointer-events: none;
}

.chess-piece.piece-white {
  color: #f5f7ef;
  -webkit-text-stroke: min(1.2px, 0.03em) #07101d;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35));
}

.chess-piece.piece-black {
  color: #07101d;
  -webkit-text-stroke: min(0.8px, 0.02em) rgba(238, 246, 255, 0.32);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.25));
}

.chess-piece.skin-neon-knight {
  filter: drop-shadow(0 0 5px #57e5ff) drop-shadow(0 0 11px #547dff);
}

.chess-piece.skin-solar-queen {
  filter: drop-shadow(0 0 5px #ffc74f) drop-shadow(0 0 12px #ff8f32);
}

.chess-piece.skin-aurora-king {
  filter: drop-shadow(0 0 5px #66f9ff) drop-shadow(0 0 12px #e77bff);
  animation: aurora-piece 3s ease-in-out infinite;
}

@keyframes aurora-piece {
  50% {
    filter: hue-rotate(75deg);
  }
}

.board-effect-layer {
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.waiting-overlay,
.result-overlay {
  position: absolute;
  z-index: 8;
  inset: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 21, 0.83);
  text-align: center;
  backdrop-filter: blur(6px);
}

.waiting-knight {
  color: var(--lime);
  font: 68px Georgia, serif;
}

.waiting-overlay b,
.result-overlay strong {
  margin: 12px 0 8px;
  font: 500 29px var(--display);
}

.waiting-overlay p,
.result-overlay p {
  max-width: 330px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.result-overlay span {
  color: var(--lime);
  font: 9px var(--mono);
  letter-spacing: 0.16em;
}

.result-overlay strong {
  font-size: 44px;
}

.brilliant-burst {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(200, 255, 50, 0.2), transparent 58%);
  animation: brilliant-flash 2.6s both;
}

.brilliant-burst span {
  color: var(--lime);
  font: 700 clamp(30px, 6vw, 62px) var(--display);
  letter-spacing: 0.08em;
  text-shadow: 0 0 25px #c8ff32, 0 0 65px #84a7ff;
}

.brilliant-burst b {
  margin-top: 6px;
  font-size: 15px;
}

.brilliant-burst em {
  margin-top: 9px;
  color: var(--lime);
  font: 9px var(--mono);
  letter-spacing: 0.15em;
}

@keyframes brilliant-flash {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  13%,
  66% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

.board-shell.brilliant-shake {
  animation: brilliant-board 0.5s;
}

@keyframes brilliant-board {
  20% {
    transform: translateX(-5px) rotate(-0.3deg);
  }
  40% {
    transform: translateX(5px) rotate(0.3deg);
  }
  60% {
    transform: translateX(-3px);
  }
}

.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: spark-out 1.15s cubic-bezier(0.15, 0.7, 0.35, 1) forwards;
}

@keyframes spark-out {
  from {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0);
  }
}

.game-controls {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.game-controls button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: #aab6c5;
  cursor: pointer;
  font-size: 9px;
}

.game-controls button:hover {
  border-color: var(--line-strong);
  color: var(--paper);
}

.event-note {
  margin-left: auto;
  color: var(--muted);
  font: 8px var(--mono);
}

.game-sidebar {
  height: min(680px, calc(100vh - 116px));
  min-height: 530px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: rgba(12, 21, 35, 0.68);
  backdrop-filter: blur(16px);
}

.side-tabs {
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.side-tabs button {
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.side-tabs button.active {
  border-bottom-color: var(--lime);
  color: var(--paper);
}

.side-panel {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-list {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
}

.chat-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #627086;
  text-align: center;
}

.chat-empty span {
  font: 26px Georgia, serif;
}

.chat-empty p {
  margin: 10px 0 3px;
  color: #adb8c7;
  font-size: 10px;
}

.chat-empty small {
  font-size: 8px;
}

.chat-message {
  margin-bottom: 14px;
}

.chat-message header {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-message header b {
  font-size: 9px;
  font-weight: 500;
}

.chat-message header span {
  color: #617087;
  font: 7px var(--mono);
}

.chat-message p {
  margin: 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #c6d0dc;
  font-size: 10px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.chat-message.mine p {
  border-left: 2px solid var(--lime);
  background: rgba(200, 255, 50, 0.055);
}

.chat-form {
  height: 58px;
  padding: 9px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 7px;
}

.chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--paper);
  padding: 0 11px;
  outline: none;
  font-size: 10px;
}

.chat-form button {
  width: 40px;
  border: 0;
  background: var(--lime);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
}

.history-panel {
  overflow: hidden;
}

.history-head,
.history-row {
  display: grid;
  grid-template-columns: 30px 1fr 1fr;
  align-items: center;
}

.history-head {
  height: 34px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  color: #68778b;
  font: 8px var(--mono);
}

.move-history {
  flex: 1;
  padding: 8px 15px 18px;
  overflow-y: auto;
}

.history-row {
  min-height: 32px;
  border-bottom: 1px solid rgba(226, 236, 246, 0.06);
  color: #b7c3d2;
  font: 10px var(--mono);
}

.history-row > span:first-child {
  color: #5e6d82;
  font-size: 8px;
}

.history-row span.brilliant {
  color: var(--lime);
}

.history-row span.brilliant::after {
  content: " !";
}

.game-reward-panel {
  padding: 15px;
  border-top: 1px solid var(--line);
}

.game-reward-panel > span {
  color: var(--lime);
  font: 8px var(--mono);
  letter-spacing: 0.1em;
}

.game-reward-panel p {
  margin: 7px 0 9px;
  color: var(--muted);
  font-size: 8px;
}

.reward-meter {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.reward-meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  transition: width 450ms ease;
}

.draw-offer {
  position: fixed;
  z-index: 95;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  padding: 10px 12px 10px 17px;
  border: 1px solid rgba(200, 255, 50, 0.45);
  background: #101a29;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 9px;
}

.draw-offer span {
  margin-right: 8px;
  font-size: 10px;
}

.draw-offer button {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.draw-offer button:first-of-type {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.toast-stack {
  position: fixed;
  z-index: 120;
  right: 22px;
  top: 90px;
  width: min(330px, calc(100vw - 44px));
  display: grid;
  gap: 8px;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 21, 35, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
  animation: toast-in 260ms ease-out;
}

.toast.reward {
  border-color: rgba(200, 255, 50, 0.45);
}

.toast.error {
  border-color: rgba(255, 112, 91, 0.5);
}

.toast b,
.toast span {
  display: block;
}

.toast b {
  margin-bottom: 4px;
  font-size: 10px;
}

.toast span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.toast.reward b {
  color: var(--lime);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

.connection-banner {
  position: fixed;
  z-index: 110;
  top: 0;
  left: 0;
  right: 0;
  padding: 7px;
  background: var(--red);
  color: #1b0807;
  text-align: center;
  font: 9px var(--mono);
}

@media (max-width: 1100px) {
  .world-tag {
    display: none;
  }

  .guest-hero {
    grid-template-columns: 1fr minmax(340px, 0.72fr);
    gap: 4vw;
  }

  .club-grid,
  .lobby-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  }

  .game-layout {
    grid-template-columns: minmax(390px, 650px) 290px;
    gap: 28px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 68px;
    padding: 0 20px;
  }

  .guest-hero {
    min-height: auto;
    padding: 76px 24px 80px;
    grid-template-columns: 1fr;
  }

  .guest-copy h1 {
    font-size: clamp(61px, 14vw, 105px);
  }

  .hero-board-wrap {
    min-height: 500px;
  }

  .preview-board {
    width: min(82vw, 500px);
  }

  .label-a {
    left: 3%;
  }

  .label-b {
    right: 2%;
  }

  .member-intro {
    align-items: flex-start;
  }

  .club-grid,
  .lobby-grid {
    grid-template-columns: 1fr;
  }

  .reward-explainer {
    grid-template-columns: 1fr;
  }

  .game-screen {
    overflow-y: auto;
  }

  .game-header {
    position: sticky;
    z-index: 15;
    top: 0;
    background: rgba(7, 13, 23, 0.95);
  }

  .game-layout {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }

  .board-column {
    width: min(100%, 660px);
    margin: 0 auto;
  }

  .game-sidebar {
    width: min(100%, 660px);
    height: 520px;
    margin: 0 auto;
  }

  .board-shell {
    max-height: none;
  }

  .square {
    font-size: clamp(28px, 10vw, 60px);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 15px;
  }

  .header-actions {
    gap: 7px;
  }

  .profile-copy,
  .profile-menu-button,
  .icon-button,
  .footer-brand + p {
    display: none;
  }

  .profile-chip {
    padding: 3px;
    border: 0;
    background: transparent;
  }

  .profile-avatar {
    width: 29px;
    height: 29px;
  }

  .header-login {
    font-size: 10px;
  }

  .guest-hero {
    padding: 58px 20px 55px;
  }

  .guest-copy h1 {
    font-size: 62px;
  }

  .hero-copy {
    font-size: 13px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .feature-strip {
    margin-top: 44px;
    grid-template-columns: 1fr;
  }

  .feature-strip div {
    padding: 13px 0;
  }

  .feature-strip div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-board-wrap {
    min-height: 400px;
  }

  .preview-label {
    padding: 8px 10px;
  }

  .preview-label span {
    font-size: 19px;
  }

  .preview-label small {
    display: none;
  }

  .guest-marquee {
    justify-content: flex-start;
    padding-left: 20px;
    letter-spacing: 0.35em;
  }

  .member-view {
    padding: 52px 14px 70px;
  }

  .member-intro {
    display: block;
    margin-bottom: 32px;
  }

  .member-intro h1 {
    font-size: 48px;
  }

  .member-insight {
    display: inline-block;
    margin-top: 26px;
  }

  .play-panel,
  .profile-panel,
  .challenge-panel,
  .leaderboard-panel {
    padding: 18px;
  }

  .panel-heading.compact > div {
    gap: 8px;
  }

  .timer-options {
    grid-template-columns: 1fr 1fr;
  }

  .play-actions {
    flex-direction: column;
  }

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

  .challenge-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .challenge-time {
    display: none;
  }

  .reward-explainer {
    padding: 22px 18px;
  }

  .reward-rules {
    grid-template-columns: 1fr;
  }

  .reward-rules article {
    padding: 12px 0 12px 14px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }

  dialog {
    padding: 30px 22px;
  }

  .dialog-knight {
    display: none;
  }

  .auth-dialog h2,
  .collection-dialog h2,
  .avatar-dialog h2,
  .rules-dialog h2 {
    font-size: 32px;
  }

  .skin-grid {
    grid-template-columns: 1fr;
  }

  .avatar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skin-card {
    min-height: 165px;
  }

  .game-header {
    min-height: 58px;
    padding: 0 14px;
    grid-template-columns: auto 1fr auto;
  }

  .game-identity {
    justify-self: center;
  }

  .game-identity > strong,
  .game-room-copy,
  .connection-state {
    display: none;
  }

  .game-layout {
    padding: 10px 8px 24px;
  }

  .game-player {
    min-height: 47px;
    padding: 0 4px;
  }

  .game-clock {
    font-size: 19px;
  }

  .square {
    font-size: clamp(27px, 10.5vw, 55px);
  }

  .game-controls {
    padding: 0 4px;
  }

  .event-note {
    display: none;
  }

  .game-sidebar {
    height: 480px;
  }

  .draw-offer {
    width: calc(100vw - 20px);
    justify-content: space-between;
  }

  .draw-offer span {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
