:root {
  --paper: #fff7ef;
  --char: #2b1f16;
  --frame: #d9b89a;
  --hot: #ff6a3d;
  --cool: #2b9e9a;
  --deep: #4f3422;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Assistant", sans-serif;
  color: var(--char);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,106,61,0.15), transparent 34%),
    radial-gradient(circle at 90% 18%, rgba(43,158,154,0.14), transparent 28%),
    var(--paper);
}
a { color: inherit; text-decoration: none; }

.toprack {
  position: sticky;
  top: 0;
  z-index: 46;
  background: rgba(255, 247, 239, 0.96);
  border-bottom: 2px solid var(--frame);
}
.toprack-inner {
  width: min(1280px, 97vw);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.mastmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Rubik Glitch", sans-serif;
  font-size: 1rem;
}
.mastmark img { width: 44px; height: 44px; }
.sparkbutton {
  margin-left: auto;
  display: none;
  border: 2px solid var(--deep);
  border-radius: 8px;
  background: #fff;
  color: var(--deep);
  padding: 8px 12px;
  font-weight: 700;
}
.rail {
  margin-left: auto;
  display: flex;
  gap: 10px;
}
.rail a {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 8px;
  border: 2px solid transparent;
}
.rail a.live,
.rail a:hover {
  border-color: var(--hot);
  background: #ffe4da;
}

.mainlane {
  width: min(1280px, 97vw);
  margin: 24px auto 70px;
  display: grid;
  gap: 16px;
}
.heroform {
  background: #fff;
  border: 2px solid var(--frame);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}
.heroform h1 {
  margin: 0;
  font-family: "Rubik Glitch", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  color: var(--deep);
}
.rulechips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.rulechips span {
  border: 2px solid #f1b18f;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff3ed;
  font-weight: 700;
  font-size: 0.84rem;
}
.tuner {
  border: 2px dashed #c59b78;
  border-radius: 14px;
  padding: 18px;
  background: #fff8f3;
}
.tuner h2 {
  margin: 0 0 8px;
  font-family: "Rubik Glitch", sans-serif;
  font-size: 1.1rem;
  color: var(--hot);
}
.tuner dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.tuner dt { font-weight: 800; }
.tuner dd { margin: 2px 0 0; }

.viewport-box {
  border: 2px solid var(--frame);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.viewport-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  border-bottom: 2px solid #ebccb5;
  background: #fff3ea;
}
.viewport-head h2 {
  margin: 0;
  font-family: "Rubik Glitch", sans-serif;
  font-size: 1rem;
}
.viewport-box iframe {
  width: 100%;
  min-height: 620px;
  border: 0;
  display: block;
}

.featureline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.featureline article {
  border: 2px solid #e4c4ac;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.featureline h3 {
  margin: 0 0 6px;
  font-family: "Rubik Glitch", sans-serif;
  font-size: 0.9rem;
  color: var(--cool);
}

.sheet {
  border: 2px solid var(--frame);
  border-radius: 16px;
  background: #fff;
  padding: clamp(18px, 3vw, 34px);
}
.sheet h1 {
  margin-top: 0;
  font-family: "Rubik Glitch", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}
.sheet h2 {
  margin: 14px 0 6px;
  color: var(--cool);
  font-size: 1.04rem;
}

.downrail {
  border-top: 2px solid var(--frame);
  background: #fff2e7;
}
.downrail-inner {
  width: min(1280px, 97vw);
  margin: 0 auto;
  padding: 22px 0 32px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.downrail nav { display: flex; gap: 12px; flex-wrap: wrap; }

.checkgate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(51, 32, 20, 0.76);
}
.checkgate.on { display: flex; }
.checkcard {
  width: min(510px, 95vw);
  border: 2px solid #7d4a2d;
  border-radius: 14px;
  background: #fff5ef;
  padding: 20px;
}
.checkcard h2 {
  margin: 0 0 8px;
  font-family: "Rubik Glitch", sans-serif;
  font-size: 1.15rem;
}
.checkrow { margin-top: 14px; display: flex; gap: 10px; }
.checkrow button {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 800;
}
.checkyes { background: #2b9e9a; color: #efffff; }
.checkno { background: #ff6a3d; color: #fff3ec; }

@media (max-width: 990px) {
  .heroform { grid-template-columns: 1fr; }
  .featureline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sparkbutton { display: inline-flex; }
  .rail {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    background: #fff7ef;
    border-bottom: 2px solid var(--frame);
    flex-direction: column;
    padding: 12px;
  }
  .rail.show { display: flex; }
  .rail a { border: 2px solid #e4c4ac; }
  .featureline { grid-template-columns: 1fr; }
}