valtech-components 4.0.376 → 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.376';
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();
@@ -61780,9 +61838,24 @@ class ChessimalsOnlineService {
61780
61838
  const normalizedBaseRoute = `/${baseRoute.replace(/^\/+|\/+$/g, '') || 'mini-games'}`;
61781
61839
  return `${origin}${normalizedBaseRoute}/chessimals/${encodeURIComponent(this.normalizeGameId(gameId))}`;
61782
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 });
61849
+ }
61783
61850
  gameRef(gameId) {
61784
61851
  return doc(this.firestore, `${COLLECTION_PATH}/${gameId}`);
61785
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
+ }
61786
61859
  async ensureUser() {
61787
61860
  await this.firebase.whenFirebaseAuthReady();
61788
61861
  const user = this.auth.currentUser;
@@ -61816,6 +61889,53 @@ class ChessimalsOnlineService {
61816
61889
  return state;
61817
61890
  return { ...state, online: { ...state.online, updatedAt: date.toISOString() } };
61818
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
+ }
61819
61939
  assertNotExpired(state) {
61820
61940
  if ((state.online?.expiresAtMs ?? 0) < Date.now())
61821
61941
  throw new Error('CHESSIMALS_GAME_EXPIRED');
@@ -61969,12 +62089,32 @@ const MINI_GAMES_I18N = {
61969
62089
  chessimalsOnlineLoading: 'Abriendo partida...',
61970
62090
  chessimalsWaitingTitle: 'Esperando rival',
61971
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}',
61972
62111
  chessimalsGameCode: 'Código',
61973
62112
  chessimalsCopyLink: 'Copiar link',
61974
62113
  chessimalsShareLink: 'Compartir link',
61975
62114
  chessimalsLinkCopied: 'Link de la partida copiado.',
61976
62115
  chessimalsShareText: 'Únete a mi partida de Chessimals.',
61977
62116
  chessimalsOnlineWaiting: 'Esperando',
62117
+ chessimalsOnlinePending: 'Pendiente',
61978
62118
  chessimalsOnlinePlayer: 'Online',
61979
62119
  chessimalsSpectator: 'Observador',
61980
62120
  chessimalsOnlineViewer: 'Esta partida ya tiene dos jugadores. Puedes mirar cómo avanza.',
@@ -62167,12 +62307,32 @@ const MINI_GAMES_I18N = {
62167
62307
  chessimalsOnlineLoading: 'Opening game...',
62168
62308
  chessimalsWaitingTitle: 'Waiting for rival',
62169
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}',
62170
62329
  chessimalsGameCode: 'Code',
62171
62330
  chessimalsCopyLink: 'Copy link',
62172
62331
  chessimalsShareLink: 'Share link',
62173
62332
  chessimalsLinkCopied: 'Game link copied.',
62174
62333
  chessimalsShareText: 'Join my Chessimals game.',
62175
62334
  chessimalsOnlineWaiting: 'Waiting',
62335
+ chessimalsOnlinePending: 'Pending',
62176
62336
  chessimalsOnlinePlayer: 'Online',
62177
62337
  chessimalsSpectator: 'Spectator',
62178
62338
  chessimalsOnlineViewer: 'This game already has two players. You can watch it play out.',
@@ -62586,6 +62746,7 @@ class ChessimalsGameComponent {
62586
62746
  this.onlineLoading = signal(false);
62587
62747
  this.onlineError = signal('');
62588
62748
  this.onlineUid = signal(undefined);
62749
+ this.onlineHistory = signal([]);
62589
62750
  this.resumeSplashVisible = signal(false);
62590
62751
  this.loggedInUser = this.auth.user;
62591
62752
  this.localPlayerProfile = computed(() => this.playerProfiles.activeProfile());
@@ -62647,6 +62808,8 @@ class ChessimalsGameComponent {
62647
62808
  return 'spectator';
62648
62809
  if (this.online.isHostWaiting(game, uid))
62649
62810
  return 'waiting';
62811
+ if (game.status === 'waiting' && game.online?.pendingGuest?.uid === uid)
62812
+ return 'pending';
62650
62813
  return this.online.participantSide(game, uid) ?? 'spectator';
62651
62814
  });
62652
62815
  this.canPlayCurrentTurn = computed(() => {
@@ -62732,6 +62895,17 @@ class ChessimalsGameComponent {
62732
62895
  });
62733
62896
  this.i18n.registerDefaults('MiniGames', MINI_GAMES_I18N);
62734
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
+ });
62735
62909
  }
