/* Iron Fist Legacy | css/style.css | Developed by Md Shunam Al Anam */

:root {
  --bg:#14100e;
  --gold:#d4a537;
  --crim:#b3202f;
  --ivory:#f1e8d2;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  height: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ivory);
  font-family:
    Georgia,
    "Times New Roman",
    serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
#wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#stage {
  position: relative;
  aspect-ratio: 16/9;
  width: min(100vw, 177.78vh);
  max-height: 100%;
}
canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}
#ui {
  position: absolute;
  inset: 0;
  display: flex;
  background: rgba(10, 7, 6, .8);
  overflow: auto;
  text-align: center;
}
#ui.off {
  display: none;
}
.in {
  margin: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 680px;
}
.logo {
  font-size: clamp(26px, 7.5vw, 72px);
  margin: 0;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 900;
  color: #f6d97a;
  -webkit-text-stroke: 1px #3a2704;
  text-shadow:
    0 1px 0 #b8861b,
    0 2px 0 #a67716,
    0 3px 0 #8f6510,
    0 4px 0 #70500c,
    0 5px 0 #5a3f08,
    0 9px 9px rgba(0, 0, 0, .8),
    0 0 26px rgba(212, 165, 55, .35);
}
h2 {
  margin: 0;
  color: #f6d97a;
  font-size: clamp(18px, 4vw, 34px);
  letter-spacing: .06em;
}
.sm {
  font-size: clamp(10px, 1.8vw, 14px);
  opacity: .85;
  margin: 0;
}
button {
  font: inherit;
  font-size: clamp(11px, 2.2vw, 17px);
  letter-spacing: .07em;
  color: var(--ivory);
  background: linear-gradient(#3b2a1a, #1d1410);
  border: 2px solid var(--gold);
  padding: .5em 1em;
  cursor: pointer;
}
button:hover,
button.on {
  background: var(--crim);
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}
.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}
.card {
  border: 2px solid;
  padding: 6px;
  cursor: pointer;
  font-size: clamp(9px, 1.7vw, 13px);
  line-height: 1.35;
}
.card:hover {
  filter: brightness(1.3);
}
label {
  font-size: clamp(11px, 2vw, 16px);
}
#pad {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(6px, env(safe-area-inset-bottom, 0px));
  display: none;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}
#pad.on {
  display: flex;
}
.pg {
  display: grid;
  gap: 5px;
  pointer-events: auto;
}
.pg button {
  min-width: 0;
  width: clamp(42px, 11vw, 62px);
  height: clamp(42px, 11vw, 62px);
  padding: 0;
  opacity: .55;
  border-radius: 50%;
  touch-action: none;
}
.card {
  transition: transform .12s, box-shadow .2s;
  transform-style: preserve-3d;
  box-shadow: 0 8px 16px #000a;
  border-radius: 6px;
}
.card:hover {
  box-shadow: 0 18px 30px #000c, 0 0 18px rgba(212, 165, 55, .5);
}
.pv {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
  margin: 0 auto 4px;
  pointer-events: none;
}
.th {
  width: 100%;
  cursor: pointer;
  border-radius: 4px;
  transition: transform .15s;
}
.th:hover {
  transform: translateY(-4px) scale(1.04);
}
button {
  box-shadow: 0 5px 0 #5a3f08, 0 9px 14px #000a;
  border-radius: 4px;
  transition:
    transform .1s,
    box-shadow .1s,
    background .15s;
  transform: perspective(500px);
}
button:hover {
  transform: perspective(500px) translateY(-3px) rotateX(10deg);
  box-shadow: 0 8px 0 #5a3f08, 0 14px 20px #000b;
}
button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #5a3f08;
}
