:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top,0px);
  padding-bottom: env(safe-area-inset-bottom,0px);
}

html {
  scroll-padding-top: env(safe-area-inset-top,0px);
}

body {
  margin: 0;
  padding: 0;
  font: 14px -apple-system,BlinkMacSystemFont,sans-serif;
}

img {
  max-width: 100%;
}

[hidden]:not([hidden=until-found i]) {
  display: none!important;
}

/* Layout: canvas scene (integer-scaled pixel art) + side panel on desktop, scene over panel on phones. Single dark look. */
:root {
  --color-page: #1E0F22;
  --color-border: #4B2E63;
  --color-text: #FFFFFF;
  --color-text-muted: #CBCBCB;
  --color-gold: #CBA046;
  --font-display: "Press Start 2P", ui-monospace, "Courier New", monospace;
  --font-body: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  color-scheme: dark;
}

html, body {
  height: 100%;
}

body {
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

canvas {
  image-rendering: crisp-edges;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ---------- START ---------- */
#start {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.start-inner {
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: max(7vh,calc(env(safe-area-inset-top,0px) + 32px));
  padding-left: max(16px,env(safe-area-inset-left,0px));
  padding-right: max(16px,env(safe-area-inset-right,0px));
  text-align: center;
  gap: 22px;
}

.tagline {
  text-wrap: balance;
}

.cta {
  font-family: var(--font-display);
  font-size: clamp(14px,1.8vw,16px);
  border: 0;
  cursor: pointer;
}

.cta:hover {
  background: #FAE71B;
  box-shadow: inset 0 -4px 0 #FF4D00, inset 0 3px 0 #FFFFFF, 0 0 0 3px #130000, 0 6px 0 3px rgba(0,0,0,.35);
  filter: brightness(1.06);
}

.cta:active {
  transform: translateY(2px);
}

@keyframes twinkle {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.12);
  }
}

.sel {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background-color: rgba(30,15,34,.85);
  border: 2px solid var(--color-border);
  border-radius: 0;
  padding: 8px 34px 8px 12px;
  cursor: pointer;
  min-height: 44px;
  background-image: linear-gradient(45deg,transparent 50%,var(--color-gold) 50%),linear-gradient(-45deg,transparent 50%,var(--color-gold) 50%);
  background-position: calc(100% - 18px) 55%,calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.sel:hover {
  border-color: var(--color-text-muted);
}

.sel option {
  background: #1E0F22;
  color: var(--color-text);
}

.sel.small {
  font-size: 14px;
  min-height: 34px;
}

/* ---------- GAME (option C, Night card) ---------- */
:root {
  --color-card: rgba(30,15,34,.95);
  --color-card-solid: #1E0F22;
  --color-ring: #4B2E63;
  --color-tile: rgba(19,0,0,.45);
}

#game {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#scene {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
}

.stage {
  position: absolute;
  inset: 0;
  padding: 0;
  z-index: 0;
}

.topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 220px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,rgba(30,15,34,.97) 0%,rgba(30,15,34,.78) 45%,rgba(30,15,34,0) 100%);
}

.brand {
  position: absolute;
  left: calc(32px + 210px - 113px);
  top: 22px;
  width: 226px;
  height: 106px;
  image-rendering: pixelated;
}

.tools {
  position: absolute;
  right: max(32px,env(safe-area-inset-right,0px));
  top: 22px;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.sel.small, .chip {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background-color: rgba(19,0,0,.8);
  box-shadow: 0 0 0 2px #CBA046;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 17px;
}

.sel.small {
  padding: 0 34px 0 16px;
}

.chip {
  padding: 0 14px;
  cursor: pointer;
}

.sel.small:hover, .chip:hover {
  box-shadow: 0 0 0 2px #FAE71B;
}

.panel {
  position: absolute;
  z-index: 2;
  left: max(32px,env(safe-area-inset-left,0px));
  top: 160px;
  bottom: 32px;
  width: 420px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--color-card);
  box-shadow: 0 0 0 3px var(--color-ring),0 0 0 6px rgba(0,0,0,.45),0 18px 40px rgba(0,0,0,.5);
}

.phead {
  padding: 22px 26px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 6px;
}

