valtech-components 4.0.375 → 4.0.377

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, InjectionToken, makeEnvironmentProviders, APP_INITIALIZER, ErrorHandler, Injectable, DestroyRef, Inject, signal, computed, PLATFORM_ID, isDevMode, Optional, runInInjectionContext, effect, Pipe, TemplateRef, ViewContainerRef, input, Directive, EventEmitter, Component, Input, Output, ChangeDetectionStrategy, HostBinding, HostListener, SecurityContext, NgZone, ViewChild, ElementRef, ChangeDetectorRef, output, ContentChild, model, ViewEncapsulation, untracked, viewChild, Injector, isSignal } from '@angular/core';
3
- import { BehaviorSubject, throwError, Subject, map, distinctUntilChanged, filter as filter$1, take as take$1, firstValueFrom, of, from, EMPTY, Observable, interval, defer, timer, merge, concat, debounceTime, switchMap as switchMap$1, catchError as catchError$1, takeUntil, isObservable, forkJoin, race, Subscription, shareReplay as shareReplay$1 } from 'rxjs';
3
+ import { BehaviorSubject, throwError, Subject, map, distinctUntilChanged, filter as filter$1, take as take$1, firstValueFrom, of, from, EMPTY, Observable, interval, defer, timer, merge, concat, debounceTime, switchMap as switchMap$1, catchError as catchError$1, takeUntil, isObservable, forkJoin, race, tap as tap$1, Subscription, shareReplay as shareReplay$1 } from 'rxjs';
4
4
  import { catchError, switchMap, finalize, filter, take, timeout, map as map$1, tap, shareReplay, distinctUntilChanged as distinctUntilChanged$1, retry, debounceTime as debounceTime$1, takeUntil as takeUntil$1 } from 'rxjs/operators';
5
5
  import * as i1$3 from '@angular/common/http';
6
6
  import { provideHttpClient, withInterceptors, HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';
@@ -58,7 +58,7 @@ import fixWebmDuration from 'fix-webm-duration';
58
58
  * Current version of valtech-components.
59
59
  * This is automatically updated during the publish process.
60
60
  */
61
- const VERSION = '4.0.375';
61
+ const VERSION = '4.0.377';
62
62
 
63
63
  // Control de estado de refresco (singleton a nivel de módulo)
64
64
  let isRefreshing = false;
@@ -61632,12 +61632,24 @@ class ChessimalsOnlineService {
61632
61632
  rematchRequests: [],
61633
61633
  },
61634
61634
  });
61635
- await setDoc(this.gameRef(gameId), this.withUpdatedAt(state, now));
61636
- return state;
61635
+ const next = this.withUpdatedAt(state, now);
61636
+ await setDoc(this.gameRef(gameId), next);
61637
+ await this.saveCurrentUserHistory(next);
61638
+ return next;
61637
61639
  }
61638
61640
  watchGame(gameId) {
61639
61641
  const normalizedGameId = this.normalizeGameId(gameId);
61640
- return docData(this.gameRef(normalizedGameId)).pipe(map((value) => (value ? value : null)));
61642
+ return docData(this.gameRef(normalizedGameId)).pipe(map((value) => (value ? value : null)), tap$1((state) => {
61643
+ if (state)
61644
+ void this.saveCurrentUserHistory(state);
61645
+ }));
61646
+ }
61647
+ watchHistory(limitCount = 8) {
61648
+ const uid = this.currentUid;
61649
+ if (!uid)
61650
+ return of([]);
61651
+ const historyQuery = query$1(collection(this.firestore, this.historyPath(uid)), orderBy('updatedAt', 'desc'), limit(limitCount));
61652
+ return collectionData(historyQuery).pipe(map((items) => items));
61641
61653
  }
