@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f4f3ee;
  color: #283c30;
  font:
    15px/1.6 'DM Sans',
    system-ui,
    sans-serif;
}
main {
  max-width: 1160px;
  margin: auto;
  padding: 32px 28px 48px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.title-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 16px 0 0;
  text-align: left;
}
.subtitle {
  font-size: 14px;
  color: #6c776c;
  margin: 4px 0 24px;
}
h1 {
  font:
    400 clamp(22px, 4vw, 32px) / 1.25 'Playfair Display',
    Georgia,
    serif;
  letter-spacing: -0.02em;
  margin: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-right: 10px;
}
.brand span {
  font-weight: 700;
  margin-left: 8px;
  color: #36777d;
}
.info {
  display: inline-block;
  flex: none;
}
#info-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #c9d0c3;
  background: transparent;
  color: #647364;
  font: italic 700 15px 'Playfair Display', Georgia, serif;
  line-height: 1;
  cursor: pointer;
}
#info-button:hover,
#info-button:focus-visible {
  background: #e5e9df;
  color: #283c30;
}
.info-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 16px;
  background: #fbfaf7;
  border: 1px solid #ccd1c8;
  border-radius: 10px;
  box-shadow: 0 12px 32px #283c3026;
  font-size: 12px;
  line-height: 1.6;
  color: #4c5a4c;
  text-align: left;
  z-index: 10;
}
.info:hover .info-panel,
.info:focus-within .info-panel,
.info.open .info-panel {
  display: block;
}
.info-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: #283c30;
}
.info-panel ul {
  margin: 0;
  padding-left: 18px;
}
.info-panel li + li {
  margin-top: 4px;
}
.device {
  background: #d9ded1;
  padding: 0 24px;
  border-radius: 21px;
  box-shadow:
    0 18px 42px #283c3012,
    inset 0 0 0 1px #c1cab9;
}
.device-top {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: italic 18px Georgia;
  color: #71816a;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #789674;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5/3;
  background: #1b1d1b;
  border-radius: 3px;
  outline-offset: 5px;
  image-rendering: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.device-bottom {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  letter-spacing: 0.2em;
  font-size: 8px;
  color: #7a8774;
}
.device-bottom span {
  letter-spacing: 0;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.dpad {
  display: none;
  grid-template-columns: repeat(3, 46px);
  grid-template-rows: repeat(2, 44px);
  justify-content: center;
  gap: 6px;
  flex: none;
}
.dpad button {
  padding: 0;
  font-size: 18px;
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#arrow-up {
  grid-column: 2;
  grid-row: 1;
}
#arrow-left {
  grid-column: 1;
  grid-row: 2;
}
#arrow-down {
  grid-column: 2;
  grid-row: 2;
}
#arrow-right {
  grid-column: 3;
  grid-row: 2;
}
#tab {
  display: none;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
button {
  background: transparent;
  border: 1px solid #c9d0c3;
  color: inherit;
  border-radius: 7px;
  padding: 8px 14px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
button:hover {
  background: #e5e9df;
}
button:disabled {
  opacity: 0.4;
  cursor: wait;
}
#status {
  font-size: 12px;
  color: #71806a;
  min-height: 20px;
}
#mobile-input {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
}
.stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
}
.stage-main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 800px;
}
.shortcuts-desktop {
  display: none;
}
.shortcuts h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
}
.shortcuts ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.shortcuts li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #dde2d5;
  font-size: 13px;
  color: #4c5a4c;
}
.shortcuts li:first-child {
  border-top: 0;
}
.keys {
  flex: none;
  display: inline-flex;
  gap: 3px;
  align-items: center;
  min-width: 96px;
}
kbd {
  font: 600 11px 'DM Sans', system-ui, sans-serif;
  padding: 2px 6px;
  border: 1px solid #c9d0c3;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fbfaf7;
  color: #283c30;
}
.shortcuts-mobile {
  display: none;
  margin-top: 16px;
  border: 1px solid #ccd1c8;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fbfaf7;
}
.shortcuts-mobile summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.shortcuts-mobile ul {
  margin-top: 6px;
}
@media (min-width: 1024px) {
  .shortcuts-desktop {
    display: block;
    flex: none;
    width: 230px;
  }
}
@media (pointer: coarse) {
  .dpad {
    display: grid;
  }
  .controls {
    justify-content: space-between;
    gap: 12px;
  }
  .toolbar {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .toolbar button {
    width: 100%;
  }
  #tab {
    display: block;
    grid-column: 1;
    grid-row: 3;
  }
  #save {
    grid-column: 2;
    grid-row: 2;
  }
  .shortcuts-mobile {
    display: block;
  }
}
@media (max-width: 600px) {
  main {
    padding: 22px 14px;
  }
  .device {
    padding: 0 12px;
    border-radius: 12px;
  }
  .device-top {
    height: 28px;
  }
  .device-bottom {
    height: 24px;
  }
  .toolbar {
    gap: 4px;
  }
  button {
    padding: 8px 10px;
    font-size: 11px;
  }
  .dpad button {
    font-size: 18px;
  }
}

/* Feedback tab: a rotated button pinned to the bottom-right edge, opening a
   small form that posts to the feedback table. */
