@font-face {
  font-family: Arc;
  src: url(Handjet-Regular.ttf);
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Club;
  src: url(Manrope-Bold.ttf);
  font-weight: 700;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --base: #122822;
  --ink: #f7eed5;
  --dim: #c3c8b6;
  --gold: #efd096;
  --wood: #815e3a;
  --deep: #0e201d;
  --blue: #add9f1;
  --red: #ffb09d;
  --green: #a0dfa4;
  background: var(--deep);
  color: var(--ink);
  font:
    700 15px/1.3 Club,
    system-ui,
    sans-serif;
}
body {
  margin: 0;
}
button,
input,
a {
  font: inherit;
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffe298;
  outline-offset: 2px;
}
button:active:enabled {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p,
ol {
  margin: 0;
}
button {
  border: 0;
}
h1,
h2,
h3,
.arc {
  font-family: Arc, monospace;
}
h1 {
  font-size: clamp(26px, 7vw, 36px);
  line-height: 1.05;
}
h2 {
  font-size: 28px;
  line-height: 1.05;
}
main {
  width: 100%;
  max-width: 565px;
  margin: auto;
  background: var(--base);
  min-height: 100svh;
  padding: max(
      env(safe-area-inset-top),
      calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))
    )
    max(0px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom))
    max(0px, env(safe-area-inset-left));
}
.bar {
  min-height: 52px;
  padding: 3px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--deep);
}
.bar h1 {
  flex: 1;
  min-width: 0;
}
.tool {
  background: transparent;
  color: var(--dim);
  border: 0;
  text-decoration: none;
  min-width: 42px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
}
.purse {
  text-align: right;
}
.purse small,
.muted {
  color: var(--dim);
  font-size: 12px;
}
.purse small {
  display: block;
  font-size: 10px;
}
.purse strong {
  font-size: 16px;
}
.scene {
  width: 100%;
  display: block;
  object-fit: cover;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.primary,
.quiet,
.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 9px 13px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
}
.primary,
.login {
  color: #222820;
  background: var(--gold);
  border-bottom: 3px solid var(--wood);
}
.quiet {
  color: var(--ink);
  background: #ffffff0b;
}
.primary:disabled,
.quiet:disabled {
  opacity: 0.45;
}
.login {
  margin: 8px 12px;
}
.login-only main > :not(.bar, .login, .window),
.login-only .bar button,
.login-only .purse {
  display: none;
}
.notice {
  font-size: 13px;
  color: #ffcf9b;
  margin: 0 12px;
}
.notice:not(:empty) {
  margin-block: 8px;
}
.face {
  position: relative;
  display: block;
  flex: none;
  width: var(--cw, 47px);
  aspect-ratio: 0.69;
  border-radius: 5px;
  background: #fff0cc;
  color: #172d31;
  border: 1px solid #eddbaf;
  border-bottom: 3px solid #c5b289;
  box-shadow: 0 1px 2px #0008;
  text-align: center;
  user-select: none;
  isolation: isolate;
}
.face.red {
  color: #a33940;
}
.corner,
.bottom-corner {
  font:
    700 clamp(12px, 3.8vw, 18px) / 1 Club,
    sans-serif;
  position: absolute;
  top: 3px;
  left: 3px;
}
.bottom-corner {
  inset: auto 3px 2px auto;
  transform: rotate(180deg);
}
.suit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font:
    700 clamp(20px, 6vw, 29px) / 1 Georgia,
    serif;
}
.back-card {
  background: #45405c url(club-emblem.png) center/46% auto no-repeat;
  border: 2px solid #ddcda6;
  box-shadow: inset 0 0 0 2px #7d7191;
  border-radius: 4px;
  image-rendering: pixelated;
}
dialog {
  background: var(--deep);
  color: var(--ink);
  border: 1px solid #8c8064;
  border-radius: 13px;
  padding: 15px;
  max-width: min(480px, calc(100vw - 20px));
  width: 100%;
  max-height: 82dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #080e12c9;
}
dialog h2 {
  flex: 1;
}
dialog p {
  margin: 9px 0;
  color: var(--dim);
}
dialog form {
  margin: 0;
}
.room-music-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  width: fit-content;
  cursor: pointer;
}
.room-music-option input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--gold);
}
dialog .close {
  height: 44px;
  min-width: 44px;
  font-size: 24px;
}
.face-enter {
  animation: drop 0.23s ease-out;
}
@keyframes drop {
  from {
    opacity: 0.15;
    transform: translateY(-12px) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