62736
62910
  ngOnDestroy() {
62737
62911
  this.resetFinishedLocalGameForNextVisit(true);
@@ -62742,7 +62916,10 @@ class ChessimalsGameComponent {
62742
62916
  clearTimeout(this.moveAnimationTimer);
62743
62917
  if (this.botTurnTimer)
62744
62918
  clearTimeout(this.botTurnTimer);
62919
+ if (this.historyWatchTimer)
62920
+ clearTimeout(this.historyWatchTimer);
62745
62921
  this.onlineSubscription?.unsubscribe();
62922
+ this.historySubscription?.unsubscribe();
62746
62923
  }
62747
62924
  ngOnInit() {
62748
62925
  this.routeSubscription.add(this.router.events.subscribe((event) => {
@@ -62787,6 +62964,7 @@ class ChessimalsGameComponent {
62787
62964
  try {
62788
62965
  const game = await this.online.createGame(this.selectedBoardSize());
62789
62966
  this.onlineUid.set(this.online.currentUid);
62967
+ this.queueHistoryWatch();
62790
62968
  this.openedOnlineGameId = game.id;
62791
62969
  this.watchOnlineGame(game.id);
62792
62970
  this.game.set(game);
@@ -62836,6 +63014,7 @@ class ChessimalsGameComponent {
62836
63014
  try {
62837
63015
  await this.online.joinGame(normalizedGameId);
62838
63016
  this.onlineUid.set(this.online.currentUid);
63017
+ this.queueHistoryWatch();
62839
63018
  this.openedOnlineGameId = normalizedGameId;
62840
63019
  this.watchOnlineGame(normalizedGameId);
62841
63020
  this.screen.set('game');
@@ -63169,6 +63348,8 @@ class ChessimalsGameComponent {
63169
63348
  const role = this.onlineRole();
63170
63349
  if (role === 'waiting')
63171
63350
  return this.t('chessimalsOnlineWaiting');
63351
+ if (role === 'pending')
63352
+ return this.t('chessimalsOnlinePending');
63172
63353
  if (role === 'spectator')
63173
63354
  return this.t('chessimalsSpectator');
63174
63355
  return this.t('chessimalsOnlinePlayer');
@@ -63207,6 +63388,84 @@ class ChessimalsGameComponent {
63207
63388
  }
63208
63389
  await this.copyOnlineLink();
63209
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
+ }
63210
63469
  async requestOnlineRematch() {
63211
63470
  if (this.game().mode !== 'online')
63212
63471
  return;
@@ -63219,6 +63478,24 @@ class ChessimalsGameComponent {
63219
63478
  this.audio.miss();
63220
63479
  }
63221
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
+ }
63222
63499
  unlockedLabel(color) {
63223
63500
  return this.game().players[color].powerUnlocked ? this.t('chessimalsUnlocked') : this.t('chessimalsLocked');
63224
63501
  }
@@ -63392,6 +63669,28 @@ class ChessimalsGameComponent {
63392
63669
  </button>
63393
63670
  </div>
63394
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
+ }
63395
63694
  </section>
63396
63695
  } @else {
63397
63696
  <section class="chessimals-game">
@@ -63440,20 +63739,40 @@ class ChessimalsGameComponent {
63440
63739
  @if (game().mode === 'online' && game().status === 'waiting') {
63441
63740
  <article class="chessimals-online chessimals-online--waiting">
63442
63741
  <div>
63443
- <h2>{{ t('chessimalsWaitingTitle') }}</h2>
63444
- <p>{{ t('chessimalsWaitingBody') }}</p>
63742
+ <h2>{{ waitingTitle() }}</h2>
63743
+ <p>{{ waitingBody() }}</p>
63445
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
+ }
63446
63756
  <div class="chessimals-game-code">
63447
63757
  <small>{{ t('chessimalsGameCode') }}</small>
63448
63758
  <strong>{{ game().id }}</strong>
63449
63759
  </div>
63450
63760
  <div class="chessimals-online-actions">
63451
- <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
63452
- {{ t('chessimalsCopyLink') }}
63453
- </button>
63454
- <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
63455
- {{ t('chessimalsShareLink') }}
63456
- </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
+ }
63457
63776
  </div>
63458
63777
  </article>
63459
63778
  }
@@ -63714,7 +64033,7 @@ class ChessimalsGameComponent {
63714
64033
  />
63715
64034
  </ng-template>
63716
64035
  </ion-modal>
63717
- `, 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-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"] }] }); }
63718
64037
  }
63719
64038
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsGameComponent, decorators: [{
63720
64039
  type: Component,
@@ -63826,6 +64145,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63826
64145
  </button>
63827
64146
  </div>
63828
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
+ }
63829
64170
  </section>
63830
64171
  } @else {
63831
64172
  <section class="chessimals-game">
@@ -63874,20 +64215,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
63874
64215
  @if (game().mode === 'online' && game().status === 'waiting') {
63875
64216
  <article class="chessimals-online chessimals-online--waiting">
63876
64217
  <div>
63877
- <h2>{{ t('chessimalsWaitingTitle') }}</h2>
63878
- <p>{{ t('chessimalsWaitingBody') }}</p>
64218
+ <h2>{{ waitingTitle() }}</h2>
64219
+ <p>{{ waitingBody() }}</p>
63879
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
+ }
63880
64232
  <div class="chessimals-game-code">
63881
64233
  <small>{{ t('chessimalsGameCode') }}</small>
63882
64234
  <strong>{{ game().id }}</strong>
63883
64235
  </div>
63884
64236
  <div class="chessimals-online-actions">
63885
- <button class="chessimals-secondary" type="button" (click)="copyOnlineLink()">
63886
- {{ t('chessimalsCopyLink') }}
63887
- </button>
63888
- <button class="chessimals-primary" type="button" (click)="shareOnlineLink()">
63889
- {{ t('chessimalsShareLink') }}
63890
- </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
+ }
63891
64252
  </div>
63892
64253
  </article>
63893
64254
  }
@@ -64148,7 +64509,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
64148
64509
  />
64149
64510
  </ng-template>
64150
64511
  </ion-modal>
64151
- `, 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-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"] }]
64152
64513
  }], ctorParameters: () => [], propDecorators: { boardAnchor: [{
64153
64514
  type: ViewChild,
64154
64515
  args: ['boardAnchor']