:root {
  color-scheme: light;
  --bg: #0f172a;
  --bg-soft: rgba(15, 23, 42, 0.55);
  --surface: rgba(15, 23, 42, 0.65);
  --border: rgba(148, 163, 184, 0.12);
  --text: #e2e8f0;
  --text-dimmed: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.45);
  --stat-width: 96px;
  --avatar-size: 52px;
  --avatar-gap: 16px;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  background: radial-gradient(circle at 0% 0%, #0ea5e9, transparent 45%),
    radial-gradient(circle at 100% 0%, #6366f1, transparent 55%), #020617;
  color: var(--text);
  letter-spacing: 0.01em;
  backdrop-filter: blur(0);
  overflow-x: hidden;
}

.app-shell {
  width: min(420px, calc(100vw - 24px));
  margin: clamp(20px, 4vh, 36px) auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.app-header {
  padding: 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.brand-text p {
  margin: 4px 0 0;
  color: var(--text-dimmed);
  font-size: 0.9rem;
}

.login-button {
  padding: 10px 16px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.login-button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15);
}

.app-nav {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 16px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.nav-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-dimmed);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.nav-tab:is(:hover, :focus-visible) {
  color: var(--text);
}

.nav-tab.is-active {
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.35);
}

.nav-tab:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Mobile tweaks for nav tabs */
@media (max-width: 420px) {
  .app-nav {
    flex-wrap: wrap;
  }

  .nav-tab {
    flex: 1 1 calc(50% - 4px);
    padding: 8px 10px;
  }
}

@media (max-width: 360px) {
  .nav-tab {
    font-size: 0.9rem;
  }
}

.nav-tab--admin {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.nav-tab--admin.is-active {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.app-main {
  padding: 0 20px 24px;
  flex: 1;
  display: grid;
  overflow: hidden;
}

.app-footer {
  padding: 16px 24px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dimmed);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.view {
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 240ms ease, transform 320ms ease;
  display: none;
}

.view.is-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.rewards-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 4px 4px 12px;
}

.rewards-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.rewards-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.rewards-subtitle {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.95rem;
}

.rewards-final-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(99, 102, 241, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.rewards-final-card__media {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.35);
}

.rewards-final-card__media img {
  width: 72px;
  height: 72px;
}

.rewards-final-card__content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rewards-final-card__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.8);
}

.rewards-final-card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.rewards-final-card__level {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.rewards-final-card__description {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.95rem;
}

.rewards-secrets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.45);
}

.rewards-secrets__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.rewards-secrets__intro {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.9rem;
}

.rewards-track {
  display: grid;
  gap: 12px;
}

.rewards-track__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.4);
  font-weight: 600;
}

.rewards-track__item.is-locked .rewards-track__gift {
  color: rgba(148, 163, 184, 0.6);
}

.rewards-track__item.is-unlocked {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.12));
}

.rewards-track__image {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
}

.rewards-track__image img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.rewards-track__item.is-final {
  border-color: rgba(56, 189, 248, 0.75);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(99, 102, 241, 0.24));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.rewards-track__level {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dimmed);
}

.rewards-track__item.is-final .rewards-track__level {
  color: rgba(15, 23, 42, 0.8);
}

.rewards-track__gift {
  font-size: 1rem;
  color: var(--text);
}

.rewards-track__item.is-final .rewards-track__gift {
  color: #0f172a;
}

.rewards-track__empty {
  padding: 12px 0;
  text-align: center;
  color: var(--text-dimmed);
  font-size: 0.9rem;
}

@media (max-width: 520px) {
  .rewards-final-card {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .rewards-final-card__media {
    justify-self: center;
  }

  .rewards-final-card__content {
    align-items: center;
  }

  .rewards-track__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .rewards-track__item.is-final {
    align-items: center;
  }
}

.board-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  max-width: 100%;
}