#feedback-button {
  position: fixed;
  right: 0;
  bottom: 150px;
  z-index: 20;
  transform: rotate(-90deg);
  transform-origin: bottom right;
  background: #283c30;
  color: #f4f3ee;
  border: 1px solid #283c30;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px #283c3026;
}
#feedback-button:hover,
#feedback-button:focus-visible {
  background: #36777d;
  border-color: #36777d;
}
.feedback-panel {
  position: fixed;
  right: 48px;
  bottom: 170px;
  z-index: 20;
  width: min(320px, calc(100vw - 96px));
  padding: 16px;
  background: #fbfaf7;
  border: 1px solid #ccd1c8;
  border-radius: 10px;
  box-shadow: 0 12px 32px #283c3026;
  color: #283c30;
  text-align: left;
}
.feedback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.feedback-title {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
}
#feedback-close {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: #647364;
}
#feedback-close:hover,
#feedback-close:focus-visible {
  background: #e5e9df;
  color: #283c30;
}
#feedback-form label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  color: #4c5a4c;
}
#feedback-message {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 84px;
  padding: 10px 12px;
  border: 1px solid #c9d0c3;
  border-radius: 8px;
  background: #fff;
  color: #283c30;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
#feedback-message:focus-visible {
  outline: 2px solid #36777d;
  outline-offset: 1px;
  border-color: #36777d;
}
#feedback-submit {
  margin-top: 12px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #36777d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
#feedback-submit:hover:not(:disabled),
#feedback-submit:focus-visible:not(:disabled) {
  background: #2a5f65;
}
#feedback-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.feedback-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #9b2c2c;
}
.feedback-success {
  margin: 12px 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: #283c30;
}
@media (max-width: 600px) {
  .feedback-panel {
    right: 44px;
    bottom: 160px;
  }
}

/* Waitlist section: mirrors the site's WaitlistSection (dark ink band with a
   paper card holding the same subscribe form as the home page). */
.waitlist {
  background: #283c30;
  color: #f4f3ee;
  padding: 64px 24px;
}
.waitlist-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}
.waitlist-copy {
  flex: 1;
}
.waitlist-copy h2 {
  font:
    400 clamp(28px, 4vw, 40px) / 1.2 'Playfair Display',
    Georgia,
    serif;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.waitlist-copy p {
  margin: 0 0 16px;
  color: #f4f3eeb3;
  line-height: 1.7;
}
.waitlist-signoff {
  font: italic 400 14px 'Playfair Display', Georgia, serif;
  color: #f4f3ee80;
}
.waitlist-card {
  width: 100%;
  max-width: 400px;
  flex: none;
  background: #fbfaf7;
  color: #283c30;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 18px 42px #00000080;
}
.waitlist-card h3 {
  font:
    400 24px / 1.25 'Playfair Display',
    Georgia,
    serif;
  margin: 0 0 4px;
}
.waitlist-note {
  font-size: 13px;
  color: #6c776c;
  margin: 0 0 20px;
}
#waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#waitlist-email {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c9d0c3;
  border-radius: 8px;
  background: #fff;
  color: #283c30;
  font: inherit;
  font-size: 14px;
}
#waitlist-email:focus-visible {
  outline: 2px solid #36777d;
  outline-offset: 1px;
  border-color: #36777d;
}
#waitlist-submit {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: #36777d;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
#waitlist-submit:hover:not(:disabled),
#waitlist-submit:focus-visible:not(:disabled) {
  background: #2a5f65;
}
#waitlist-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.waitlist-error {
  margin: 0;
  font-size: 13px;
  color: #9b2c2c;
}
.waitlist-success {
  text-align: center;
  padding: 8px 0 4px;
}
.waitlist-success-title {
  font:
    400 24px 'Playfair Display',
    Georgia,
    serif;
  margin: 0 0 8px;
}
.waitlist-success p {
  font-size: 14px;
  color: #4c5a4c;
  margin: 0 0 12px;
}
.waitlist-survey {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: #36777d;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.waitlist-survey:hover {
  background: #2a5f65;
}
.waitlist-fineprint {
  margin: 16px 0 0;
  font-size: 12px;
  color: #6c776c;
  text-align: center;
}
.waitlist-fineprint a {
  color: inherit;
}
.waitlist-share {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dde2d5;
  text-align: center;
}
.waitlist-share > p {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6c776c;
}
.waitlist-share-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.waitlist-share-row a,
.waitlist-share-row button {
  padding: 7px 12px;
  border: 1px solid #c9d0c3;
  border-radius: 999px;
  background: transparent;
  color: #4c5a4c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.waitlist-share-row a:hover,
.waitlist-share-row button:hover {
  border-color: #36777d;
  color: #36777d;
}
.waitlist-copied {
  margin: 8px 0 0;
  font-size: 12px;
  color: #36777d;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .waitlist-inner {
    flex-direction: row;
    gap: 64px;
  }
}

/* Clickable Ctrl shortcuts in the shortcuts lists. */
.shortcuts-hint {
  font-size: 12px;
  color: #71806a;
  margin: 0 0 4px;
}
/* The list is long now, so it scrolls inside its own box instead of
   stretching the page; the heading and hint stay visible above it. */
.shortcuts-desktop ul {
  max-height: 480px;
  overflow-y: auto;
}
.shortcuts-mobile ul {
  max-height: 320px;
  overflow-y: auto;
}
.shortcut-action {
  cursor: pointer;
  border-radius: 6px;
}
.shortcut-action:hover,
.shortcut-action:focus-visible {
  background: #e5e9df;
}
.shortcut-action:focus-visible {
  outline: 2px solid #36777d;
  outline-offset: 1px;
}
