/* Sportle styles are isolated from the existing site styles. */
.sportle-card {
  --card-bg: #dae6ed;
  border-color: #c6d6df;
}
:root[data-color-mode="dark"] .sportle-card {
  --card-bg: #21343b;
  border-color: #405b64;
}
.sportle-art {
  gap: 5px;
  color: #fff;
}
.sportle-art span {
  width: 38px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #39784d;
  border-radius: 4px;
  font: 700 25px var(--display);
  color: #fff;
}
.sportle-art span:nth-child(2) {
  background: #946b13;
}
.sportle-art span:nth-child(4) {
  background: #68716e;
}
body.sportle-open {
  overflow: hidden;
}
.sportle-open .site-header,
.sportle-open .site-footer,
.sportle-open .halloween-scene,
.sportle-open #site-status,
.sportle-open #loading-options,
.sportle-open #owner-preview-bar {
  display: none;
}
.sportle-open #main {
  width: min(100% - 24px, 680px);
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  padding: max(10px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom));
}
.sportle-open #game-view {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}
.sportle-open .play-top {
  margin: 0 0 6px;
}
.sportle-open .game-heading {
  text-align: center;
  margin: 0 0 8px;
}
.sportle-open #game-edition {
  display: none;
}
.sportle-open .game-heading h1 {
  margin: 0 0 5px;
  font-size: 34px;
  letter-spacing: -1px;
}
.sportle-open #game-description {
  max-width: 500px;
  margin: 0 auto;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.sportle-open #game-credit {
  margin: 3px 0 0;
  font-size: 10px;
}
.sportle-open #game-body {
  min-height: 0;
  width: 100%;
}
.sportle-play {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 5px;
}
.sportle-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}
.sportle-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.sportle-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.sportle-board-wrap {
  container-type: size;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sportle-board {
  height: min(100cqh, 400px, calc(100cqw * 6 / var(--letters)));
  aspect-ratio: var(--letters) / 6;
  display: grid;
  grid-template-columns: repeat(var(--letters), minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.sportle-tile {
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 5cqh, 32px);
  line-height: 1;
}
.sportle-entered {
  border-color: var(--muted);
}
.sportle-controls {
  min-width: 0;
}
.sportle-status {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}
.sportle-status .text-button {
  font-size: 12px;
  text-decoration: underline;
}
.sportle-keyboard {
  display: grid;
  gap: 6px;
  width: min(100%, 500px);
  margin: 0 auto;
}
.sportle-key-row {
  display: flex;
  justify-content: center;
  gap: 5px;
}
.sportle-key-row:nth-child(2) {
  padding: 0 4.5%;
}
.sportle-key {
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft, #e2e6de);
  color: var(--ink);
  font: 700 14px var(--font);
  cursor: pointer;
  touch-action: manipulation;
}
.sportle-wide-key {
  flex: 1.65;
  font-size: 10px;
}
.sportle-key:disabled {
  opacity: 1;
  cursor: default;
}
.sportle-play [data-color="g"] {
  background: #39784d;
  border-color: #39784d;
  color: #fff;
}
.sportle-play [data-color="y"] {
  background: #946b13;
  border-color: #946b13;
  color: #fff;
}
.sportle-play [data-color="x"] {
  background: #68716e;
  border-color: #68716e;
  color: #fff;
}
@media (max-width: 700px) {
  .sportle-art {
    display: grid;
    grid-template-columns: repeat(5, 20px);
    align-content: center;
    gap: 3px;
  }
  .sportle-art span {
    width: 20px;
    height: 28px;
    font-size: 16px;
  }
  .sportle-card p {
    max-width: 60%;
  }
}
@media (max-height: 620px) {
  .sportle-key {
    height: 38px;
  }
  .sportle-open .game-heading h1 {
    font-size: 27px;
  }
  .sportle-open #main {
    padding-block: 5px;
  }
  .sportle-open .game-heading {
    margin-bottom: 4px;
  }
}
@media (max-height: 450px) and (min-width: 600px) {
  .sportle-play {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px 18px;
  }
  .sportle-meta {
    grid-column: 1 / -1;
  }
  .sportle-controls {
    align-self: center;
  }
}