.board-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(var(--stat-width), 1fr));
  align-items: end;
  gap: 12px;
  padding: 24px 20px 16px;
  color: var(--text-dimmed);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.board-card__title {
  justify-self: flex-start;
  padding-left: calc(var(--avatar-size) + var(--avatar-gap));
}

.board-card__stat {
  justify-self: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.board-card__stat .stat-label {
  display: block;
  text-align: center;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 20px 20px;
}

.player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(var(--stat-width), 1fr));
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  transform: translateY(12px);
  opacity: 0;
  animation: card-enter 360ms ease forwards;
}

.player-card[data-player-card] {
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.player-card[data-player-card]:hover {
  transform: translateY(6px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.35);
  border-color: rgba(148, 163, 184, 0.18);
}

.player-card.is-skeleton {
  animation: none;
  transform: none;
  opacity: 1;
  background: rgba(148, 163, 184, 0.08);
  box-shadow: none;
  border-style: dashed;
}

.player-card:nth-child(2) {
  animation-delay: 60ms;
}

.player-card:nth-child(3) {
  animation-delay: 120ms;
}

.player-card:nth-child(n + 4) {
  animation-delay: 180ms;
}

.player-card__basic {
  display: flex;
  align-items: center;
  gap: var(--avatar-gap);
  min-width: 0;
}

.player-avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  background-blend-mode: soft-light;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.player-avatar.has-image,
.admin-player-avatar.has-image,
.checkin-player-avatar.has-image,
.profile-avatar.has-image {
  background: rgba(15, 23, 42, 0.15);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
}

.player-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.player-name {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-subtitle {
  color: var(--text-dimmed);
  font-size: 0.85rem;
}

.player-card.is-skeleton .player-stat {
  align-items: center;
}

.player-card__stats {
  display: contents;
}

.player-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  text-align: right;
  font-weight: 600;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dimmed);
}

.stat-value {
  font-size: 1rem;
}

.player-level {
  color: #38bdf8;
}

.player-points {
  font-size: 1.06rem;
}

.player-points::after {
  content: none;
}

.view--profile {
  min-height: 100%;
}

.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-back:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.35);
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.4);
}

.profile-card__header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.45));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.profile-identity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-subtitle {
  margin: 0;
  color: var(--text-dimmed);
}

.profile-card__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.profile-stat {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-stat__label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  color: var(--text-dimmed);
}

.profile-stat__value {
  font-size: 1.35rem;
  font-weight: 600;
}

.profile-progress {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-progress__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-dimmed);
}

.profile-progress__value {
  font-weight: 600;
  color: var(--text);
}

/* Profile reward section */
.profile-section--reward {
  margin-top: 28px;
}
.profile-reward {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(56,189,248,0.08), rgba(99,102,241,0.08));
  border: 1px solid var(--border);
  border-radius: 14px;
}
.profile-reward-media {
  flex: 0 0 auto;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-reward-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(56,189,248,0.25));
}
.profile-reward-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.profile-reward-description {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dimmed);
}

.progress-bar {
  position: relative;
  height: 12px;
  width: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.progress-bar__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  transition: width 320ms ease;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 360ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 360ms;
}

