/* TWENTY TONS sales page. Palette is the game's own (play/styles.css): walnut, ivory, brass, felt. */
:root {
  --ivory: #f3ecdc;
  --ivory-2: #e6dcc6;
  --ink: #241c14;
  --ink-soft: #5d4f3e;
  --walnut: #2a1c13;
  --walnut-2: #3a281b;
  --felt: #6e1f22;
  --brass: #d8a73c;
  --red: #c8321f;
  --amber: #d98b1c;
  --green: #3f7a4a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}
a {
  color: var(--felt);
}
.small {
  font-size: 15px;
  color: var(--ink-soft);
}
i {
  font-style: italic;
}

/* show/hide by input type, not width: a big tablet still has no keyboard */
.touch-only {
  display: none !important;
}
@media (hover: none) {
  .touch-only {
    display: inline-block !important;
  }
  p.touch-only,
  span.touch-only {
    display: block !important;
  }
  .desk-only {
    display: none !important;
  }
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px;
  background: var(--walnut);
  color: var(--ivory);
  border-bottom: 2px solid var(--brass);
}
.brand {
  color: var(--ivory);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.top-cta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--walnut);
  background: var(--brass);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 4px;
}

.hero {
  background: radial-gradient(ellipse at top, #3d2a1c, var(--walnut) 70%);
  color: var(--ivory);
  padding: 40px 20px 34px;
}
.hero > * {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.kicker {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 auto 12px;
}
h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.12;
  margin: 0 auto 18px;
  font-weight: 700;
}
.sub {
  font-size: 21px;
  margin: 0 auto 12px;
  color: #efe4cc;
}
.sub.small {
  font-size: 17px;
  color: #cbb89a;
}
.under {
  font-size: 15px;
  color: #cbb89a;
  margin-top: 12px;
}
.under a {
  color: var(--brass);
}

/* ---------------------------------------------------------------- the bench (hero widget) */
#hd {
  margin-top: 20px;
  background: var(--ivory);
  color: var(--ink);
  border-radius: 8px;
  border: 3px solid var(--brass);
  padding: 16px 16px 14px;
  position: relative;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.4;
}
#hd.shake {
  animation: shake 0.45s;
}
@keyframes shake {
  20% {
    transform: translateX(-7px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(2px);
  }
}
#hd button {
  font-family: var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}