.progress i {
  height: 10px;
  border-radius: 5px;
  background: var(--color-ring);
}

.progress i.done {
  background: #3E9B2F;
}

.progress i.now {
  background: #FAE71B;
}

.steplabel {
  display: none;
}

.steptitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.5;
  color: #FFFFFF;
}

.hintrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 16px;
  color: #CBCBCB;
}

.count {
  font-family: var(--font-display);
  font-size: 13px;
  color: #130000;
  background: #FAE71B;
  padding: 6px 12px 5px;
  border-radius: 10px;
  box-shadow: inset 0 -3px 0 #D9822B;
}

.count:empty {
  display: none;
}

.count.shake {
  animation: shake .35s steps(4);
}

@keyframes shake {
  25% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-3px);
  }
}

.options {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 26px 14px;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--color-ring) transparent;
}

.options:has(.k-bg) {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.options:has(.k-light) {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.cat-h {
  grid-column: 1/-1;
  position: sticky;
  top: -8px;
  z-index: 2;
  margin: 0;
  padding: 10px 0 4px;
  background: var(--color-card-solid);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  color: #CBA046;
  text-transform: uppercase;
}

.opt {
  position: relative;
  min-height: 88px;
  border: 0;
  border-radius: 12px;
  background: var(--color-tile);
  box-shadow: 0 0 0 2px var(--color-ring);
  padding: 10px 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  margin: 3px;
}

.opt:hover {
  box-shadow: 0 0 0 2px #85828A;
}

.opt[aria-pressed="true"] {
  background: var(--color-ring);
  box-shadow: 0 0 0 3px #FAE71B;
}

.opt[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FAE71B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 5h2v2h2V5h2V3h2v2H7v2H5v2H3V7H1z' fill='%23130000'/%3E%3C/svg%3E") center/10px 10px no-repeat;
  box-shadow: 0 0 0 2px #130000;
}

.opt canvas {
  height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  flex: 0 0 auto;
}

.opt.k-bg {
  padding: 6px 6px 8px;
}

.opt.k-bg canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  image-rendering: auto;
}

.opt.k-tree canvas {
  height: 72px;
}

.opt.k-light canvas {
  height: 28px;
  margin: 10px 0;
}

.opt span {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.15;
  color: #FFFFFF;
  overflow-wrap: anywhere;
}

.opt.wide canvas {
  height: auto;
  width: 100%;
}

.nav {
  display: flex;
  gap: 12px;
  padding: 14px 26px 22px;
}

.btn {
  flex: 1;
  min-height: 54px;
  border: 0;
  border-radius: 27px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 10px 12px;
  line-height: 1.2;
  color: #FFFFFF;
}

.btn.primary {
  flex: 1.4;
  background: #3E9B2F;
  color: #FFFFFF;
  box-shadow: inset 0 4px 0 #88A203,inset 0 -5px 0 #006C06,0 0 0 3px #104400,0 5px 0 3px #0E2500;
}

.btn.primary:hover {
  background: #3E9B2F;
  filter: brightness(1.08);
}

.btn.primary:active {
  transform: translateY(2px);
  box-shadow: inset 0 4px 0 #88A203,inset 0 -5px 0 #006C06,0 0 0 3px #104400,0 3px 0 3px #0E2500;
}

.btn.ghost {
  background: transparent;
  color: #FFFFFF;
  box-shadow: inset 0 0 0 3px var(--color-ring);
}

.btn.ghost:hover {
  box-shadow: inset 0 0 0 3px #85828A;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn.red {
  background: #FC1B14;
  color: #FFFFFF;
  box-shadow: inset 0 4px 0 #FF96B7,inset 0 -5px 0 #A00D12,0 0 0 3px #540800,0 5px 0 3px #3A0500;
}

.btn.red:hover {
  filter: brightness(1.08);
}

/* result: title and text straight on the card background */
.result {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 34px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .1em;
  color: #CBCBCB;
  text-transform: uppercase;
}

.stylename {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.35;
  color: #FAE71B;
  text-shadow: 0 3px 0 #130000;
  text-wrap: balance;
}

.touch {
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1.6;
  color: #F8DFB7;
}

.ptext {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  min-height: 5.8em;
}

.ptext .cursor {
  display: inline-block;
  width: .5em;
  height: 1em;
  background: #FAE71B;
  vertical-align: -2px;
  animation: twinkle 1s steps(2) infinite;
}

.actions {
  margin-top: auto;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions .btn:first-child {
  grid-column: 1/-1;
}

.actions .btn.ghost {
  font-size: 10px;
  min-height: 50px;
  border-radius: 25px;
}

.waiting {
  font-family: var(--font-body);
  font-size: 19px;
  color: #CBCBCB;
  line-height: 1.5;
}

/* short desktop screens */
@media (min-width: 761px) and (max-height: 760px) {
  .topbar {
    height: 170px;
  }

  .brand {
    top: 14px;
    width: 170px;
    height: 80px;
    left: calc(32px + 210px - 85px);
  }

  .tools {
    top: 14px;
  }

  .panel {
    top: 112px;
    bottom: 20px;
  }

  .phead {
    padding: 18px 22px 8px;
    gap: 10px;
  }

  .options {
    padding: 6px 22px 10px;
  }

  .opt {
    min-height: 76px;
  }

  .nav {
    padding: 10px 22px 16px;
  }

  .btn {
    min-height: 48px;
  }
}

/* narrow desktop: smaller card */
@media (min-width: 761px) and (max-width: 1180px) {
  .panel {
    width: 360px;
  }

  .brand {
    left: calc(32px + 180px - 113px);
  }

  .options {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

@media (min-width: 761px) and (max-width: 1180px) and (max-height: 760px) {
  .brand {
    left: calc(32px + 180px - 85px);
  }
}

/* portrait phone: scene on top, the card becomes a rounded sheet at the bottom */
@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  .topbar {
    height: 170px;
  }

  .brand {
    left: max(14px,env(safe-area-inset-left,0px));
    top: calc(12px + env(safe-area-inset-top,0px));
    width: auto;
  }

  .tools {
    right: max(14px,env(safe-area-inset-right,0px));
    top: calc(12px + env(safe-area-inset-top,0px));
    gap: 8px;
  }

  .brand {
    height: 52px;
  }

  .sel.small, .chip {
    font-size: 14px;
    min-height: 40px;
  }

  .sel.small {
    padding: 0 28px 0 12px;
  }

  .chip {
    padding: 0 10px;
  }

  .panel {
    left: 10px;
    right: 10px;
    width: auto;
    top: 452px;
    bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 0 0 3px var(--color-ring),0 -10px 30px rgba(0,0,0,.5);
  }

  .phead {
    padding: 16px 18px 8px;
    gap: 10px;
  }

  .steptitle {
    font-size: 13px;
  }

  .hintrow {
    font-size: 15px;
  }

  .options {
    padding: 6px 18px 12px;
    gap: 8px;
    grid-template-columns: repeat(4,minmax(0,1fr));
  }

  .options:has(.k-bg) {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .opt {
    min-height: 80px;
  }

  .opt span {
    font-size: 12px;
  }

  .nav {
    padding: 12px 18px calc(16px + env(safe-area-inset-bottom,0px));
    background: var(--color-card-solid);
    box-shadow: inset 0 3px 0 var(--color-ring);
  }

  .btn {
    min-height: 50px;
    font-size: 11px;
  }

  .btn.primary {
    flex: 1.5;
  }

  .result {
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom,0px));
  }

  .stylename {
    font-size: 18px;
  }

  .ptext {
    font-size: 16px;
    min-height: 0;
  }
}

@media (orientation: portrait) and (max-width: 420px) {
  .options {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}

/* landscape phone: compact card on the left, no logo */
@media (orientation: landscape) and (max-height: 500px) {
  .topbar {
    height: 90px;
  }

  .brand {
    display: none;
  }

  .tools {
    top: calc(8px + env(safe-area-inset-top,0px));
    right: max(10px,env(safe-area-inset-right,0px));
    gap: 6px;
  }

  .sel.small, .chip {
    min-height: 34px;
    font-size: 14px;
    border-radius: 10px;
  }

  .panel {
    left: max(10px,env(safe-area-inset-left,0px));
    top: 10px;
    bottom: 10px;
    width: min(44vw,340px);
    border-radius: 16px;
  }

  .phead {
    padding: 10px 14px 4px;
    gap: 6px;
  }

  .progress i {
    height: 7px;
  }

  .steptitle {
    font-size: 10px;
    line-height: 1.3;
  }

  .hintrow {
    font-size: 13px;
  }

  .count {
    font-size: 10px;
    padding: 4px 8px 3px;
  }

  .options {
    padding: 4px 14px 8px;
    gap: 6px;
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .cat-h {
    top: -4px;
    padding: 6px 0 2px;
    font-size: 11px;
  }

  .opt {
    min-height: 0;
    padding: 5px 3px 5px;
    gap: 3px;
    border-radius: 10px;
  }

  .opt canvas {
    height: 30px;
  }

  .opt.k-tree canvas {
    height: 44px;
  }

  .opt.k-top canvas {
    height: 34px;
  }

  .opt.k-light canvas {
    height: 20px;
    margin: 4px 0;
  }

  .opt.k-extra canvas {
    height: 28px;
  }

  .opt span {
    font-size: 11px;
  }

  .nav {
    padding: 6px 14px calc(8px + env(safe-area-inset-bottom,0px));
    gap: 8px;
  }

  .btn {
    min-height: 36px;
    font-size: 9px;
    padding: 6px 8px;
    border-radius: 18px;
  }

  .result {
    padding: 14px;
    gap: 8px;
  }

  .stylename {
    font-size: 15px;
  }

  .touch {
    font-size: 9px;
  }

  .ptext {
    font-size: 14px;
    min-height: 0;
    margin: 4px 0 0;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn.ghost {
    min-height: 34px;
    font-size: 8px;
  }
}

/* hide the card and show only the scene */
.panel {
  transition: transform .28s ease,visibility .28s,top .28s ease;
}

.card-toggle, .card-expand {
  transition: top .28s ease;
}

/* expand button: portrait phones only */
.card-expand {
  display: none;
  position: absolute;
  z-index: 3;
  padding: 0;
  border: 0;
  cursor: pointer;
  color: #FFFFFF;
  background: #1E0F22;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--color-ring);
}

.card-expand svg {
  transform: rotate(90deg);
  transition: transform .2s;
}

.card-expand:hover {
  box-shadow: 0 0 0 2px #FAE71B;
}

#game.card-off .panel {
  transform: translateX(calc(-100% - 60px));
  visibility: hidden;
}

.card-toggle {
  position: absolute;
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #FFFFFF;
  background: #1E0F22;
  box-shadow: 0 0 0 3px var(--color-ring),0 4px 12px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}

.card-toggle:hover {
  box-shadow: 0 0 0 3px #FAE71B,0 4px 12px rgba(0,0,0,.45);
}

.card-toggle span {
  display: none;
}

.card-toggle svg {
  transition: transform .2s;
}

#game.card-off .card-toggle {
  left: max(16px,env(safe-area-inset-left,0px));
  top: 160px;
  width: auto;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 22px;
  box-shadow: 0 0 0 3px #CBA046,0 4px 12px rgba(0,0,0,.45);
}

#game.card-off .card-toggle svg {
  transform: rotate(180deg);
}

#game.card-off .card-toggle span {
  display: inline;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(320px,calc(100vw - 96px));
}

@media (min-width: 761px) and (max-height: 760px) {
  #game.card-off .card-toggle {
    top: 112px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #game.card-off .card-toggle {
    top: 10px;
  }
}