.modal.is-active {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
  transition-delay: 0s;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal__dialog {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 35px 55px rgba(2, 6, 23, 0.4);
  transform: translate3d(0, 20px, 0) scale(0.96);
  opacity: 0;
  will-change: transform, opacity;
  transition:
    transform 460ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.is-active .modal__dialog {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.modal.is-active .modal__backdrop {
  opacity: 1;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal__close:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: scale(1.05);
}

.modal__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal__header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
}

.modal__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.modal__subtitle {
  margin: 6px 0 0;
  color: var(--text-dimmed);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dimmed);
}

.form-input {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus-within {
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-input__icon {
  margin-right: 12px;
  color: var(--text-dimmed);
  font-size: 0.85rem;
}

.form-input input {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.form-input input:focus {
  outline: none;
}

.form-feedback {
  min-height: 18px;
  font-size: 0.85rem;
  color: #f87171;
}

.form-submit {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(56, 189, 248, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 55px rgba(56, 189, 248, 0.35);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-section__title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.profile-table {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.35);
}

.profile-table__head,
.profile-table__body li {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(80px, 0.6fr);
  gap: 12px;
  align-items: center;
}

.profile-table__head {
  padding: 14px 18px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-dimmed);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.profile-table__head span:nth-child(2) {
  text-align: center;
}

.profile-table__head span:nth-child(3) {
  text-align: right;
}

.profile-table__body {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-table__body li {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.95rem;
}

.profile-table__body li:last-child {
  border-bottom: none;
}

.profile-table__points {
  justify-self: end;
  font-weight: 600;
  text-align: right;
}

.profile-table__date {
  font-size: 0.85rem;
  color: var(--text-dimmed);
}

.profile-table__reason {
  font-weight: 600;
  word-break: break-word;
}

.profile-table__tournament {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-table__placement {
  font-weight: 600;
  text-align: center;
  justify-self: center;
}

.profile-table__empty {
  padding: 18px;
  text-align: center;
  color: var(--text-dimmed);
}

.profile-table--compact .profile-table__head,
.profile-table--compact .profile-table__body li {
  grid-template-columns: minmax(0, 1.4fr) minmax(70px, 0.7fr) minmax(80px, 0.7fr);
}

.view-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  min-height: 200px;
  color: var(--text-dimmed);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.login-button.is-pulsing {
  animation: pulse 360ms ease;
}

.shimmer {
  background: linear-gradient(
    110deg,
    rgba(148, 163, 184, 0.18) 0%,
    rgba(148, 163, 184, 0.28) 40%,
    rgba(148, 163, 184, 0.18) 60%
  );
  background-size: 200% 100%;
  animation: shimmer 1.1s ease-in-out infinite;
  border-radius: 12px;
}

.shimmer-text {
  display: block;
  height: 12px;
  width: 140px;
}

.shimmer-text--small {
  height: 10px;
  width: 90px;
}

.shimmer-pill {
  display: inline-block;
  width: calc(var(--stat-width) - 16px);
  height: 16px;
}

.empty-state {
  padding: 40px 0;
  text-align: center;
  color: var(--text-dimmed);
}

.empty-state h3 {
  margin-bottom: 6px;
  color: var(--text);
}

/* Level-Up Modal Styles */
.levelup-modal .modal__dialog--levelup {
  max-width: 500px;
  animation: levelupSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes levelupSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.levelup-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.levelup-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: celebrationBounce 1s ease infinite;
}

@keyframes celebrationBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-15px) scale(1.1);
  }
  50% {
    transform: translateY(0) scale(1);
  }
}

.levelup-title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.levelup-subtitle {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.95rem;
}

.levelup-reward {
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.scratch-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(99, 102, 241, 0.1));
  border: 2px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
  touch-action: none;
}

.scratch-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  gap: 12px;
}

.levelup-reward-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.3));
  animation: rewardFloat 3s ease-in-out infinite;
}

@keyframes rewardFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.levelup-reward-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.levelup-reward-description {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dimmed);
}

.scratch-hint {
  text-align: center;
  color: var(--text-dimmed);
  font-size: 0.9rem;
  margin: 0;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.scratch-hint.is-hidden {
  display: none;
}

.levelup-claim-btn {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  color: #0f172a;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.levelup-claim-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface);
  color: var(--text-dimmed);
  box-shadow: none;
}

.levelup-claim-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.levelup-claim-btn:not(:disabled):active {
  transform: translateY(0);
}

.admin-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 4px 4px 12px;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.admin-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
}

.admin-subtitle {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.95rem;
}

.admin-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
}

.admin-action-btn--primary {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border-color: rgba(168, 85, 247, 0.4);
}