61642
61654
  async joinGame(gameId) {
61643
61655
  const normalizedGameId = this.normalizeGameId(gameId);
@@ -61655,18 +61667,46 @@ class ChessimalsOnlineService {
61655
61667
  return;
61656
61668
  if (state.status !== 'waiting' || !state.online?.lobby)
61657
61669
  return;
61670
+ if (state.online.pendingGuest?.uid === uid)
61671
+ return;
61658
61672
  const now = new Date();
61659
61673
  const guest = this.createParticipant(uid, now.toISOString());
61674
+ const next = {
61675
+ ...state,
61676
+ online: {
61677
+ ...state.online,
61678
+ updatedAt: now.toISOString(),
61679
+ pendingGuest: guest,
61680
+ },
61681
+ };
61682
+ transaction.set(ref, next);
61683
+ });
61684
+ }
61685
+ async acceptGuest(gameId) {
61686
+ const normalizedGameId = this.normalizeGameId(gameId);
61687
+ const uid = await this.ensureUser();
61688
+ await runTransaction(this.firestore, async (transaction) => {
61689
+ const ref = this.gameRef(normalizedGameId);
61690
+ const snapshot = await transaction.get(ref);
61691
+ if (!snapshot.exists())
61692
+ throw new Error('CHESSIMALS_GAME_NOT_FOUND');
61693
+ const state = snapshot.data();
61694
+ this.assertNotExpired(state);
61695
+ if (state.status !== 'waiting' || state.online?.lobby?.uid !== uid || !state.online.pendingGuest)
61696
+ return;
61697
+ const now = new Date();
61660
61698
  const [hostSide, guestSide] = Math.random() > 0.5 ? ['white', 'black'] : ['black', 'white'];
61661
61699
  const lobby = state.online.lobby;
61662
- const onlineWithoutLobby = { ...state.online };
61663
- delete onlineWithoutLobby.lobby;
61700
+ const guest = state.online.pendingGuest;
61701
+ const online = { ...state.online };
61702
+ delete online.lobby;
61703
+ delete online.pendingGuest;
61664
61704
  const next = {
61665
61705
  ...state,
61666
61706
  status: 'in_progress',
61667
61707
  currentTurn: 'white',
61668
61708
  online: {
61669
- ...onlineWithoutLobby,
61709
+ ...online,
61670
61710
  updatedAt: now.toISOString(),
61671
61711
  participants: {
61672
61712
  [hostSide]: { ...lobby, side: hostSide },
@@ -61678,6 +61718,24 @@ class ChessimalsOnlineService {
61678
61718
  transaction.set(ref, next);
61679
61719
  });
61680
61720
  }
61721
+ async rejectGuest(gameId) {
61722
+ const normalizedGameId = this.normalizeGameId(gameId);
61723
+ const uid = await this.ensureUser();
61724
+ await runTransaction(this.firestore, async (transaction) => {
61725
+ const ref = this.gameRef(normalizedGameId);
61726
+ const snapshot = await transaction.get(ref);
61727
+ if (!snapshot.exists())
61728
+ throw new Error('CHESSIMALS_GAME_NOT_FOUND');
61729
+ const state = snapshot.data();
61730
+ this.assertNotExpired(state);
61731
+ if (state.status !== 'waiting' || state.online?.lobby?.uid !== uid || !state.online.pendingGuest)
61732
+ return;
61733
+ const now = new Date();
61734
+ const online = { ...state.online, updatedAt: now.toISOString() };
61735
+ delete online.pendingGuest;
61736
+ transaction.set(ref, { ...state, online });
61737
+ });
61738
+ }
61681
61739
  async move(gameId, move) {
61682
61740
  const normalizedGameId = this.normalizeGameId(gameId);
61683
61741
  const uid = await this.ensureUser();
@@ -61775,13 +61833,29 @@ class ChessimalsOnlineService {
61775
61833
  isHostWaiting(state, uid = this.currentUid) {
61776
61834
  return !!uid && state.status === 'waiting' && state.online?.lobby?.uid === uid;
61777
61835
  }
61778
- shareUrl(gameId) {
61836
+ shareUrl(gameId, baseRoute = '/mini-games') {
61779
61837
  const origin = typeof window === 'undefined' ? '' : window.location.origin;
61780
- return `${origin}/mini-games/chessimals/${encodeURIComponent(this.normalizeGameId(gameId))}`;
61838
+ const normalizedBaseRoute = `/${baseRoute.replace(/^\/+|\/+$/g, '') || 'mini-games'}`;
61839
+ return `${origin}${normalizedBaseRoute}/chessimals/${encodeURIComponent(this.normalizeGameId(gameId))}`;
61840
+ }
61841
+ async saveCurrentUserHistory(state) {
61842
+ const uid = this.currentUid;
61843
+ if (!uid || state.mode !== 'online')
61844
+ return;
61845
+ const entry = this.createHistoryEntry(state, uid);
61846
+ if (!entry)
61847
+ return;
61848
+ await setDoc(this.historyRef(uid, state.id), this.withoutUndefined(entry), { merge: true });
61781
61849
  }
61782
61850
  gameRef(gameId) {
61783
61851
  return doc(this.firestore, `${COLLECTION_PATH}/${gameId}`);
61784
61852
  }
61853
+ historyPath(uid) {
61854
+ return `users/${uid}/miniGames/chessimals/history`;
61855
+ }
61856
+ historyRef(uid, gameId) {
61857
+ return doc(this.firestore, `${this.historyPath(uid)}/${gameId}`);
61858
+ }
61785
61859
  async ensureUser() {
61786
61860
  await this.firebase.whenFirebaseAuthReady();
61787
61861
  const user = this.auth.currentUser;
@@ -61815,6 +61889,53 @@ class ChessimalsOnlineService {
61815
61889
  return state;
61816
61890
  return { ...state, online: { ...state.online, updatedAt: date.toISOString() } };
61817
61891
  }
61892
+ createHistoryEntry(state, uid) {
61893
+ if (!state.online)
61894
+ return undefined;
61895
+ const side = this.participantSide(state, uid);
61896
+ const isLobbyHost = state.online.lobby?.uid === uid;
61897
+ const isPendingGuest = state.online.pendingGuest?.uid === uid;
61898
+ if (!side && !isLobbyHost && !isPendingGuest)
61899
+ return undefined;
61900
+ const opponent = side
61901
+ ? side === 'white'
61902
+ ? state.online.participants?.black
61903
+ : state.online.participants?.white
61904
+ : isLobbyHost
61905
+ ? state.online.pendingGuest
61906
+ : state.online.lobby;
61907
+ return {
61908
+ gameId: state.id,
61909
+ mode: 'online',
61910
+ boardSize: state.boardSize,
61911
+ status: state.status,
61912
+ outcome: this.historyOutcome(state, uid, side, isPendingGuest),
61913
+ side,
61914
+ opponentUid: opponent?.uid,
61915
+ opponentName: opponent?.name,
61916
+ winner: state.winner,
61917
+ winnerReason: state.winnerReason,
61918
+ moveCount: state.moveCount,
61919
+ round: state.online.round,
61920
+ createdAt: state.online.createdAt,
61921
+ updatedAt: state.online.updatedAt,
61922
+ finishedAt: state.status === 'finished' ? state.online.updatedAt : undefined,
61923
+ expiresAt: state.online.expiresAt,
61924
+ rematchOf: state.online.rematchOf,
61925
+ };
61926
+ }
61927
+ withoutUndefined(value) {
61928
+ return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined));
61929
+ }
61930
+ historyOutcome(state, uid, side, isPendingGuest) {
61931
+ if (state.status === 'finished' && side && state.winner)
61932
+ return state.winner === side ? 'won' : 'lost';
61933
+ if (state.status === 'in_progress')
61934
+ return 'in_progress';
61935
+ if (isPendingGuest)
61936
+ return 'pending';
61937
+ return 'waiting';
61938
+ }
61818
61939
  assertNotExpired(state) {
61819
61940
  if ((state.online?.expiresAtMs ?? 0) < Date.now())
61820
61941
  throw new Error('CHESSIMALS_GAME_EXPIRED');
@@ -61965,14 +62086,35 @@ const MINI_GAMES_I18N = {
61965
62086
  chessimalsJoinCode: 'Código de partida',
61966
62087
  chessimalsJoinCodePlaceholder: 'Ej: ABCD-1234',
61967
62088
  chessimalsJoinOnline: 'Unirme',
62089
+ chessimalsOnlineLoading: 'Abriendo partida...',
61968
62090
  chessimalsWaitingTitle: 'Esperando rival',
61969
62091
  chessimalsWaitingBody: 'Comparte este link o código. Cuando entre otra persona, se sortearán los colores y empezará la partida.',
62092
+ chessimalsLobbyGuestWaitingTitle: 'Esperando aprobación',
62093
+ chessimalsLobbyGuestWaitingBody: 'Avisamos al creador de la partida. La partida comenzará cuando acepte.',
62094
+ chessimalsJoinRequestTitle: 'Solicitud para unirse',
62095
+ chessimalsJoinRequestBody: '{player} quiere jugar esta partida. Acepta para sortear colores y comenzar.',
62096
+ chessimalsJoinRequestPlayer: 'Jugador',
62097
+ chessimalsAcceptGuest: 'Aceptar',
62098
+ chessimalsRejectGuest: 'Rechazar',
62099
+ chessimalsGuestAccepted: 'Partida iniciada.',
62100
+ chessimalsGuestRejected: 'Solicitud rechazada.',
62101
+ chessimalsHistoryTitle: 'Tus partidas',
62102
+ chessimalsHistoryBody: 'Historial guardado en tu cuenta.',
62103
+ chessimalsHistoryOpen: 'Abrir',
62104
+ chessimalsHistoryWaiting: 'Esperando rival',
62105
+ chessimalsHistoryPending: 'Esperando aprobación',
62106
+ chessimalsHistoryInProgress: 'En curso',
62107
+ chessimalsHistoryWon: 'Ganada',
62108
+ chessimalsHistoryLost: 'Perdida',
62109
+ chessimalsHistoryDeclined: 'Rechazada',
62110
+ chessimalsHistoryAgainst: 'contra {player}',
61970
62111
  chessimalsGameCode: 'Código',
61971
62112
  chessimalsCopyLink: 'Copiar link',
61972
62113
  chessimalsShareLink: 'Compartir link',
61973
62114
  chessimalsLinkCopied: 'Link de la partida copiado.',
61974
62115
  chessimalsShareText: 'Únete a mi partida de Chessimals.',
61975
62116
  chessimalsOnlineWaiting: 'Esperando',
62117
+ chessimalsOnlinePending: 'Pendiente',
61976
62118
  chessimalsOnlinePlayer: 'Online',
61977
62119
  chessimalsSpectator: 'Observador',
61978
62120
  chessimalsOnlineViewer: 'Esta partida ya tiene dos jugadores. Puedes mirar cómo avanza.',
@@ -62162,14 +62304,35 @@ const MINI_GAMES_I18N = {
62162
62304
  chessimalsJoinCode: 'Game code',
62163
62305
  chessimalsJoinCodePlaceholder: 'E.g. ABCD-1234',
62164
62306
  chessimalsJoinOnline: 'Join',
62307
+ chessimalsOnlineLoading: 'Opening game...',
62165
62308
  chessimalsWaitingTitle: 'Waiting for rival',
62166
62309
  chessimalsWaitingBody: 'Share this link or code. When another player joins, colors are randomly assigned and the game starts.',
62310
+ chessimalsLobbyGuestWaitingTitle: 'Waiting for approval',
62311
+ chessimalsLobbyGuestWaitingBody: 'We notified the game creator. The game starts when they accept.',
62312
+ chessimalsJoinRequestTitle: 'Join request',
62313
+ chessimalsJoinRequestBody: '{player} wants to join this game. Accept to assign colors and start.',
62314
+ chessimalsJoinRequestPlayer: 'Player',
62315
+ chessimalsAcceptGuest: 'Accept',
62316
+ chessimalsRejectGuest: 'Reject',
62317
+ chessimalsGuestAccepted: 'Game started.',
62318
+ chessimalsGuestRejected: 'Request rejected.',
62319
+ chessimalsHistoryTitle: 'Your games',
62320
+ chessimalsHistoryBody: 'History saved to your account.',
62321
+ chessimalsHistoryOpen: 'Open',
62322
+ chessimalsHistoryWaiting: 'Waiting for rival',
62323
+ chessimalsHistoryPending: 'Waiting approval',
62324
+ chessimalsHistoryInProgress: 'In progress',
62325
+ chessimalsHistoryWon: 'Won',
62326
+ chessimalsHistoryLost: 'Lost',
62327
+ chessimalsHistoryDeclined: 'Declined',
62328
+ chessimalsHistoryAgainst: 'against {player}',
62167
62329
  chessimalsGameCode: 'Code',
62168
62330
  chessimalsCopyLink: 'Copy link',
62169
62331
  chessimalsShareLink: 'Share link',
62170
62332
  chessimalsLinkCopied: 'Game link copied.',
62171
62333
  chessimalsShareText: 'Join my Chessimals game.',
62172
62334
  chessimalsOnlineWaiting: 'Waiting',
62335
+ chessimalsOnlinePending: 'Pending',
62173
62336
  chessimalsOnlinePlayer: 'Online',
62174
62337
  chessimalsSpectator: 'Spectator',
62175
62338
  chessimalsOnlineViewer: 'This game already has two players. You can watch it play out.',
@@ -62583,6 +62746,7 @@ class ChessimalsGameComponent {
62583
62746
  this.onlineLoading = signal(false);
62584
62747
  this.onlineError = signal('');
62585
62748
  this.onlineUid = signal(undefined);
62749
+ this.onlineHistory = signal([]);
62586
62750
  this.resumeSplashVisible = signal(false);
62587
62751
  this.loggedInUser = this.auth.user;
62588
62752
  this.localPlayerProfile = computed(() => this.playerProfiles.activeProfile());
@@ -62610,6 +62774,7 @@ class ChessimalsGameComponent {
62610
62774
  size: 'small',
62611
62775
  bordered: true,
62612
62776
  }));
62777
+ this.miniGamesRoute = '/mini-games';
62613
62778
  this.currentPlayer = computed(() => this.game().players[this.game().currentTurn]);
62614
62779
  this.legalMoves = computed(() => {
62615
62780
  const pieceId = this.selectedPieceId();
@@ -62643,6 +62808,8 @@ class ChessimalsGameComponent {
62643
62808
  return 'spectator';
62644
62809
  if (this.online.isHostWaiting(game, uid))
62645
62810
  return 'waiting';
62811
+ if (game.status === 'waiting' && game.online?.pendingGuest?.uid === uid)
62812
+ return 'pending';
62646
62813
  return this.online.participantSide(game, uid) ?? 'spectator';
62647
62814
  });
62648
62815
  this.canPlayCurrentTurn = computed(() => {
@@ -62728,6 +62895,17 @@ class ChessimalsGameComponent {
62728
62895
  });
62729
62896
  this.i18n.registerDefaults('MiniGames', MINI_GAMES_I18N);
62730
62897
  this.audio.stopMusic();
62898
+ effect(() => {
62899
+ const user = this.loggedInUser();
62900
+ if (user) {
62901
+ this.queueHistoryWatch();
62902
+ return;
62903
+ }
62904
+ this.historyUid = undefined;
62905
+ this.historySubscription?.unsubscribe();
62906
+ this.historySubscription = undefined;
62907
+ this.onlineHistory.set([]);
62908
+ });
62731
62909
  }
62732
62910
  ngOnDestroy() {
62733
62911
  this.resetFinishedLocalGameForNextVisit(true);
@@ -62738,7 +62916,10 @@ class ChessimalsGameComponent {
62738
62916
  clearTimeout(this.moveAnimationTimer);
62739
62917
  if (this.botTurnTimer)
62740
62918
  clearTimeout(this.botTurnTimer);
62919
+ if (this.historyWatchTimer)
62920
+ clearTimeout(this.historyWatchTimer);
62741
62921
  this.onlineSubscription?.unsubscribe();
62922
+ this.historySubscription?.unsubscribe();
62742
62923
  }
62743
62924
  ngOnInit() {
62744
62925
  this.routeSubscription.add(this.router.events.subscribe((event) => {
@@ -62779,20 +62960,23 @@ class ChessimalsGameComponent {
62779
62960
  this.clearBotTurn();
62780
62961
  this.onlineError.set('');
62781
62962
  this.onlineLoading.set(true);
62963
+ this.resumeSplashVisible.set(true);
62782
62964
  try {
62783
62965
  const game = await this.online.createGame(this.selectedBoardSize());
62784
62966
  this.onlineUid.set(this.online.currentUid);
62967
+ this.queueHistoryWatch();
62785
62968
  this.openedOnlineGameId = game.id;
62786
62969
  this.watchOnlineGame(game.id);
62787
62970
  this.game.set(game);
62788
62971
  this.screen.set('game');
62789
62972
  this.audio.flip();
62790
62973
  this.focusBoardSoon();
62791
- void this.router.navigateByUrl(`/mini-games/chessimals/${game.id}`);
62974
+ void this.router.navigateByUrl(this.chessimalsGameRoute(game.id));
62792
62975
  }
62793
62976
  catch (error) {
62794
62977
  console.warn('[Chessimals] create online game failed', error);
62795
62978
  this.onlineError.set(this.t('chessimalsOnlineError'));
62979
+ this.resumeSplashVisible.set(false);
62796
62980
  this.audio.miss();
62797
62981
  }
62798
62982
  finally {
@@ -62807,8 +62991,10 @@ class ChessimalsGameComponent {
62807
62991
  return;
62808
62992
  }
62809
62993
  this.onlineJoinCode.set(gameId);
62810
- void this.router.navigateByUrl(`/mini-games/chessimals/${gameId}`);
62811
62994
  await this.openOnlineGame(gameId);
62995
+ if (this.openedOnlineGameId === gameId) {
62996
+ void this.router.navigateByUrl(this.chessimalsGameRoute(gameId));
62997
+ }
62812
62998
  }
62813
62999
  async openOnlineGame(gameId) {
62814
63000
  const normalizedGameId = this.online.normalizeGameId(gameId);
@@ -62823,10 +63009,12 @@ class ChessimalsGameComponent {
62823
63009
  this.clearBotTurn();
62824
63010
  this.onlineLoading.set(true);
62825
63011
  this.resumeSplashVisible.set(true);
63012
+ this.screen.set('game');
62826
63013
  this.openingOnlineGameId = normalizedGameId;
62827
63014
  try {
62828
63015
  await this.online.joinGame(normalizedGameId);
62829
63016
  this.onlineUid.set(this.online.currentUid);
63017
+ this.queueHistoryWatch();
62830
63018
  this.openedOnlineGameId = normalizedGameId;
62831
63019
  this.watchOnlineGame(normalizedGameId);
62832
63020
  this.screen.set('game');
@@ -62866,12 +63054,12 @@ class ChessimalsGameComponent {
62866
63054
  this.openedOnlineGameId = undefined;
62867
63055
  this.openingOnlineGameId = undefined;
62868
63056
  this.resumeSplashVisible.set(false);
62869
- void this.router.navigateByUrl('/mini-games');
62870
63057
  this.clearBotTurn();
62871
63058
  this.screen.set('home');
62872
63059
  this.selectedPieceId.set(undefined);
62873
63060
  this.selectedAnimal.set(undefined);
62874
63061
  this.movingPiece.set(undefined);
63062
+ void this.router.navigateByUrl(this.miniGamesBaseRoute()).catch(() => undefined);
62875
63063
  }
62876
63064
  resetFinishedLocalGameForNextVisit(returnHome = false) {
62877
63065
  const game = this.game();
@@ -63160,6 +63348,8 @@ class ChessimalsGameComponent {
63160
63348
  const role = this.onlineRole();
63161
63349
  if (role === 'waiting')
63162
63350
  return this.t('chessimalsOnlineWaiting');
63351
+ if (role === 'pending')
63352
+ return this.t('chessimalsOnlinePending');
63163
63353
  if (role === 'spectator')
63164
63354
  return this.t('chessimalsSpectator');
63165
63355
  return this.t('chessimalsOnlinePlayer');
@@ -63176,28 +63366,11 @@ class ChessimalsGameComponent {
63176
63366
  return this.t('chessimalsYourTurn');
63177
63367
  return this.t('chessimalsCurrentTurn').replace('{player}', this.playerLabel(game.currentTurn));
63178
63368
  }
63179
- turnBody() {
63180
- const game = this.game();
63181
- if (game.status === 'waiting')
63182
- return this.t('chessimalsWaitingBody');
63183
- if (game.mode === 'local' && this.selectedLocalMode() === 'bot') {
63184
- return game.currentTurn === CHESSIMALS_BOT_COLOR
63185
- ? this.t('chessimalsBotThinkingBody')
63186
- : this.t('chessimalsBotYourTurnBody');
63187
- }
63188
- if (game.mode === 'online' && this.onlineRole() === 'spectator')
63189
- return this.t('chessimalsOnlineViewer');
63190
- if (game.mode === 'online' && this.onlineRole() !== game.currentTurn)
63191
- return this.t('chessimalsWaitingTurn');
63192
- if (game.mode === 'online')
63193
- return this.t('chessimalsYourTurnBody');
63194
- return this.t('chessimalsBoardFlips');
63195
- }
63196
63369
  normalizeGameId(value) {
63197
63370
  return this.online.normalizeGameId(value);
63198
63371
  }
63199
63372
  async copyOnlineLink() {
63200
- const url = this.online.shareUrl(this.game().id);
63373
+ const url = this.online.shareUrl(this.game().id, this.miniGamesBaseRoute());
63201
63374
  try {
63202
63375
  await navigator.clipboard?.writeText(url);
63203
63376
  this.toast.show({ message: this.t('chessimalsLinkCopied'), color: 'dark', duration: 2200, position: 'top' });
@@ -63208,13 +63381,91 @@ class ChessimalsGameComponent {
63208
63381
  }
63209
63382
  }
63210
63383
  async shareOnlineLink() {
63211
- const url = this.online.shareUrl(this.game().id);
63384
+ const url = this.online.shareUrl(this.game().id, this.miniGamesBaseRoute());
63212
63385
  if (navigator.share) {
63213
63386
  await navigator.share({ title: this.t('chessimalsTitle'), text: this.t('chessimalsShareText'), url });
63214
63387
  return;
63215
63388
  }
63216
63389
  await this.copyOnlineLink();
63217
63390
  }
63391
+ canReviewPendingGuest() {
63392
+ const game = this.game();
63393
+ const uid = this.onlineUid();
63394
+ return !!uid
63395
+ && game.mode === 'online'
63396
+ && game.status === 'waiting'
63397
+ && game.online?.lobby?.uid === uid
63398
+ && !!game.online.pendingGuest;
63399
+ }
63400
+ pendingGuestName() {
63401
+ return this.game().online?.pendingGuest?.name ?? this.t('defaultPlayerName');
63402
+ }
63403
+ waitingTitle() {
63404
+ if (this.canReviewPendingGuest())
63405
+ return this.t('chessimalsJoinRequestTitle');
63406
+ if (this.onlineRole() === 'pending')
63407
+ return this.t('chessimalsLobbyGuestWaitingTitle');
63408
+ return this.t('chessimalsWaitingTitle');
63409
+ }
63410
+ waitingBody() {
63411
+ if (this.canReviewPendingGuest()) {
63412
+ return this.t('chessimalsJoinRequestBody').replace('{player}', this.pendingGuestName());
63413
+ }
63414
+ if (this.onlineRole() === 'pending')
63415
+ return this.t('chessimalsLobbyGuestWaitingBody');
63416
+ return this.t('chessimalsWaitingBody');
63417
+ }
63418
+ async acceptOnlineGuest() {
63419
+ if (!this.canReviewPendingGuest())
63420
+ return;
63421
+ this.onlineLoading.set(true);
63422
+ try {
63423
+ await this.online.acceptGuest(this.game().id);
63424
+ this.toast.show({ message: this.t('chessimalsGuestAccepted'), color: 'dark', duration: 2200, position: 'top' });
63425
+ this.audio.flip();
63426
+ }
63427
+ catch (error) {
63428
+ console.warn('[Chessimals] accept guest failed', error);
63429
+ this.onlineError.set(this.t('chessimalsOnlineError'));
63430
+ this.audio.miss();
63431
+ }
63432
+ finally {
63433
+ this.onlineLoading.set(false);
63434
+ }
63435
+ }
63436
+ async rejectOnlineGuest() {
63437
+ if (!this.canReviewPendingGuest())
63438
+ return;
63439
+ this.onlineLoading.set(true);
63440
+ try {
63441
+ await this.online.rejectGuest(this.game().id);
63442
+ this.toast.show({ message: this.t('chessimalsGuestRejected'), color: 'dark', duration: 2200, position: 'top' });
63443
+ this.audio.miss();
63444
+ }
63445
+ catch (error) {
63446
+ console.warn('[Chessimals] reject guest failed', error);
63447
+ this.onlineError.set(this.t('chessimalsOnlineError'));
63448
+ this.audio.miss();
63449
+ }
63450
+ finally {
63451
+ this.onlineLoading.set(false);
63452
+ }
63453
+ }
63454
+ openHistoryGame(entry) {
63455
+ this.onlineJoinCode.set(entry.gameId);
63456
+ void this.openOnlineGame(entry.gameId);
63457
+ void this.router.navigateByUrl(this.chessimalsGameRoute(entry.gameId));
63458
+ }
63459
+ historyOutcomeLabel(entry) {
63460
+ const outcomeKey = `chessimalsHistory${entry.outcome
63461
+ .split('_')
63462
+ .map((part) => this.capitalize(part))
63463
+ .join('')}`;
63464
+ const opponent = entry.opponentName
63465
+ ? ` · ${this.t('chessimalsHistoryAgainst').replace('{player}', entry.opponentName)}`
63466
+ : '';
63467
+ return `${this.t(outcomeKey)}${opponent}`;
63468
+ }
63218
63469
  async requestOnlineRematch() {
63219
63470
  if (this.game().mode !== 'online')
63220
63471
  return;
@@ -63227,6 +63478,24 @@ class ChessimalsGameComponent {
63227
63478
  this.audio.miss();
63228
63479
  }
63229
63480
  }
63481
+ queueHistoryWatch() {
63482
+ if (this.historyWatchTimer)
63483
+ clearTimeout(this.historyWatchTimer);
63484
+ this.historyWatchTimer = setTimeout(() => this.watchOnlineHistory(), 220);
63485
+ }
63486
+ watchOnlineHistory() {
63487
+ const uid = this.online.currentUid;
63488
+ if (!uid)
63489
+ return;
63490
+ if (this.historyUid === uid && this.historySubscription)
63491
+ return;
63492
+ this.historyUid = uid;
63493
+ this.historySubscription?.unsubscribe();
63494
+ this.historySubscription = this.online.watchHistory().subscribe({
63495
+ next: (history) => this.onlineHistory.set(history),
63496
+ error: () => this.onlineHistory.set([]),
63497
+ });
63498
+ }
63230
63499
  unlockedLabel(color) {
63231
63500
  return this.game().players[color].powerUnlocked ? this.t('chessimalsUnlocked') : this.t('chessimalsLocked');
63232
63501
  }
@@ -63281,11 +63550,18 @@ class ChessimalsGameComponent {
63281
63550
  },
63282
63551
  });
63283
63552
  }
63553
+ miniGamesBaseRoute() {
63554
+ const route = (this.miniGamesRoute || '/mini-games').trim();
63555
+ return `/${route.replace(/^\/+|\/+$/g, '') || 'mini-games'}`;
63556
+ }
63557
+ chessimalsGameRoute(gameId) {
63558
+ return `${this.miniGamesBaseRoute()}/chessimals/${encodeURIComponent(this.online.normalizeGameId(gameId))}`;
63559
+ }
63284
63560
  capitalize(value) {
63285
63561
  return value.charAt(0).toUpperCase() + value.slice(1);
63286
63562
  }
63287
63563
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsGameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63288
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChessimalsGameComponent, isStandalone: true, selector: "val-chessimals-game", inputs: { onlineGameId: "onlineGameId" }, viewQueries: [{ propertyName: "boardAnchor", first: true, predicate: ["boardAnchor"], descendants: true }], ngImport: i0, template: `
63564
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChessimalsGameComponent, isStandalone: true, selector: "val-chessimals-game", inputs: { onlineGameId: "onlineGameId", miniGamesRoute: "miniGamesRoute" }, viewQueries: [{ propertyName: "boardAnchor", first: true, predicate: ["boardAnchor"], descendants: true }], ngImport: i0, template: `
63289
63565
  <main class="chessimals-shell">
63290
63566
  @if (screen() === 'home') {
63291
63567
  <section class="chessimals-hero">
@@ -63355,6 +63631,12 @@ class ChessimalsGameComponent {
63355
63631
  @if (onlineError()) {
63356
63632
  <p class="chessimals-online__error">{{ onlineError() }}</p>
63357
63633
  }
63634
+ @if (onlineLoading()) {
63635
+ <div class="chessimals-online__loading" role="status" aria-live="polite">
63636
+ <span aria-hidden="true"></span>
63637
+ <strong>{{ t('chessimalsOnlineLoading') }}</strong>
63638
+ </div>
63639
+ }
63358
63640
  <div class="chessimals-online__create">
63359
63641
  <button
63360
63642
  class="chessimals-primary"
@@ -63387,6 +63669,28 @@ class ChessimalsGameComponent {
63387
63669
  </button>
63388
63670
  </div>
63389
63671
  </article>
63672
+
63673
+ @if (onlineHistory().length) {
63674
+ <article class="chessimals-online chessimals-history">
63675
+ <div class="chessimals-history__heading">
63676
+ <div>
63677
+ <h2>{{ t('chessimalsHistoryTitle') }}</h2>
63678
+ <p>{{ t('chessimalsHistoryBody') }}</p>
63679
+ </div>
63680
+ </div>
63681
+ <div class="chessimals-history__list">
63682
+ @for (entry of onlineHistory(); track entry.gameId) {
63683
+ <button type="button" class="chessimals-history__item" (click)="openHistoryGame(entry)">
63684
+ <span>
63685
+ <strong>{{ entry.gameId }}</strong>
63686
+ <small>{{ historyOutcomeLabel(entry) }}</small>
63687
+ </span>
63688
+ <em>{{ t('chessimalsHistoryOpen') }}</em>
63689
+ </button>
63690
+ }
63691
+ </div>
63692
+ </article>
63693
+ }
63390
63694
  </section>
63391
63695
  } @else {
63392
63696
  <section class="chessimals-game">
@@ -63408,7 +63712,9 @@ class ChessimalsGameComponent {
63408
63712
  {{ game().status === 'finished' ? t('chessimalsFinishedChip') : modeChipLabel() }}
63409
63713
  </span>
63410
63714
  <strong>{{ game().status === 'finished' ? winTitle() : turnTitle() }}</strong>
63411
- <p>{{ game().status === 'finished' ? winBody() : turnBody() }}</p>
63715
+ @if (game().status === 'finished') {
63716
+ <p>{{ winBody() }}</p>
63717
+ }
63412
63718
  </div>
63413
63719
 
63414
63720
  <div class="chessimals-player-strip">
@@ -63433,20 +63739,40 @@ class ChessimalsGameComponent {
63433
63739
  @if (game().mode === 'online' && game().status === 'waiting') {
63434
63740
  <article class="chessimals-online chessimals-online--waiting">
63435
63741
  <div>
63436
- <h2>{{ t('chessimalsWaitingTitle') }}</h2>
63437
- <p>{{ t('chessimalsWaitingBody') }}</p>
63742
+ <h2>{{ waitingTitle() }}</h2>
63743
+ <p>{{ waitingBody() }}</p>
63438
63744
  </div>
63745
+ @if (canReviewPendingGuest()) {
63746
+ <div class="chessimals-pending-player">
63747
+ <span class="chessimals-player-strip__avatar" aria-hidden="true">
63748
+ {{ game().online?.pendingGuest?.avatar ?? '♟️' }}
63749
+ </span>
63750
+ <div>
63751
+ <small>{{ t('chessimalsJoinRequestPlayer') }}</small>
63752
+ <strong>{{ pendingGuestName() }}</strong>
63753
+ </div>
63754
+ </div>
63755
+ }
63439
63756
  <div class="chessimals-game-code">
63440
63757
  <small>{{ t('chessimalsGameCode') }}</small>
63441
63758
  <strong>{{ game().id }}</strong>
63442
63759
  </div>
63443
63760
  <div class="chessimals-online-actions">
63444
- <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
63445
- {{ t('chessimalsCopyLink') }}
63446
- </button>
63447
- <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
63448
- {{ t('chessimalsShareLink') }}
63449
- </button>
63761
+ @if (canReviewPendingGuest()) {
63762
+ <button class="chessimals-secondary" type="button" (click)="rejectOnlineGuest()">
63763
+ {{ t('chessimalsRejectGuest') }}
63764
+ </button>
63765
+ <button class="chessimals-primary" type="button" (click)="acceptOnlineGuest()">
63766
+ {{ t('chessimalsAcceptGuest') }}
63767
+ </button>
63768
+ } @else {
63769
+ <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
63770
+ {{ t('chessimalsCopyLink') }}
63771
+ </button>
63772
+ <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
63773
+ {{ t('chessimalsShareLink') }}
63774
+ </button>
63775
+ }
63450
63776
  </div>
63451
63777
  </article>
63452
63778
  }
@@ -63564,35 +63890,37 @@ class ChessimalsGameComponent {
63564
63890
  </div>
63565
63891
  </section>
63566
63892
 
63567
- <section
63568
- class="chessimals-powers"
63569
- [class.is-locked]="!currentPlayer().powerUnlocked"
63570
- [class.is-ready]="currentPlayer().powerUnlocked"
63571
- >
63572
- <div>
63573
- <div class="chessimals-powers__heading">
63574
- <h2>{{ t('chessimalsAnimalCards') }}</h2>
63575
- <span>{{ currentPlayer().powerUnlocked ? t('chessimalsUnlocked') : t('chessimalsLocked') }}</span>
63893
+ @if (onlineRole() !== 'spectator') {
63894
+ <section
63895
+ class="chessimals-powers"
63896
+ [class.is-locked]="!currentPlayer().powerUnlocked"
63897
+ [class.is-ready]="currentPlayer().powerUnlocked"
63898
+ >
63899
+ <div>
63900
+ <div class="chessimals-powers__heading">
63901
+ <h2>{{ t('chessimalsAnimalCards') }}</h2>
63902
+ <span>{{ currentPlayer().powerUnlocked ? t('chessimalsUnlocked') : t('chessimalsLocked') }}</span>
63903
+ </div>
63904
+ <p>{{ currentPlayer().powerUnlocked ? t('chessimalsCardsReady') : t('chessimalsCardsLocked') }}</p>
63576
63905
  </div>
63577
- <p>{{ currentPlayer().powerUnlocked ? t('chessimalsCardsReady') : t('chessimalsCardsLocked') }}</p>
63578
- </div>
63579
- <div class="chessimals-cards">
63580
- @for (animal of animals; track animal.type) {
63581
- <button
63582
- type="button"
63583
- [class.is-selected]="selectedAnimal() === animal.type"
63584
- [class.is-used]="currentPlayer().cards[animal.type].used"
63585
- [disabled]="!currentPlayer().powerUnlocked || currentPlayer().cards[animal.type].used || game().status !== 'in_progress' || !canPlayCurrentTurn() || !!movingPiece()"
63586
- (click)="toggleAnimal(animal)"
63587
- >
63588
- <span class="chessimals-animal-face" aria-hidden="true">
63589
- <img [src]="animal.assetSrc" [alt]="animalLabel(animal.type)" />
63590
- </span>
63591
- <strong>{{ animalLabel(animal.type) }}</strong>
63592
- </button>
63593
- }
63594
- </div>
63595
- </section>
63906
+ <div class="chessimals-cards">
63907
+ @for (animal of animals; track animal.type) {
63908
+ <button
63909
+ type="button"
63910
+ [class.is-selected]="selectedAnimal() === animal.type"
63911
+ [class.is-used]="currentPlayer().cards[animal.type].used"
63912
+ [disabled]="!currentPlayer().powerUnlocked || currentPlayer().cards[animal.type].used || game().status !== 'in_progress' || !canPlayCurrentTurn() || !!movingPiece()"
63913
+ (click)="toggleAnimal(animal)"
63914
+ >
63915
+ <span class="chessimals-animal-face" aria-hidden="true">
63916
+ <img [src]="animal.assetSrc" [alt]="animalLabel(animal.type)" />
63917
+ </span>
63918
+ <strong>{{ animalLabel(animal.type) }}</strong>
63919
+ </button>
63920
+ }
63921
+ </div>
63922
+ </section>
63923
+ }
63596
63924
  </section>
63597
63925
 
63598
63926
  @if (game().status === 'finished') {
@@ -63705,7 +64033,7 @@ class ChessimalsGameComponent {
63705
64033
  />
63706
64034
  </ng-template>
63707
64035
  </ion-modal>
63708
- `, isInline: true, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ModalLayoutComponent, selector: "val-modal-layout", inputs: ["title", "subtitle", "closeLabel", "showClose", "actions", "actionsAlign", "footer", "footerClass"], outputs: ["close", "actionClick"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }] }); }
64036
+ `, isInline: true, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-history{gap:.75rem}.chessimals-history__heading{display:flex;align-items:start;justify-content:space-between;gap:.75rem}.chessimals-history__list{display:grid;gap:.5rem}.chessimals-history__item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;border:1px solid var(--chessimals-border);border-radius:1rem;padding:.7rem .8rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-history__item span{display:grid;gap:.1rem;min-width:0}.chessimals-history__item strong{font-weight:950;letter-spacing:.04em}.chessimals-history__item small{overflow:hidden;color:var(--chessimals-muted);font-size:.82rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.chessimals-history__item em{flex:0 0 auto;color:var(--chessimals-primary);font-size:.86rem;font-style:normal;font-weight:950}.chessimals-pending-player{display:flex;align-items:center;gap:.7rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:1rem;padding:.75rem;background:var(--chessimals-soft)}.chessimals-pending-player div{display:grid;gap:.1rem;min-width:0}.chessimals-pending-player small{color:var(--chessimals-muted);font-size:.72rem;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.chessimals-pending-player strong{overflow:hidden;font-size:1.05rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"], dependencies: [{ kind: "component", type: IonModal, selector: "ion-modal" }, { kind: "component", type: ModalLayoutComponent, selector: "val-modal-layout", inputs: ["title", "subtitle", "closeLabel", "showClose", "actions", "actionsAlign", "footer", "footerClass"], outputs: ["close", "actionClick"] }, { kind: "component", type: UserAvatarComponent, selector: "val-user-avatar", inputs: ["props"], outputs: ["onClick"] }] }); }
63709
64037
  }
63710
64038
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsGameComponent, decorators: [{
63711
64039
  type: Component,
@@ -63779,6 +64107,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63779
64107
  @if (onlineError()) {
63780
64108
  <p class="chessimals-online__error">{{ onlineError() }}</p>
63781
64109
  }
64110
+ @if (onlineLoading()) {
64111
+ <div class="chessimals-online__loading" role="status" aria-live="polite">
64112
+ <span aria-hidden="true"></span>
64113
+ <strong>{{ t('chessimalsOnlineLoading') }}</strong>
64114
+ </div>
64115
+ }
63782
64116
  <div class="chessimals-online__create">
63783
64117
  <button
63784
64118
  class="chessimals-primary"
@@ -63811,6 +64145,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63811
64145
  </button>
63812
64146
  </div>
63813
64147
  </article>
64148
+
64149
+ @if (onlineHistory().length) {
64150
+ <article class="chessimals-online chessimals-history">
64151
+ <div class="chessimals-history__heading">
64152
+ <div>
64153
+ <h2>{{ t('chessimalsHistoryTitle') }}</h2>
64154
+ <p>{{ t('chessimalsHistoryBody') }}</p>
64155
+ </div>
64156
+ </div>
64157
+ <div class="chessimals-history__list">
64158
+ @for (entry of onlineHistory(); track entry.gameId) {
64159
+ <button type="button" class="chessimals-history__item" (click)="openHistoryGame(entry)">
64160
+ <span>
64161
+ <strong>{{ entry.gameId }}</strong>
64162
+ <small>{{ historyOutcomeLabel(entry) }}</small>
64163
+ </span>
64164
+ <em>{{ t('chessimalsHistoryOpen') }}</em>
64165
+ </button>
64166
+ }
64167
+ </div>
64168
+ </article>
64169
+ }
63814
64170
  </section>
63815
64171
  } @else {
63816
64172
  <section class="chessimals-game">
@@ -63832,7 +64188,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63832
64188
  {{ game().status === 'finished' ? t('chessimalsFinishedChip') : modeChipLabel() }}
63833
64189
  </span>
63834
64190
  <strong>{{ game().status === 'finished' ? winTitle() : turnTitle() }}</strong>
63835
- <p>{{ game().status === 'finished' ? winBody() : turnBody() }}</p>
64191
+ @if (game().status === 'finished') {
64192
+ <p>{{ winBody() }}</p>
64193
+ }
63836
64194
  </div>
63837
64195
 
63838
64196
  <div class="chessimals-player-strip">
@@ -63857,20 +64215,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63857
64215
  @if (game().mode === 'online' && game().status === 'waiting') {
63858
64216
  <article class="chessimals-online chessimals-online--waiting">
63859
64217
  <div>
63860
- <h2>{{ t('chessimalsWaitingTitle') }}</h2>
63861
- <p>{{ t('chessimalsWaitingBody') }}</p>
64218
+ <h2>{{ waitingTitle() }}</h2>
64219
+ <p>{{ waitingBody() }}</p>
63862
64220
  </div>
64221
+ @if (canReviewPendingGuest()) {
64222
+ <div class="chessimals-pending-player">
64223
+ <span class="chessimals-player-strip__avatar" aria-hidden="true">
64224
+ {{ game().online?.pendingGuest?.avatar ?? '♟️' }}
64225
+ </span>
64226
+ <div>
64227
+ <small>{{ t('chessimalsJoinRequestPlayer') }}</small>
64228
+ <strong>{{ pendingGuestName() }}</strong>
64229
+ </div>
64230
+ </div>
64231
+ }
63863
64232
  <div class="chessimals-game-code">
63864
64233
  <small>{{ t('chessimalsGameCode') }}</small>
63865
64234
  <strong>{{ game().id }}</strong>
63866
64235
  </div>
63867
64236
  <div class="chessimals-online-actions">
63868
- <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
63869
- {{ t('chessimalsCopyLink') }}
63870
- </button>
63871
- <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
63872
- {{ t('chessimalsShareLink') }}
63873
- </button>
64237
+ @if (canReviewPendingGuest()) {
64238
+ <button class="chessimals-secondary" type="button" (click)="rejectOnlineGuest()">
64239
+ {{ t('chessimalsRejectGuest') }}
64240
+ </button>
64241
+ <button class="chessimals-primary" type="button" (click)="acceptOnlineGuest()">
64242
+ {{ t('chessimalsAcceptGuest') }}
64243
+ </button>
64244
+ } @else {
64245
+ <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
64246
+ {{ t('chessimalsCopyLink') }}
64247
+ </button>
64248
+ <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
64249
+ {{ t('chessimalsShareLink') }}
64250
+ </button>
64251
+ }
63874
64252
  </div>
63875
64253
  </article>
63876
64254
  }
@@ -63988,35 +64366,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63988
64366
  </div>
63989
64367
  </section>
63990
64368
 
63991
- <section
63992
- class="chessimals-powers"
63993
- [class.is-locked]="!currentPlayer().powerUnlocked"
63994
- [class.is-ready]="currentPlayer().powerUnlocked"
63995
- >
63996
- <div>
63997
- <div class="chessimals-powers__heading">
63998
- <h2>{{ t('chessimalsAnimalCards') }}</h2>
63999
- <span>{{ currentPlayer().powerUnlocked ? t('chessimalsUnlocked') : t('chessimalsLocked') }}</span>
64369
+ @if (onlineRole() !== 'spectator') {
64370
+ <section
64371
+ class="chessimals-powers"
64372
+ [class.is-locked]="!currentPlayer().powerUnlocked"
64373
+ [class.is-ready]="currentPlayer().powerUnlocked"
64374
+ >
64375
+ <div>
64376
+ <div class="chessimals-powers__heading">
64377
+ <h2>{{ t('chessimalsAnimalCards') }}</h2>
64378
+ <span>{{ currentPlayer().powerUnlocked ? t('chessimalsUnlocked') : t('chessimalsLocked') }}</span>
64379
+ </div>
64380
+ <p>{{ currentPlayer().powerUnlocked ? t('chessimalsCardsReady') : t('chessimalsCardsLocked') }}</p>
64000
64381
  </div>
64001
- <p>{{ currentPlayer().powerUnlocked ? t('chessimalsCardsReady') : t('chessimalsCardsLocked') }}</p>
64002
- </div>
64003
- <div class="chessimals-cards">
64004
- @for (animal of animals; track animal.type) {
64005
- <button
64006
- type="button"
64007
- [class.is-selected]="selectedAnimal() === animal.type"
64008
- [class.is-used]="currentPlayer().cards[animal.type].used"
64009
- [disabled]="!currentPlayer().powerUnlocked || currentPlayer().cards[animal.type].used || game().status !== 'in_progress' || !canPlayCurrentTurn() || !!movingPiece()"
64010
- (click)="toggleAnimal(animal)"
64011
- >
64012
- <span class="chessimals-animal-face" aria-hidden="true">
64013
- <img [src]="animal.assetSrc" [alt]="animalLabel(animal.type)" />
64014
- </span>
64015
- <strong>{{ animalLabel(animal.type) }}</strong>
64016
- </button>
64017
- }
64018
- </div>
64019
- </section>
64382
+ <div class="chessimals-cards">
64383
+ @for (animal of animals; track animal.type) {
64384
+ <button
64385
+ type="button"
64386
+ [class.is-selected]="selectedAnimal() === animal.type"
64387
+ [class.is-used]="currentPlayer().cards[animal.type].used"
64388
+ [disabled]="!currentPlayer().powerUnlocked || currentPlayer().cards[animal.type].used || game().status !== 'in_progress' || !canPlayCurrentTurn() || !!movingPiece()"
64389
+ (click)="toggleAnimal(animal)"
64390
+ >
64391
+ <span class="chessimals-animal-face" aria-hidden="true">
64392
+ <img [src]="animal.assetSrc" [alt]="animalLabel(animal.type)" />
64393
+ </span>
64394
+ <strong>{{ animalLabel(animal.type) }}</strong>
64395
+ </button>
64396
+ }
64397
+ </div>
64398
+ </section>
64399
+ }
64020
64400
  </section>
64021
64401
 
64022
64402
  @if (game().status === 'finished') {
@@ -64129,12 +64509,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
64129
64509
  />
64130
64510
  </ng-template>
64131
64511
  </ion-modal>
64132
- `, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"] }]
64512
+ `, styles: [":host{display:block}.chessimals-shell{--chessimals-panel: var(--ion-card-background, #ffffff);--chessimals-border: var(--ion-border-color, #e7e4ea);--chessimals-text: var(--ion-color-dark, #2f2a3a);--chessimals-muted: var(--ion-color-medium, #6f6a7a);--chessimals-soft: rgba(var(--ion-color-primary-rgb, 255, 0, 178), .08);--chessimals-primary: var(--ion-color-primary, #ff00b2);--chessimals-secondary: var(--ion-color-tertiary, #6a2de2);--chessimals-selected: #2fffa1;--chessimals-selected-rgb: 47, 255, 161;--chessimals-move: var(--ion-color-secondary, #3dc2ff);--chessimals-move-rgb: var(--ion-color-secondary-rgb, 61, 194, 255);--chessimals-capture: #00e6d0;--chessimals-capture-rgb: 0, 230, 208;--chessimals-last: #b98cff;--chessimals-last-rgb: 185, 140, 255;--chessimals-cell-light: var(--chessimals-panel);--chessimals-cell-dark: var(--chessimals-soft);--chessimals-piece-white-fill: #ffffff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .08);--chessimals-piece-white-shadow: drop-shadow(0 0 .08rem rgba(47, 42, 58, .32)) drop-shadow(0 .18rem .22rem rgba(47, 42, 58, .16));--chessimals-piece-black-fill: #2f2a3a;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .08);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .28rem rgba(0, 0, 0, .26));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .88), transparent 30%), color-mix(in srgb, var(--chessimals-text) 6%, var(--chessimals-panel));--chessimals-animal-face-border: color-mix(in srgb, var(--chessimals-text) 13%, transparent);--chessimals-animal-face-filter: drop-shadow(0 .12rem .12rem rgba(0, 0, 0, .16));--chessimals-animal-face-locked-filter: grayscale(.2) saturate(.72);--chessimals-animal-face-locked-img-opacity: .72;display:grid;gap:1.125rem;max-width:48rem;margin:0 auto;color:var(--chessimals-text)}.chessimals-resume-splash{order:0;position:fixed;inset:0;z-index:1000;display:grid;place-items:center;align-content:center;gap:.65rem;padding:1.5rem;text-align:center;color:var(--chessimals-text);background:radial-gradient(circle at 50% 42%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.18),transparent 22rem),color-mix(in srgb,var(--chessimals-panel) 92%,transparent);backdrop-filter:blur(.9rem)}.chessimals-resume-splash span{display:grid;place-items:center;width:4.75rem;height:4.75rem;border-radius:1.6rem;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:2.25rem;box-shadow:0 1.25rem 3rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.32);animation:chessimals-resume-pulse 1.2s ease-in-out infinite}.chessimals-resume-splash strong{font-size:clamp(1.55rem,5vw,2.4rem);font-weight:950;line-height:1.05}.chessimals-resume-splash p{max-width:24rem;margin:0;color:var(--chessimals-muted);font-size:1rem;line-height:1.35}@keyframes chessimals-resume-pulse{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(-.25rem) scale(1.04)}}@keyframes chessimals-spin{to{transform:rotate(360deg)}}:host-context(html.ion-palette-dark) .chessimals-shell,:host-context([data-theme=\"dark\"]) .chessimals-shell{--chessimals-panel: #231f2d;--chessimals-border: rgba(255, 255, 255, .13);--chessimals-text: #fff8ff;--chessimals-muted: rgba(255, 248, 255, .68);--chessimals-soft: rgba(255, 255, 255, .07);--chessimals-cell-light: #24202e;--chessimals-cell-dark: #54515d;--chessimals-piece-white-fill: #fffaff;--chessimals-piece-white-side: transparent;--chessimals-piece-white-line: rgba(47, 42, 58, .1);--chessimals-piece-white-shadow: drop-shadow(0 0 .1rem rgba(255, 255, 255, .62)) drop-shadow(0 .18rem .24rem rgba(0, 0, 0, .22));--chessimals-piece-black-fill: #17131f;--chessimals-piece-black-side: transparent;--chessimals-piece-black-line: rgba(255, 255, 255, .12);--chessimals-piece-black-shadow: drop-shadow(0 0 .08rem rgba(255, 255, 255, .46)) drop-shadow(0 0 .28rem rgba(255, 255, 255, .18)) drop-shadow(0 .22rem .34rem rgba(0, 0, 0, .42));--chessimals-animal-face-bg: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .18), transparent 30%), linear-gradient(145deg, #f7f0ff, #d8d1e4);--chessimals-animal-face-border: rgba(255, 255, 255, .72);--chessimals-animal-face-filter: drop-shadow(0 .12rem .16rem rgba(0, 0, 0, .22));--chessimals-animal-face-locked-filter: grayscale(.32) saturate(.72);--chessimals-animal-face-locked-img-opacity: .58}.chessimals-hero{display:grid;gap:.75rem;overflow:hidden;border-radius:1.75rem;padding:clamp(2rem,7vw,4rem);background:radial-gradient(circle at 22% 18%,rgba(255,255,255,.52),transparent 16%),linear-gradient(135deg,var(--chessimals-primary),var(--chessimals-secondary));color:#fff;text-align:center}.chessimals-hero__icon{font-size:clamp(2.5rem,10vw,5rem);line-height:1}.chessimals-hero h1{margin:0;font-size:clamp(3rem,12vw,5.5rem);line-height:.9;font-weight:950}.chessimals-hero p,.chessimals-howto p,.chessimals-tip p,.chessimals-result p,.chessimals-powers p{margin:0;line-height:1.45}.chessimals-panel,.chessimals-game,.chessimals-powers{display:grid;gap:1rem;border:1px solid var(--chessimals-border);border-radius:1.625rem;padding:clamp(1rem,4vw,1.5rem);background:var(--chessimals-panel)}.chessimals-online{display:grid;gap:.875rem;border:1px solid var(--chessimals-border);border-radius:1.375rem;padding:1rem;background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08),transparent),var(--chessimals-panel)}.chessimals-online--waiting{order:2;border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.34)}.chessimals-online h2,.chessimals-online p{margin:0}.chessimals-online h2{font-size:1.1rem;font-weight:950}.chessimals-online p{color:var(--chessimals-muted);line-height:1.4}.chessimals-online__create,.chessimals-online__join{display:grid;gap:.55rem}.chessimals-online__create small{color:var(--chessimals-muted);font-weight:800;line-height:1.35}.chessimals-online__join{border-top:1px solid var(--chessimals-border);padding-top:.85rem}.chessimals-online__join>strong{font-size:.95rem;font-weight:950}.chessimals-online__error{border-radius:.875rem;padding:.7rem .8rem;background:rgba(var(--ion-color-danger-rgb, 235, 68, 90),.12);color:var(--ion-color-danger, #eb445a)!important;font-weight:800}.chessimals-online__loading{display:flex;align-items:center;gap:.625rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:999px;padding:.65rem .85rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.08);color:var(--chessimals-text);font-size:.92rem;font-weight:900}.chessimals-online__loading span{width:1rem;height:1rem;border:.15rem solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-top-color:var(--chessimals-primary);border-radius:999px;animation:chessimals-spin .75s linear infinite}.chessimals-online-code{display:grid;gap:.4rem;font-weight:950}.chessimals-online-code input{width:100%;min-height:3.3rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:850;letter-spacing:.05em;text-transform:uppercase}.chessimals-game-code{display:grid;gap:.2rem;border-radius:1rem;padding:.85rem 1rem;background:var(--chessimals-soft)}.chessimals-game-code small{color:var(--chessimals-muted);font-weight:900;letter-spacing:.06em;text-transform:uppercase}.chessimals-game-code strong{font-size:clamp(1.35rem,6vw,2rem);font-weight:950;letter-spacing:.05em}.chessimals-online-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-history{gap:.75rem}.chessimals-history__heading{display:flex;align-items:start;justify-content:space-between;gap:.75rem}.chessimals-history__list{display:grid;gap:.5rem}.chessimals-history__item{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;border:1px solid var(--chessimals-border);border-radius:1rem;padding:.7rem .8rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-history__item span{display:grid;gap:.1rem;min-width:0}.chessimals-history__item strong{font-weight:950;letter-spacing:.04em}.chessimals-history__item small{overflow:hidden;color:var(--chessimals-muted);font-size:.82rem;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.chessimals-history__item em{flex:0 0 auto;color:var(--chessimals-primary);font-size:.86rem;font-style:normal;font-weight:950}.chessimals-pending-player{display:flex;align-items:center;gap:.7rem;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22);border-radius:1rem;padding:.75rem;background:var(--chessimals-soft)}.chessimals-pending-player div{display:grid;gap:.1rem;min-width:0}.chessimals-pending-player small{color:var(--chessimals-muted);font-size:.72rem;font-weight:950;letter-spacing:.07em;text-transform:uppercase}.chessimals-pending-player strong{overflow:hidden;font-size:1.05rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-game{display:grid;gap:.875rem}.chessimals-turn-card{order:1;display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-height:3.75rem;overflow:visible;border:1px solid rgba(var(--ion-color-primary-rgb, 255, 0, 178),.24);border-radius:1rem;padding:.55rem .65rem;background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.34),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.2),rgba(var(--ion-color-tertiary-rgb, 106, 45, 226),.1))}.chessimals-turn-card.is-black-turn{border-color:rgba(var(--ion-color-dark-rgb, 47, 42, 58),.28);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.12),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-dark-rgb, 47, 42, 58),.14),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.1))}.chessimals-turn-card.is-finished{border-color:rgba(var(--ion-color-success-rgb, 45, 211, 111),.42);background:radial-gradient(circle at 15% 18%,rgba(255,255,255,.35),transparent 18%),linear-gradient(135deg,rgba(var(--ion-color-success-rgb, 45, 211, 111),.18),rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12))}.chessimals-turn-card.is-finished .chessimals-turn-card__chip{color:var(--ion-color-success, #2dd36f)}.chessimals-turn-card__copy{display:grid;min-width:0;gap:.15rem}.chessimals-turn-card__chip{justify-self:start;border-radius:999px;padding:.2rem .5rem;background:var(--chessimals-panel);color:var(--chessimals-primary);font-size:.62rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.chessimals-turn-card strong{display:block;min-width:0;font-size:clamp(1rem,3.5vw,1.25rem);line-height:1.08;font-weight:950;overflow-wrap:anywhere}.chessimals-turn-card p{display:block;min-width:0;margin:0;color:var(--chessimals-muted);font-size:.78rem;line-height:1.22}.chessimals-player-strip{display:flex;flex:0 0 auto;align-items:center;gap:.45rem;min-width:10rem;max-width:min(17rem,42%);border:1px solid var(--chessimals-border);border-radius:999px;padding:.3rem .55rem .3rem .35rem;background:rgba(var(--ion-color-light-rgb, 244, 245, 248),.72)}:host-context(html.ion-palette-dark) .chessimals-player-strip,:host-context([data-theme=\"dark\"]) .chessimals-player-strip{background:#ffffff0f}.chessimals-player-strip__avatar{display:grid;place-items:center;flex:0 0 1.75rem;width:1.75rem;height:1.75rem;border-radius:999px;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);font-size:.875rem;line-height:1}.chessimals-player-strip__text{display:grid;min-width:0;gap:.05rem;line-height:1.1}.chessimals-player-strip__text span{color:var(--chessimals-muted);font-size:.58rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-player-strip__text strong{overflow:hidden;font-size:.82rem;line-height:1.08;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-player-strip__text small{overflow:hidden;color:var(--chessimals-muted);font-size:.66rem;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}.chessimals-arena{order:4;display:grid;gap:.875rem;align-items:start}.chessimals-howto,.chessimals-tip,.chessimals-result{display:grid;gap:.375rem;padding:1rem;border-radius:1.25rem;background:var(--chessimals-soft)}.chessimals-result{order:5}.chessimals-howto h2,.chessimals-powers h2{margin:0;font-size:1.15rem;font-weight:950}.chessimals-howto p,.chessimals-tip p,.chessimals-powers p{color:var(--chessimals-muted)}.chessimals-learn-more{justify-self:start;min-height:2.75rem;border:0;border-radius:999px;padding:0 1rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font:inherit;font-weight:950}.chessimals-size,.chessimals-mode,.chessimals-status{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem}.chessimals-status{order:3;grid-template-columns:repeat(3,minmax(0,1fr))}.chessimals-size button,.chessimals-mode button,.chessimals-status div{display:grid;gap:.2rem;align-content:center;min-width:0;min-height:3.875rem;padding:.55rem .65rem;border:1px solid var(--chessimals-border);border-radius:1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;text-align:left}.chessimals-size button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-mode button.is-selected{border-color:var(--chessimals-primary);background:linear-gradient(135deg,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13),transparent),var(--chessimals-panel);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16)}.chessimals-difficulty{display:flex;flex-wrap:wrap;gap:.55rem}.chessimals-difficulty button{min-height:2.75rem;border:1px solid var(--chessimals-border);border-radius:999px;padding:0 1rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;font-weight:950}.chessimals-difficulty button.is-selected{border-color:var(--chessimals-primary);background:var(--chessimals-primary);color:#fff}.chessimals-size strong,.chessimals-mode strong,.chessimals-status strong,.chessimals-result strong,.chessimals-tip strong{font-weight:950}.chessimals-status strong{min-width:0;font-size:clamp(.95rem,2.5vw,1.2rem);line-height:1.08;overflow-wrap:anywhere;white-space:normal}.chessimals-size small,.chessimals-mode small,.chessimals-status small{color:var(--chessimals-muted);font-size:.78rem;line-height:1.12}.chessimals-board-wrap{display:grid;justify-items:center;overflow-x:auto;width:100%;padding:.25rem 0}.chessimals-board-wrap.is-orienting .chessimals-board-frame{animation:chessimals-orient-board .32s ease}.chessimals-board-wrap.is-finished{overflow-x:visible}.chessimals-board-frame{--chessimals-coord-size: 1.35rem;--chessimals-coord-gap: .55rem;display:grid;grid-template-columns:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);grid-template-rows:var(--chessimals-coord-size) minmax(0,1fr) var(--chessimals-coord-size);gap:var(--chessimals-coord-gap);align-items:stretch;justify-content:center;width:min(100%,44rem)}.chessimals-file-labels,.chessimals-rank-labels{display:grid;color:color-mix(in srgb,var(--chessimals-muted) 82%,var(--chessimals-text));font-size:clamp(.62rem,2.1vw,.78rem);font-weight:950;letter-spacing:.04em;line-height:1;text-transform:uppercase;-webkit-user-select:none;user-select:none}.chessimals-file-labels{grid-column:2;grid-row:1;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));align-items:end;text-align:center}.chessimals-file-labels--bottom{grid-row:3;align-items:start}.chessimals-rank-labels{grid-column:1;grid-row:2;grid-template-rows:repeat(var(--board-size),minmax(0,1fr));align-items:center;justify-items:end}.chessimals-rank-labels--right{grid-column:3;justify-items:start}.chessimals-board{position:relative;grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(var(--board-size),minmax(0,1fr));grid-template-rows:repeat(var(--board-size),minmax(0,1fr));width:100%;aspect-ratio:1;overflow:hidden;border:1px solid var(--chessimals-border);border-radius:.95rem;background:var(--chessimals-border)}@keyframes chessimals-orient-board{0%{opacity:.72;filter:blur(.06rem);transform:scale(.985)}52%{opacity:.92;filter:blur(0);transform:scale(1.012)}to{opacity:1;filter:blur(0);transform:scale(1)}}.chessimals-center-line{position:absolute;top:50%;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;border-top:.08rem dashed rgba(var(--chessimals-selected-rgb),.62);pointer-events:none}.chessimals-board-overlay{position:absolute;inset:0;z-index:3;display:grid;place-content:center;gap:.45rem;padding:1.25rem;background:radial-gradient(circle at 50% 38%,rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28),transparent 33%),#0d0a12b8;color:#fff;text-align:center;backdrop-filter:blur(2px)}.chessimals-board-overlay span{justify-self:center;border-radius:999px;padding:.32rem .7rem;background:#ffffff26;color:#ffffffe6;font-size:.76rem;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.chessimals-board-overlay strong{font-size:clamp(1.65rem,8vw,3rem);line-height:1;font-weight:950}.chessimals-board-overlay small{color:#ffffffd1;font-size:clamp(.9rem,3vw,1.1rem);font-weight:800}.chessimals-cell{position:relative;isolation:isolate;--chessimals-cell-bg: var(--chessimals-cell-light);display:grid;place-items:center;min-width:0;min-height:0;aspect-ratio:1;border:0;background:var(--chessimals-cell-bg);color:var(--chessimals-text);font:inherit;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}.chessimals-cell.is-dark-cell{--chessimals-cell-bg: var(--chessimals-cell-dark)}.chessimals-cell.is-selected{z-index:1;background:radial-gradient(circle,rgba(var(--chessimals-selected-rgb),.28) 0 36%,transparent 62%),linear-gradient(135deg,rgba(var(--chessimals-selected-rgb),.22),#ffffff14),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .18rem var(--chessimals-selected),inset 0 0 .55rem #ffffffb8,inset 0 0 1.8rem rgba(var(--chessimals-selected-rgb),.42),0 0 .55rem rgba(var(--chessimals-selected-rgb),.56),0 0 1.55rem rgba(var(--chessimals-selected-rgb),.36)}.chessimals-cell.is-legal:not(.is-capture):after{position:absolute;inset:.35rem;z-index:2;border:.14rem solid var(--chessimals-move);border-radius:.55rem;content:\"\";opacity:.74;pointer-events:none}.chessimals-cell.is-last:not(.is-selected):not(.is-legal):not(.is-capture){background:radial-gradient(circle,rgba(var(--chessimals-last-rgb),.16) 0 42%,transparent 68%),var(--chessimals-cell-bg)}.chessimals-cell.is-capture{background:linear-gradient(135deg,rgba(var(--chessimals-capture-rgb),.12),#ffffff0f),var(--chessimals-cell-bg);box-shadow:inset 0 0 0 .2rem var(--chessimals-capture),inset 0 0 .42rem #ffffff6b,inset 0 0 1rem rgba(var(--chessimals-capture-rgb),.22),0 0 .42rem rgba(var(--chessimals-capture-rgb),.34);animation:chessimals-capture-aura 1.7s ease-in-out infinite}.chessimals-cell.is-capture:before{display:none}.chessimals-cell.is-capture:after{position:absolute;inset:.28rem;z-index:3;border:.14rem solid rgba(255,255,255,.84);border-radius:.58rem;box-shadow:0 0 .6rem #ffffff7a,inset 0 0 .85rem rgba(var(--chessimals-capture-rgb),.18);content:\"\";pointer-events:none;animation:chessimals-capture-frame 1.6s ease-in-out infinite}@keyframes chessimals-capture-aura{0%,to{filter:saturate(1);box-shadow:inset 0 0 0 .18rem var(--chessimals-capture),inset 0 0 .38rem #ffffff6b,inset 0 0 .86rem rgba(var(--chessimals-capture-rgb),.2),0 0 .34rem rgba(var(--chessimals-capture-rgb),.28)}50%{filter:saturate(1.22);box-shadow:inset 0 0 0 .22rem var(--chessimals-capture),inset 0 0 .58rem #ffffff94,inset 0 0 1.18rem rgba(var(--chessimals-capture-rgb),.3),0 0 .52rem rgba(var(--chessimals-capture-rgb),.42)}}@keyframes chessimals-capture-frame{0%,to{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}.chessimals-cell.is-moving-source .chessimals-piece{opacity:0}.chessimals-piece{position:relative;z-index:2;display:block;width:clamp(2.1rem,7.8vw,3.95rem);height:clamp(2.1rem,7.8vw,3.95rem);color:var(--ion-color-primary, #ff00b2);--chessimals-piece-fill: var(--chessimals-piece-white-fill);--chessimals-piece-side: var(--chessimals-piece-white-side);--chessimals-piece-line: var(--chessimals-piece-white-line);--chessimals-piece-outline: rgba(47, 42, 58, .18);filter:var(--chessimals-piece-white-shadow)}.chessimals-piece.is-black{color:#fff;--chessimals-piece-fill: var(--chessimals-piece-black-fill);--chessimals-piece-side: var(--chessimals-piece-black-side);--chessimals-piece-line: var(--chessimals-piece-black-line);--chessimals-piece-outline: rgba(255, 255, 255, .22);filter:var(--chessimals-piece-black-shadow)}.chessimals-moving-piece{position:absolute;top:0;left:0;z-index:6;width:calc(100% / var(--board-size));height:calc(100% / var(--board-size));display:grid;place-items:center;pointer-events:none;transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%));animation:chessimals-piece-travel .36s cubic-bezier(.2,.82,.24,1) both}@keyframes chessimals-piece-travel{0%{transform:translate(calc(var(--from-col) * 100%),calc(var(--from-row) * 100%)) scale(1)}68%{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1.07)}to{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%)) scale(1)}}.chessimals-piece__side,.chessimals-piece__head,.chessimals-piece__collar,.chessimals-piece__neck,.chessimals-piece__base{position:absolute;display:block;left:50%;background:var(--chessimals-piece-fill);border:.075rem solid var(--chessimals-piece-outline);transform:translate(-50%)}.chessimals-piece__side{display:none}.chessimals-piece__head{top:3%;width:48%;height:42%;border-radius:50% 50% 42% 42%;background:linear-gradient(135deg,rgba(255,255,255,.26) 0 30%,transparent 31%),var(--chessimals-piece-fill);box-shadow:inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece.is-black .chessimals-piece__head{box-shadow:inset .22rem -.18rem #ffffff12,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__collar{top:39%;width:74%;height:18%;border-radius:999px;box-shadow:inset -.18rem .14rem #ffffff0f,inset 0 -.08rem 0 var(--chessimals-piece-line)}.chessimals-piece__neck{top:54%;width:58%;height:30%;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);box-shadow:inset -.16rem .16rem #ffffff0d}.chessimals-piece__base{bottom:2%;width:84%;height:20%;border-radius:.5rem .5rem .24rem .24rem;box-shadow:inset -.16rem .12rem #ffffff0d}.chessimals-target{width:.85rem;height:.85rem;border-radius:999px;background:var(--chessimals-move);opacity:.9;box-shadow:0 0 .9rem rgba(var(--chessimals-move-rgb),.42)}.chessimals-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.625rem}.chessimals-cards button{display:grid;gap:.375rem;place-items:center;min-height:5.75rem;padding:.625rem;border:1px solid var(--chessimals-border);border-radius:1.125rem;background:var(--chessimals-panel);color:var(--chessimals-text);font:inherit;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.chessimals-powers__heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.chessimals-powers p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.chessimals-powers__heading span{flex:0 0 auto;border-radius:999px;padding:.28rem .62rem;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--chessimals-primary);font-size:.78rem;font-weight:950}.chessimals-cards button.is-selected{border-color:var(--chessimals-primary);box-shadow:0 0 0 2px rgba(var(--ion-color-primary-rgb, 255, 0, 178),.16),0 .9rem 2rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.13);transform:translateY(-1px)}.chessimals-cards button.is-used{opacity:.42}.chessimals-animal-face{display:grid;place-items:center;width:2.7rem;height:2.7rem;border-radius:1rem;background:var(--chessimals-animal-face-bg);color:color-mix(in srgb,var(--chessimals-text) 92%,#000);box-shadow:inset 0 0 0 1px var(--chessimals-animal-face-border)}.chessimals-animal-face img{display:block;width:72%;height:72%;object-fit:contain;filter:var(--chessimals-animal-face-filter)}.chessimals-cards button.is-selected .chessimals-animal-face,.chessimals-powers.is-ready .chessimals-cards button:not(.is-used) .chessimals-animal-face{background:radial-gradient(circle at 34% 24%,rgba(255,255,255,.96),transparent 32%),linear-gradient(145deg,#fff,#f0ecf7);color:color-mix(in srgb,var(--chessimals-text) 94%,#000);box-shadow:inset 0 0 0 1px #2f2a3a1f,0 .75rem 1.6rem rgba(var(--chessimals-selected-rgb),.14)}.chessimals-powers.is-locked .chessimals-animal-face{filter:var(--chessimals-animal-face-locked-filter);opacity:.86}.chessimals-powers.is-locked .chessimals-animal-face img,.chessimals-cards button.is-used .chessimals-animal-face img{opacity:var(--chessimals-animal-face-locked-img-opacity)}.chessimals-cards strong{overflow:hidden;max-width:100%;font-size:.82rem;font-weight:950;text-overflow:ellipsis;white-space:nowrap}.chessimals-powers.is-locked .chessimals-cards{opacity:.68}.chessimals-powers.is-ready{border-color:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.42);box-shadow:0 1rem 2.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12)}.chessimals-powers.is-ready .chessimals-cards button:not(.is-used){animation:chessimalsPowerPulse 1.8s ease-in-out infinite}@keyframes chessimalsPowerPulse{0%,to{box-shadow:0 0 rgba(var(--ion-color-primary-rgb, 255, 0, 178),0)}50%{box-shadow:0 0 1.4rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.22)}}.chessimals-actions{order:6;align-self:stretch;justify-self:stretch;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:.625rem;margin-top:1rem}@media (min-width: 760px){.chessimals-game{gap:1rem}.chessimals-turn-card,.chessimals-status,.chessimals-arena,.chessimals-result,.chessimals-actions{grid-column:1 / -1}.chessimals-arena{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start;gap:1rem}.chessimals-powers{width:min(100%,44rem);align-content:center;grid-template-columns:minmax(11rem,.68fr) minmax(0,1fr);align-items:center;gap:1rem;padding:1rem}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.chessimals-cards button{min-height:5rem}.chessimals-powers p{-webkit-line-clamp:3}}.chessimals-rules{display:grid;gap:1rem;padding-top:.25rem}.chessimals-rules article{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:1rem;padding:1rem;border:1px solid var(--ion-border-color, #e7e4ea);border-radius:1.25rem;background:var(--ion-card-background, #fff);color:var(--ion-text-color, #2f2a3a)}.chessimals-rules article>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:rgba(var(--ion-color-primary-rgb, 255, 0, 178),.12);color:var(--ion-color-primary, #ff00b2);font-weight:950}.chessimals-rules article>div{display:grid;min-width:0;gap:.45rem}.chessimals-rules h3,.chessimals-rules p,.chessimals-rules ul{margin:0}.chessimals-rules h3{font-size:1rem;font-weight:950;line-height:1.2}.chessimals-rules p,.chessimals-rules li{color:var(--ion-color-medium, #6f6a7a);line-height:1.5}.chessimals-rules ul{display:grid;gap:.45rem;padding-left:1.15rem}.chessimals-primary,.chessimals-secondary{min-height:3.625rem;border-radius:999px;font:inherit;font-weight:950}.chessimals-primary{border:0;background:var(--chessimals-primary);color:var(--ion-color-primary-contrast, #fff);box-shadow:0 1.125rem 2.8rem rgba(var(--ion-color-primary-rgb, 255, 0, 178),.28)}.chessimals-secondary{border:1px solid var(--chessimals-border);background:transparent;color:var(--chessimals-text)}@media (max-width: 560px){.chessimals-size,.chessimals-mode,.chessimals-actions{grid-template-columns:1fr}.chessimals-game{gap:.55rem;border-radius:1.25rem;padding:.625rem}.chessimals-turn-card{flex-direction:column;align-items:stretch;gap:.45rem;min-height:0;border-radius:.95rem;padding:.55rem}.chessimals-turn-card__chip{padding:.18rem .5rem;font-size:.6rem;letter-spacing:.045em;white-space:nowrap}.chessimals-turn-card strong{font-size:clamp(.98rem,5vw,1.25rem);line-height:1.08}.chessimals-turn-card p{font-size:.76rem;line-height:1.2}.chessimals-player-strip{width:100%;max-width:none;min-width:0}.chessimals-status{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem}.chessimals-status div{gap:.2rem;min-height:2.5rem;border-radius:.95rem;padding:.4rem .35rem}.chessimals-status small{font-size:.66rem;line-height:1.05}.chessimals-status strong{font-size:clamp(.86rem,3.4vw,1rem);line-height:1.05}.chessimals-tip,.chessimals-result{gap:.2rem;border-radius:1rem;padding:.7rem .75rem}.chessimals-tip strong,.chessimals-result strong{font-size:.95rem}.chessimals-tip p,.chessimals-result p{font-size:.9rem;line-height:1.28}.chessimals-arena{gap:.5rem}.chessimals-powers{gap:.5rem;border-radius:1rem;padding:.65rem}.chessimals-powers__heading{gap:.4rem}.chessimals-powers h2{font-size:1rem}.chessimals-powers__heading span{padding:.22rem .48rem;font-size:.68rem}.chessimals-powers p{font-size:.78rem;line-height:1.2;-webkit-line-clamp:1}.chessimals-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem}.chessimals-cards button{gap:.25rem;min-height:4.25rem;border-radius:.85rem;padding:.4rem .25rem}.chessimals-animal-face{width:2.1rem;height:2.1rem;border-radius:.75rem}.chessimals-cards strong{font-size:.66rem}.chessimals-board{border-radius:1.1rem}.chessimals-board-frame{--chessimals-coord-size: 1.05rem;--chessimals-coord-gap: .42rem}}@media (prefers-reduced-motion: reduce){.chessimals-cell.is-capture,.chessimals-cell.is-capture:before,.chessimals-cell.is-capture:after,.chessimals-moving-piece{animation:none!important}.chessimals-moving-piece{transform:translate(calc(var(--to-col) * 100%),calc(var(--to-row) * 100%))}}\n"] }]
64133
64513
  }], ctorParameters: () => [], propDecorators: { boardAnchor: [{
64134
64514
  type: ViewChild,
64135
64515
  args: ['boardAnchor']
64136
64516
  }], onlineGameId: [{
64137
64517
  type: Input
64518
+ }], miniGamesRoute: [{
64519
+ type: Input
64138
64520
  }] } });
64139
64521
 
64140
64522
  addIcons({ musicalNotesOutline, refreshOutline, trophyOutline });