@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  #game.card-off .panel {
    transform: translateY(calc(100% + 24px));
  }

  .card-toggle, .card-expand {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--color-ring);
  }

  .card-toggle svg {
    transform: rotate(-90deg);
  }

  .progress {
    margin-right: 88px;
  }

  .eyebrow {
    padding-right: 88px;
  }

  #game.card-off .card-toggle {
    left: 50%;
    top: auto;
    bottom: calc(18px + env(safe-area-inset-bottom,0px));
    transform: translateX(-50%);
    height: 48px;
    border-radius: 24px;
  }

  #game.card-off .card-toggle svg {
    transform: rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .card-toggle svg {
    transition: none;
  }
}

/* result: blocks don't shrink (the text never goes under the buttons); the card scrolls and the buttons stick to the bottom */
.result>* {
  flex-shrink: 0;
}

.actions {
  position: sticky;
  bottom: -24px;
  margin-bottom: -24px;
  padding: 14px 0 24px;
  background: linear-gradient(180deg,rgba(30,15,34,0) 0,#1E0F22 14px);
}

@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  .result {
    padding-bottom: 0;
  }

  .actions {
    bottom: 0;
    margin-bottom: 0;
    padding: 28px 0 calc(16px + env(safe-area-inset-bottom,0px));
    background: linear-gradient(180deg,rgba(30,15,34,0) 0,#1E0F22 22px);
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .result {
    padding-bottom: 0;
  }

  .actions {
    bottom: 0;
    margin-bottom: 0;
    padding: 8px 0 10px;
  }
}

/* phone: the handle and the top of the card can be dragged */
@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  .card-toggle, .card-expand, .phead, .eyebrow, .stylename, .touch {
    touch-action: none;
  }

  #game.card-big .card-expand svg {
    transform: rotate(-90deg);
  }
}

