.play-desk {
  --play-plum: #302334;
  --play-cream: #fff9ef;
  --play-pink: #ee5d98;
  color: var(--play-plum);
  background: #ead4c0;
  border: 1px solid var(--play-plum);
  border-radius: 7px;
  overflow: hidden;
  font-family: "DM Sans", Arial, sans-serif;
}
.play-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px 18px;
}
.play-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.play-desk-note {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  transform: rotate(-3deg);
}
.play-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 25px;
  gap: 8px;
}
.play-tabs button {
  background: #ddc2ab;
  color: var(--play-plum);
  border: 1px solid #30233435;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  display: flex;
  align-items: center;
  padding: 17px 16px;
  font:
    600 12px "DM Sans",
    Arial,
    sans-serif;
  cursor: pointer;
  gap: 12px;
}
.play-tabs button > span {
  font-size: 9px;
  opacity: 0.6;
}
.play-tabs button > i {
  margin-left: auto;
  font-style: normal;
}
.play-tabs button[aria-selected="true"] {
  background: var(--play-cream);
  border-color: #30233450;
  position: relative;
  z-index: 2;
}
.play-tabs button:hover {
  background: #f4e6d7;
}
.play-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 35px;
  background: var(--play-cream);
  margin: 0 25px;
  border: 1px solid #30233450;
  padding: 35px;
  min-height: 380px;
  position: relative;
}
.play-panel[hidden] {
  display: none !important;
}
.play-instructions {
  padding-top: 7px;
}
.play-small {
  font-size: 8px;
  letter-spacing: 0.1em;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 17px;
}
.play-instructions h3 {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 36px;
  line-height: 1.04;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.play-instructions > p:not(.play-small) {
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 20px;
  max-width: 265px;
}
.play-colours {
  display: flex;
  gap: 12px;
  margin: 22px 0 15px;
}
.play-colour {
  border: 3px solid var(--play-cream);
  border-radius: 50%;
  background: var(--pencil);
  height: 26px;
  width: 26px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 1px transparent;
}
.play-colour[aria-pressed="true"] {
  box-shadow: 0 0 0 1px var(--play-plum);
}
.play-instructions > .play-keyboard-hint {
  font-size: 9px !important;
  color: #77696e;
  max-width: 270px !important;
  margin: 0 !important;
}
.play-pad-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: center;
  min-width: 0;
  padding-top: 5px;
}
.play-tape {
  position: absolute;
  width: 86px;
  height: 28px;
  background: #e4b95d78;
  transform: translateX(-50%) rotate(-4deg);
  left: 50%;
  top: -7px;
  z-index: 2;
  pointer-events: none;
}
.play-canvas {
  display: block;
  width: 100%;
  height: 280px;
  background: #fffefa;
  box-shadow: 1px 4px 11px #30233417;
  cursor: crosshair;
  touch-action: none;
  border: 1px solid #30233412;
  border-radius: 0;
  max-width: 100%;
}
.play-pad-tools {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-top: 15px;
}
.play-pad-tools button {
  border: 0;
  border-bottom: 1px solid #30233450;
  background: transparent;
  color: var(--play-plum);
  padding: 4px 0;
  font:
    500 10px "DM Sans",
    Arial,
    sans-serif;
  cursor: pointer;
}
.play-pad-tools button:last-child {
  margin-left: auto;
}
.play-pad-tools button:disabled {
  opacity: 0.4;
  cursor: default;
  border-color: transparent;
}
.play-status {
  padding: 16px 26px;
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  min-height: 55px;
  line-height: 1.4;
  border-top: 0;
}
.play-target {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 8px;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin: 24px 0 15px;
}
.play-target b {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 40px;
  line-height: 1;
  font-weight: 400;
}
.play-replay {
  font:
    600 11px "DM Sans",
    Arial,
    sans-serif;
  background: var(--play-plum);
  color: var(--play-cream);
  border: 0;
  padding: 12px 16px;
  border-radius: 3px;
  cursor: pointer;
}
.play-game {
  border: 1px solid #30233430;
  background: #f3e9db;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 25px 25px 18px;
  border-radius: 4px;
  min-height: 315px;
  transition: background 0.25s;
}
.play-sum {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.play-sum > span {
  font-size: 9px;
  letter-spacing: 0.12em;
}
.play-sum b {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 65px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.05em;
}
.play-sum small {
  font-size: 11px;
  margin-top: 6px;
  min-height: 17px;
  text-align: center;
}
.play-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin: 26px 0;
}
.play-tokens button {
  width: 48px;
  height: 48px;
  background: var(--play-cream);
  border: 1px solid var(--play-plum);
  border-radius: 50%;
  box-shadow: 0 3px 0 #30233435;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 23px;
  color: var(--play-plum);
  cursor: pointer;
  transition:
    transform 0.15s,
    background 0.15s;
}
.play-tokens button[aria-pressed="true"] {
  background: var(--play-pink);
  transform: translateY(3px);
  box-shadow: none;
}
.play-game-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 8px;
  border-top: 1px solid #30233425;
  padding-top: 15px;
}
.play-won {
  background: #cfe5cf;
}
.play-won .play-sum b::after {
  content: "✳";
  font-size: 35px;
  color: #3d6c4a;
  position: absolute;
  margin: 8px 0 0 12px;
}
.play-calculator-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.play-calculator {
  width: 255px;
  background: #dba8bf;
  padding: 20px 19px 15px;
  border: 1.5px solid var(--play-plum);
  border-radius: 13px 13px 21px 21px;
  box-shadow: 4px 6px 0 #b27a93;
  transform: rotate(3deg);
}
.play-calculator-brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.play-calculator-brand span {
  font-size: 5px;
}
.play-display {
  display: block;
  background: #dbe1ca;
  color: #343d32;
  border: 1px solid var(--play-plum);
  box-shadow: inset 2px 2px 0 #30233425;
  border-radius: 4px;
  padding: 12px 9px;
  font: 28px monospace;
  text-align: right;
  letter-spacing: -0.07em;
  min-height: 57px;
  overflow: hidden;
}
.play-calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 15px;
}
.play-calc-keys button {
  font:
    17px "DM Sans",
    Arial,
    sans-serif;
  padding: 5px 0;
  min-height: 35px;
  border: 1px solid var(--play-plum);
  border-radius: 5px;
  color: var(--play-plum);
  background: var(--play-cream);
  box-shadow: 0 2px 0 #302334;
  cursor: pointer;
}
.play-calc-keys button:active {
  transform: translateY(2px);
  box-shadow: none;
}
.play-calc-keys .play-equals {
  grid-column: span 2;
  background: var(--play-plum);
  color: var(--play-cream);
}
.play-calculator-foot {
  font-size: 5px;
  letter-spacing: 0.12em;
  text-align: center;
  padding-top: 13px;
  font-weight: 700;
}
.play-calculator-reaction {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 16px;
  line-height: 1.4;
  max-width: 340px;
  text-align: center;
  margin: 22px 0 0;
  min-height: 42px;
}
.play-instructions > .play-handwriting {
  font-family: "DM Serif Display", Georgia, serif;
  font-style: italic;
  font-size: 19px !important;
  line-height: 1.2 !important;
  transform: rotate(-4deg);
  color: #a22d64;
  margin: 25px 0 !important;
}
.play-desk button:focus-visible,
.play-desk canvas:focus-visible {
  outline: 3px solid #9d3067;
  outline-offset: 4px;
}
@media (max-width: 1000px) {
  .play-panel {
    gap: 25px;
    padding: 28px;
    grid-template-columns: 0.85fr 1.15fr;
  }
  .play-instructions h3 {
    font-size: 32px;
  }
  .play-tabs button {
    font-size: 10px;
    padding: 15px 12px;
    gap: 7px;
  }
  .play-tabs button > span {
    font-size: 8px;
  }
  .play-tokens {
    gap: 8px;
  }
  .play-tokens button {
    height: 42px;
    width: 42px;
  }
  .play-pad-tools {
    gap: 10px;
  }
  .play-pad-tools button {
    font-size: 9px;
  }
  .play-canvas {
    height: 265px;
  }
}
@media (max-width: 760px) {
  .play-top {
    padding: 17px 15px;
  }
  .play-label {
    font-size: 7px;
    letter-spacing: 0.08em;
  }
  .play-desk-note {
    display: none;
  }
  .play-tabs {
    margin: 0 12px;
    gap: 4px;
  }
  .play-tabs button {
    padding: 12px 8px;
    font-size: 9px;
    line-height: 1.4;
    text-align: left;
    gap: 4px;
    min-height: 50px;
  }
  .play-tabs button > i {
    display: none;
  }
  .play-tabs button > span {
    display: none;
  }
  .play-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 0 12px;
    padding: 23px 18px;
    min-height: 0;
  }
  .play-instructions h3 {
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 14px;
  }
  .play-instructions h3 br {
    display: none;
  }
  .play-instructions > p:not(.play-small) {
    font-size: 12px;
    max-width: none;
    margin-bottom: 15px;
  }
  .play-small {
    font-size: 7px;
    margin-bottom: 12px;
  }
  .play-colours {
    margin: 17px 0 13px;
    gap: 14px;
  }
  .play-colour {
    width: 30px;
    height: 30px;
  }
  .play-instructions > .play-keyboard-hint {
    font-size: 8px !important;
    max-width: none !important;
  }
  .play-pad-wrap {
    width: 100%;
    padding-top: 5px;
  }
  .play-canvas {
    height: 250px;
  }
  .play-pad-tools {
    gap: 11px;
    flex-wrap: wrap;
    padding-top: 13px;
  }
  .play-pad-tools button {
    font-size: 9px;
    min-height: 34px;
  }
  .play-pad-tools button:last-child {
    margin-left: auto;
  }
  .play-status {
    font-size: 14px;
    padding: 15px 17px;
    min-height: 70px;
  }
  .play-target {
    margin: 18px 0;
    display: inline-flex;
    gap: 15px;
    margin-right: 20px;
  }
  .play-target b {
    font-size: 35px;
  }
  .play-replay {
    padding: 12px 13px;
  }
  .play-game {
    padding: 22px 16px;
    min-height: 295px;
  }
  .play-game-footer {
    font-size: 7px;
  }
  .play-tokens {
    gap: 10px;
    max-width: 230px;
  }
  .play-tokens button {
    height: 48px;
    width: 48px;
  }
  .play-calculator {
    width: 240px;
  }
  .play-calculator-reaction {
    font-size: 16px;
  }
  .play-calculator-wrap {
    padding: 5px 0;
  }
  .play-instructions > .play-handwriting {
    font-size: 18px !important;
    margin: 18px 0 !important;
  }
  .play-calc-panel {
    gap: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .play-desk * {
    transition: none !important;
    animation: none !important;
  }
}