.admin-action-btn--primary:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 12px 28px rgba(168, 85, 247, 0.25);
}

.admin-action-btn--checkin {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
  border-color: rgba(34, 197, 94, 0.4);
}

.admin-action-btn--checkin:hover {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.25);
}

.admin-action-btn--rewards {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.2));
  border-color: rgba(251, 146, 60, 0.4);
}

.admin-action-btn--rewards:hover {
  border-color: rgba(251, 146, 60, 0.65);
  box-shadow: 0 12px 28px rgba(251, 146, 60, 0.25);
}

.admin-action-btn--small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.admin-action-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.admin-players {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-player-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  transition: all 0.2s ease;
}

.admin-player-card:hover {
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.35);
}

.admin-player-card__info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.admin-player-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.admin-player-name {
  font-weight: 600;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-player-stats {
  color: var(--text-dimmed);
  font-size: 0.9rem;
}

.admin-player-card__actions {
  display: flex;
  gap: 10px;
}

.admin-player-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.4);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-player-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
}

.admin-player-btn--points {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  border-color: rgba(56, 189, 248, 0.35);
}

.admin-player-btn--points:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.admin-player-btn--edit {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border-color: rgba(168, 85, 247, 0.35);
}

.admin-player-btn--edit:hover {
  border-color: rgba(168, 85, 247, 0.55);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-dimmed);
}

.form-input--color {
  padding: 8px;
}

.form-input--color input[type="color"] {
  width: 100%;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.form-input--color input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.form-input--color input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.form-delete {
  flex: 1;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
  color: #fca5a5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-delete:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.25);
}

.form-submit {
  flex: 1;
}

.form-cancel {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-dimmed);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-cancel:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.admin-checkin {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(16, 185, 129, 0.08));
}

.admin-checkin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-checkin-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.admin-checkin-controls {
  display: flex;
  gap: 8px;
}

.admin-checkin-btn {
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text-dimmed);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-checkin-btn:hover {
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--text);
  transform: translateY(-1px);
}

.admin-checkin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-checkin-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-field--inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field--inline label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dimmed);
}

.form-field--inline input {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-field--inline input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.admin-checkin-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.checkin-player-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkin-player-item:hover {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(15, 23, 42, 0.65);
  transform: translateY(-1px);
}

.checkin-player-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkin-player-checkbox:checked ~ .checkin-player-info {
  opacity: 1;
}

.checkin-player-checkbox:checked ~ .checkin-player-check {
  opacity: 1;
  transform: scale(1);
}

.checkin-player-item:has(.checkin-player-checkbox:checked) {
  border-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
}

.checkin-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.checkin-player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.checkin-player-name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkin-player-check {
  font-size: 1.2rem;
  color: #22c55e;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s ease;
}

.admin-checkin-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.admin-rewards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(251, 146, 60, 0.25);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(249, 115, 22, 0.08));
}

.admin-rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-rewards-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.admin-rewards-list {
  display: grid;
  gap: 16px;
}

.admin-rewards-actions {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.reward-manage-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  align-items: center;
  transition: all 0.2s ease;
}

.reward-manage-card:hover {
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.35);
}

.reward-manage-preview {
  width: 100px;
  height: 100px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 12px;
}

.reward-manage-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reward-manage-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.reward-manage-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reward-manage-level {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dimmed);
  font-weight: 600;
}

.reward-manage-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-manage-description {
  margin: 0;
  color: var(--text-dimmed);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reward-manage-points {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.reward-manage-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid rgba(251, 146, 60, 0.35);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(249, 115, 22, 0.15));
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.reward-manage-edit:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 8px 20px rgba(251, 146, 60, 0.25);
}

.image-upload-zone {
  position: relative;
  min-height: 200px;
  border: 2px dashed rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.image-upload-zone--compact {
  min-height: 160px;
}

.image-upload-zone:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.55);
}

