/* Stage 3: my games + cloud save status */
.my-games-screen {
  display: none;
  padding: 1.25rem 1rem 3rem;
}
.my-games-screen.active { display: block; }
.my-games-wrap { max-width: 720px; margin: 0 auto; }
.my-games-head {
  position: relative;
  text-align: center;
  margin-bottom: 1rem;
  min-height: 2.2rem;
}
.my-games-head h2 { margin: 0.35rem 0; font-size: 1.4rem; }
.my-games-head .my-games-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.my-games-back, .my-games-refresh {
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}
.my-games-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.stat-card {
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
}
.stat-card strong { font-size: 1.05rem; }
.my-games-filters {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.my-games-list { display: flex; flex-direction: column; gap: 0.55rem; }
.my-game-item {
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
.my-game-main {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
.my-game-main .code { opacity: 0.65; font-weight: 500; font-size: 0.85em; }
.my-game-main .ret.pos { color: #e05252; }
.my-game-main .ret.neg { color: #3db86a; }
.my-game-meta { margin-top: 0.35rem; font-size: 0.8rem; opacity: 0.7; }
.my-game-kind { font-weight: 600; }
.my-game-review {
  margin-top: 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  border: 1.5px solid var(--ink, #2a2a2a);
  background: transparent;
  color: var(--ink, #2a2a2a);
  cursor: pointer;
}
.my-game-review.is-owned { background: var(--ink, #2a2a2a); color: var(--paper, #f7f1e6); }
.my-games-empty { opacity: 0.7; }
.cloud-save-status {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}
.cloud-save-status.status-saved { color: #3db86a; }
.cloud-save-status.status-fail { color: #e05252; }
.cloud-save-status.status-saving,
.cloud-save-status.status-retry { opacity: 0.9; }
.fill-mode-dialog-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  opacity: 0.75;
  line-height: 1.45;
}
.play-mode-picker { margin-top: 0.75rem; }

/* Sketch / notebook native select (fill-mode filter) */
.my-games-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: inherit;
}
.my-games-select,
.sketch-select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-family: var(--kaiti), var(--sans), serif;
  color: var(--ink);
  background-color: var(--card);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 55%,
    calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1.5px solid var(--line);
  border-radius: 12px 16px 10px 14px;
  box-shadow: 1px 1px 0 var(--line);
  padding: 0.4rem 1.85rem 0.4rem 0.75rem;
  cursor: pointer;
  min-width: 7.5rem;
  line-height: 1.3;
}
.my-games-select:hover,
.sketch-select:hover {
  background-color: color-mix(in srgb, var(--wash) 18%, var(--card));
}
.my-games-select:focus-visible,
.sketch-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--terra) 55%, transparent);
  outline-offset: 2px;
}
[data-theme="dark"] .my-games-select,
[data-theme="dark"] .sketch-select {
  background-color: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

@media (max-width: 640px) {
  .my-games-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.my-games-stats-note { margin: 0.4rem 0 0.2rem; font-size: 0.78rem; line-height: 1.5; opacity: 0.7; }
.my-games-stats-note:empty { display: none; }