@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  .card-expand {
    display: flex;
  }

  #game.card-off .card-expand {
    display: none;
  }
}

/* phone: the hide button becomes a dash (minimize), so it isn't confused with the expand button */
@media (orientation: portrait) and (max-width: 1000px), (max-width: 760px) and (min-height: 501px) {
  #game:not(.card-off) .card-toggle svg {
    display: none;
  }

  #game:not(.card-off) .card-toggle::after {
    content: "";
    display: block;
    width: 12px;
    height: 3px;
    margin-top: 6px;
    background: #FFFFFF;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom,0px));
  transform: translateX(-50%);
  background: #130000;
  border: 2px solid var(--color-gold);
  color: var(--color-text);
  padding: 10px 14px;
  font-size: 15px;
  z-index: 50;
  max-width: min(90vw,420px);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(19,0,0,.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 16px;
}

.modal-in {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-height: 100%;
}

.modal img {
  max-width: min(86vw,420px);
  max-height: 72vh;
  height: auto;
  box-shadow: 0 0 0 3px var(--color-gold);
}

.modal p {
  font-size: 15px;
  color: var(--color-text);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .cta, .ptext .cursor {
    animation: none;
  }
}

/* start screen with the final art: background, logo and button drawn on the canvas */
#startbg {
  position: absolute;
  left: 0;
  top: 0;
}

