/* src/style.css */
html,
body,
#root {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--ds-page);
}
.file-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--ds-hairline);
}
.file-nav a {
  padding: 10px 0;
  color: var(--ds-ink-2);
  text-decoration: none;
}
.file-nav a[aria-current=page] {
  color: var(--ds-ink);
  box-shadow: inset 0 -1px 0 var(--ds-ink);
}
@media (max-width: 600px) {
  .file-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
.game-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--ds-hairline);
}
.game-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 360 / 540;
  touch-action: none;
  cursor: ew-resize;
}
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: rgba(251, 247, 239, 0.88);
}
.game-overlay p {
  margin: 0;
  color: var(--ds-ink-2);
  max-width: 260px;
}
.game-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--ds-ink);
}
.game-btn {
  min-height: 48px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.game-best {
  font-weight: 600;
}
.game-hint {
  text-align: center;
  color: var(--ds-ink-2);
  margin: 8px 0 0;
  font-size: 14px;
}
.game-hint,
.game-overlay {
  direction: rtl;
}
.game-hint,
.game-overlay {
  direction: rtl;
}
.game-brand {
  display: flex;
  justify-content: center;
  padding: 4px 0 12px;
}
.game-brand img {
  height: 44px;
  width: auto;
}
.game-stage {
  border-radius: 24px;
  border: 0;
  box-shadow: 0 10px 30px rgba(22, 12, 13, 0.14);
}
.game-overlay {
  background: rgba(255, 255, 255, 0.93);
  font-family:
    Rubik,
    "Helvetica Neue",
    Arial,
    sans-serif;
}
.game-logo {
  height: 54px;
  width: auto;
}
.game-title {
  font-size: 30px;
  font-weight: 800;
  color: #160C0D;
  line-height: 1.1;
}
.game-btn {
  background: #E41E2B;
  box-shadow: 0 6px 16px rgba(228, 30, 43, 0.35);
  font-family: inherit;
  padding: 0 44px;
  min-height: 52px;
}
.game-best {
  color: #E41E2B;
  font-weight: 700;
}
.game-stage {
  max-width: min(420px, max(260px, calc((100vh - 210px) * 0.6667)));
}
.game-brand {
  padding: 0 0 8px;
}
.game-brand img {
  height: 30px;
}
.game-stage {
  max-width: min(420px, max(240px, calc((100vh - 130px) * 0.6667)));
}
.game-hint {
  margin: 6px 0 0;
}
.game-stage {
  max-width: 330px;
}
.game-overlay {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.game-stage {
  box-shadow: 0 12px 36px rgba(60, 40, 30, 0.28);
}
.art-pool {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.game-name {
  width: 220px;
  min-height: 46px;
  padding: 0 14px;
  border: 2px solid #E41E2B;
  border-radius: 12px;
  font:
    600 17px Rubik,
    Arial,
    sans-serif;
  text-align: center;
  background: #fff;
  color: #160C0D;
  direction: rtl;
}
.game-btn:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: default;
}
.game-who {
  font-size: 15px;
}
.game-link {
  border: 0;
  background: none;
  color: #E41E2B;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0 4px;
}
.game-board {
  width: 100%;
  max-width: 250px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 8px 12px;
}
.game-board-title {
  font-size: 12px;
  font-weight: 700;
  color: #E41E2B;
  margin-bottom: 4px;
}
.game-board ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 170px;
  overflow-y: auto;
}
.game-board li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  line-height: 1.55;
  border-bottom: 1px solid rgba(22, 12, 13, 0.07);
}
.game-board li.me {
  background: rgba(228, 30, 43, 0.12);
  font-weight: 700;
  border-radius: 6px;
}
.game-board .rk {
  width: 18px;
  color: #7a6f70;
  text-align: center;
}
.game-board .nm {
  flex: 1;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-board .sc {
  font-weight: 700;
}
.poster-wrap {
  position: relative;
  width: 100%;
  max-width: 326px;
  margin: 0 auto;
  aspect-ratio: 930 / 1704;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 14px 40px rgba(40, 28, 20, 0.3);
  background: #cfc6b8;
}
.poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-glass {
  position: absolute;
  left: 6.1%;
  top: 7.45%;
  width: 87.2%;
  height: 80.9%;
  overflow: hidden;
  background: #1b2333 center / cover no-repeat;
}
.poster-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.16) 0%,
      rgba(255, 255, 255, 0) 28%,
      rgba(255, 255, 255, 0) 70%,
      rgba(255, 255, 255, 0.07) 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 0 14px rgba(0, 0, 0, 0.35);
}
.poster-glass .game {
  height: 100%;
}
.poster-glass .game-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.poster-glass .game-canvas {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.poster-glass .game-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  margin: 0;
}
.game-tag {
  font:
    300 22px Rubik,
    "Helvetica Neue",
    Arial,
    sans-serif;
  letter-spacing: 0.5px;
  color: #160C0D;
  margin-top: -4px;
  direction: ltr;
}
.poster-glass .game-overlay {
  gap: 9px;
  padding: 14px;
}
html,
body {
  margin: 0;
  height: 100%;
  background: #0f1520;
}
.standalone-card {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}
.standalone-closing {
  display: none;
}
.standalone-card {
  padding: 0;
}
.poster-wrap {
  max-width: none !important;
  width: min(100vw, calc(100dvh * 0.5458));
}
#fsbtn {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 6px 12px;
  font: 13px Arial, sans-serif;
  cursor: pointer;
}