.image-upload-zone.is-dragover {
  border-color: rgba(56, 189, 248, 0.8);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  transform: scale(1.02);
}

.image-upload-zone.has-image {
  border-style: solid;
  border-color: rgba(34, 197, 94, 0.4);
}

.image-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  gap: 12px;
  transition: opacity 0.2s ease;
}

.image-upload-zone.has-image .image-upload-placeholder {
  display: none;
}

.image-upload-icon {
  font-size: 3rem;
  opacity: 0.6;
}

.image-upload-text {
  margin: 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.image-upload-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dimmed);
}

.image-upload-preview {
  position: relative;
  width: 100%;
  min-height: 200px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-upload-zone--compact .image-upload-preview {
  min-height: 160px;
}

.image-upload-zone--compact .image-upload-image {
  max-height: 220px;
}

.image-upload-zone.has-image .image-upload-preview {
  display: flex;
}

.image-upload-image {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
}

.image-upload-zone.is-uploading {
  pointer-events: none;
  opacity: 0.6;
}

.image-upload-zone.is-uploading::after {
  content: 'Wird hochgeladen...';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  font-weight: 600;
  backdrop-filter: blur(4px);
}

@keyframes card-enter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 420px) {
  :root {
    --stat-width: 80px;
  }

  .app-shell {
    width: min(420px, calc(100vw - 16px));
    margin: clamp(16px, 5vw, 28px) auto;
  }

  .app-main {
    padding: 0 16px 20px;
  }

  .board-card__header {
    display: none;
  }

  .player-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 16px;
    gap: 12px;
  }

  .player-card__basic {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .player-meta {
    align-items: center;
  }

  .player-name {
    white-space: normal;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.25;
  }

  .player-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-items: center;
  }

  .player-stat {
    align-items: center;
    text-align: center;
  }

  .player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 1.05rem;
  }

  .profile-layout {
    gap: 16px;
  }

  .profile-back {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .profile-card {
    padding: 20px;
    gap: 16px;
  }

  .profile-card__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .profile-avatar {
    width: 84px;
    height: 84px;
    font-size: 1.6rem;
  }

  .profile-identity {
    align-items: center;
  }

  .profile-progress__label {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .profile-table {
    overflow-x: auto;
  }

  .modal__dialog {
    width: min(360px, calc(100vw - 24px));
    padding: 24px;
  }

  .modal__icon {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }
  
  .admin-player-card__actions {
    flex-direction: column;
  }
  
  .admin-player-btn {
    width: 100%;
  }
  
  .admin-checkin-options {
    grid-template-columns: 1fr;
  }
  
  .admin-checkin-players {
    grid-template-columns: 1fr;
  }
  
  .admin-actions {
    flex-direction: column;
  }
  
  .admin-action-btn {
    width: 100%;
  }
  
  .reward-manage-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .reward-manage-preview {
    justify-self: center;
  }
  
  .reward-manage-info {
    align-items: center;
  }
  
  .reward-manage-edit {
    width: 100%;
    justify-content: center;
  }
  
  .image-upload-zone {
    min-height: 180px;
  }
  
  .image-upload-placeholder {
    padding: 30px 20px;
  }
  
  .image-upload-icon {
    font-size: 2.5rem;
  }
  
  .image-upload-text {
    font-size: 0.95rem;
  }
  
  .image-upload-hint {
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  :root {
    --stat-width: 68px;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .login-button {
    align-self: stretch;
    text-align: center;
  }

  .player-card__stats {
    grid-template-columns: 1fr;
  }

  .profile-card__stats {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  :root {
    --stat-width: 112px;
  }

  .app-shell {
    width: min(520px, calc(100vw - 48px));
    margin: 48px auto;
  }

  .app-main {
    padding: 0 28px 32px;
  }

  .board-card__header {
    padding: 22px 28px 14px;
  }

  .player-card {
    gap: 16px;
    padding: 18px 24px;
  }
}