.start-inner {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}

.start-inner .logo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  filter: none;
}

.cta {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 48px;
  background: transparent!important;
  color: transparent;
  box-shadow: none!important;
  animation: none;
  padding: 0;
  filter: none!important;
  border-radius: 24px;
}

.cta:hover, .cta:active {
  transform: none;
  background: transparent!important;
}

.cta:focus-visible {
  outline: 3px solid #FAE71B;
  outline-offset: 3px;
}

.tagline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  top: 40%;
  margin: 0;
  width: max-content;
  max-width: min(92vw,60ch);
  font-size: clamp(13px,1.5vw,17px);
  line-height: 1.3;
  background: rgba(19,0,0,.62);
  padding: 8px 14px;
  box-shadow: 0 0 0 2px #4B2E63;
  color: #fff;
  text-shadow: 0 2px 0 #130000,2px 0 0 #130000,-2px 0 0 #130000,0 -2px 0 #130000;
}

#langStart {
  position: absolute;
  right: max(14px,env(safe-area-inset-right,0px));
  top: calc(14px + env(safe-area-inset-top,0px));
  bottom: auto;
  border-color: #CBA046;
  border-radius: 12px;
  background-color: rgba(19,0,0,.78);
  box-shadow: 0 3px 0 #130000;
}

#langStart:hover {
  border-color: #FAE71B;
}

@media (orientation: landscape) and (max-height: 500px) {
  .tagline {
    font-size: 12px;
    padding: 4px 10px;
  }
}

.opt.k-orn canvas {
  height: 44px;
}

.opt.k-top canvas {
  height: 52px;
}

.opt.k-extra canvas {
  height: 44px;
}