.stats {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}
.stats b {
  font-family: var(--serif);
  font-size: 22px;
}
.stats small {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.plate {
  background: var(--walnut);
  border-radius: 6px;
  padding: 30px 8px 8px;
}
.keys {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.grp {
  background: var(--walnut-2);
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 6px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #cbb89a;
  min-height: 44px;
}
.grp:hover {
  border-color: #7a5e40;
}
.grp.sel {
  border-color: var(--brass);
  background: #4a3322;
}
.bar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  max-width: 46px;
}
.bar i {
  display: block;
  height: 26px;
  border-radius: 2px;
  background: #1c130d;
  border: 1px solid #4a3828;
}
.bar i.on {
  background: linear-gradient(#e9e1cf, #c9bda2);
  border-color: #e9e1cf;
}
.bar i.lose {
  background: repeating-linear-gradient(
    135deg,
    #e9e1cf 0 4px,
    transparent 4px 8px
  );
  border: 1px dashed var(--brass);
}
.grp small {
  font-size: 11px;
}
.strut {
  position: absolute;
  top: -26px;
  bottom: -4px;
  width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.strut::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 0;
  width: 5px;
  margin-left: -2.5px;
  left: 0;
  background: var(--brass);
  border-radius: 2px;
  opacity: 0.85;
}
.strut b,
.strut span {
  position: relative;
  transform: translateX(-50%);
  left: 0;
  font-size: 12px;
  font-weight: 700;
  background: var(--brass);
  color: var(--walnut);
  padding: 0 5px;
  border-radius: 3px;
  white-space: nowrap;
}
.strut b {
  display: none;
}
.strut span::before {
  content: attr(data-k);
}
.strut.some::before {
  background: #e3c46a;
}
.strut.warm::before {
  background: var(--amber);
}
.strut.warm span {
  background: var(--amber);
}
.strut.bad::before {
  background: var(--red);
}
.strut.bad span {
  background: var(--red);
  color: #fff;
}
.reaches {
  position: relative;
  height: 54px;
  margin-top: 6px;
}
.reach {
  position: absolute;
  height: 12px;
  border: 2px solid #8a6a3a;
  border-top: none;
  border-radius: 0 0 5px 5px;
}
.reach span {
  position: absolute;
  left: var(--mid);
  top: 2px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--brass);
}
.reach.r0 {
  top: 0;
}
.reach.r1 {
  top: 18px;
}
.reach.r2 {
  top: 36px;
}

.ctl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.sizes {
  display: flex;
  border: 2px solid var(--walnut);
  border-radius: 6px;
  overflow: hidden;
}
.sizes button {
  border: 0;
  background: var(--ivory-2);
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  min-width: 48px;
  min-height: 44px;
}
.sizes button + button {
  border-left: 1px solid #b9ab8e;
}
.sizes button.on {
  background: var(--walnut);
  color: var(--ivory);
}
.turn {
  border: 0;
  border-radius: 6px;
  background: var(--felt);
  color: var(--ivory);
  padding: 11px 20px;
  font-size: 16px;
  font-weight: 700;
  min-height: 44px;
}
.turn.armed {
  background: var(--red);
}
.mini {
  border: 1px solid #b9ab8e;
  background: transparent;
  border-radius: 6px;
  padding: 9px 11px;
  font-size: 14px;
  min-height: 44px;
}
.info {
  min-height: 42px;
  margin: 10px 0 6px;
  font-size: 15px;
}
.info .no {
  color: var(--red);
  font-weight: 700;
}
.hands {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  border-top: 1px solid #d5c9ae;
  padding-top: 10px;
}
.hands span {
  font-size: 13px;
  color: var(--ink-soft);
  margin-right: 4px;
}
.hands button {
  border: 1px solid #b9ab8e;
  background: var(--ivory-2);
  border-radius: 14px;
  padding: 7px 12px;
  font-size: 13px;
  min-height: 36px;
}
.hands button.on {
  background: var(--walnut);
  color: var(--ivory);
}

.card {
  position: absolute;
  inset: 8px;
  background: rgba(243, 236, 220, 0.97);
  border-radius: 6px;
  padding: 18px 20px;
  overflow: auto;
  border: 2px solid var(--walnut);
}
.card .kicker {
  color: var(--felt);
  margin: 0 0 4px;
}
.card .stars {
  font-family: var(--serif);
  font-size: 30px;
  margin: 0 0 6px;
  color: var(--felt);
}
.card p {
  margin: 0 0 10px;
}
.vs {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 6px 0 12px;
}
.vs td {
  padding: 4px 6px;
  border-bottom: 1px solid #ddd0b4;
}
.vs td:last-child {
  text-align: right;
  white-space: nowrap;
}
.vs tr.you td {
  font-weight: 700;
  background: #efe0bd;
}
.card-go {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.card .note {
  font-size: 14px;
  color: var(--ink-soft);
}

.btn,
.btn-s {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 16px;
  border: 0;
  cursor: pointer;
}
.btn {
  background: var(--felt);
  color: var(--ivory);
}
.btn-s {
  background: var(--ivory-2);
  color: var(--ink);
  border: 1px solid #b9ab8e;
}

/* ---------------------------------------------------------------- body copy */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 20px 30px;
}
main section {
  padding: 26px 0 8px;
}
h2 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 14px;
  color: var(--walnut);
}
table.hands-t,
table.pianos-t {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 15px;
  margin: 8px 0 18px;
}
.hands-t th,
.pianos-t th {
  text-align: left;
  border-bottom: 2px solid var(--walnut);
  padding: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hands-t td,
.pianos-t td {
  padding: 8px 6px;
  border-bottom: 1px solid #d5c9ae;
  vertical-align: top;
}
.hands-t tr.par td {
  font-weight: 700;
  background: #efe0bd;
}
.pianos-t td:first-child {
  font-weight: 700;
  width: 25%;
}
ul.plain {
  padding-left: 20px;
}
ul.plain li {
  margin-bottom: 10px;
}
dl dt {
  font-weight: 700;
  margin-top: 16px;
}
dl dd {
  margin: 4px 0 0;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}
footer {
  background: var(--walnut);
  color: #cbb89a;
  text-align: center;
  padding: 22px;
  font-size: 15px;
}
footer p {
  margin: 4px 0;
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }
  .hero {
    padding: 28px 14px 26px;
  }
  .sub {
    font-size: 19px;
  }
  #hd {
    padding: 12px 8px 10px;
    margin-left: -6px;
    margin-right: -6px;
  }
  .keys {
    gap: 3px;
  }
  .grp {
    padding: 4px 1px 3px;
  }
  .grp small {
    font-size: 9px;
  }
  .bar i {
    height: 22px;
  }
  .stats b {
    font-size: 18px;
  }
  .stats div {
    min-width: 0;
    flex: 1;
  }
  .sizes button {
    padding: 10px 0;
    min-width: 46px;
  }
  .turn {
    flex: 1;
  }
  .mini {
    padding: 8px;
    font-size: 13px;
  }
  .card {
    inset: 4px;
    padding: 14px 12px;
  }
  .hands-t,
  .pianos-t {
    font-size: 14px;
  }
}
.legend { color: var(--ink-soft); font-size: 13px; margin: 0 2px 8px; }
@media (max-width: 600px) {
  .hero .kicker { display: none; }
  h1 { font-size: 26px; margin-bottom: 10px; }
  .sub { font-size: 17px; margin-bottom: 8px; }
  #hd { margin-top: 12px; }
}
.pianos-t td small { display: block; font-weight: 400; font-style: italic; font-size: 13px; color: var(--ink-soft); }
.info .hint { display: block; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 600px) {
  .pianos-t tr { display: grid; grid-template-columns: 1fr auto auto; gap: 0 10px; border-bottom: 1px solid #d5c9ae; padding: 6px 0; }
  .pianos-t th:nth-child(2) { display: none; }
  .pianos-t td { border: 0; padding: 2px 4px; }
  .pianos-t td:first-child { width: auto; }
  .pianos-t td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
