:root {
  color-scheme: dark;
  font-family: system-ui,-apple-system,"Segoe UI",sans-serif;
  background: #171715;
  color: #f5f2e9;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  max-width: 900px;
  margin: auto;
  padding: 28px 28px 18px;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 36px;
}

header a {
  color: #ff994b;
  font-weight: 850;
  font-size: 26px;
  text-decoration: none;
  letter-spacing: -1px;
}

header a span {
  display: block;
  color: #a6a59c;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 500;
  margin-top: 3px;
}

section {
  width: 100%;
  margin: auto 0;
  padding: 24px 0 42px;
}

h1 {
  font-size: clamp(36px,7vw,68px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 12px 0 24px;
}

h1:focus {
  outline: none;
}

p {
  color: #bbb9b0;
  line-height: 1.6;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ff994b;
  font-size: 12px;
  font-weight: 700;
}

.intro {
  max-width: 460px;
  font-size: 18px;
}

.modes,.sets {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
  margin: 30px 0;
}

button,.upload {
  font: inherit;
  border: 1px solid #49483f;
  border-radius: 16px;
  background: #23231f;
  color: inherit;
  padding: 15px 20px;
  cursor: pointer;
  min-height: 50px;
}

button:hover:not(:disabled),.upload:hover {
  border-color: #ff994b;
  background: #2c2a23;
}

button:focus-visible,a:focus-visible,.upload:focus-within {
  outline: 3px solid #ff994b;
  outline-offset: 4px;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 26px;
  min-height: 170px;
}

.tile strong {
  font-size: 28px;
}

.tile span {
  line-height: 1.5;
}

.tile small,.hint {
  color: #96958b;
  font-size: 13px;
}

.primary {
  background: #ff994b;
  color: #21170f;
  border-color: #ff994b;
  font-weight: 700;
}

.primary:hover:not(:disabled) {
  background: #ffb178;
  color: #21170f;
}

.muted,button:disabled {
  opacity: .45;
  cursor: default;
}

.quiet {
  background: transparent;
  border-color: transparent;
  font-size: 14px;
  padding: 12px;
}

.reset {
  margin-top: 4px;
}

.upload {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}

.error {
  color: #ffac98;
}

.counter {
  font-size: 13px;
  margin: 0 0 24px;
}

.back {
  width: 100%;
  margin-top: 16px;
  min-height: 60px;
}

footer {
  color: #77786e;
  font-size: 12px;
  border-top: 1px solid #32332b;
  padding-top: 18px;
}

button span,button small {
  overflow-wrap: anywhere;
}

@media(max-width: 550px) {
  main {
    padding: 20px 16px;
  }
  .modes,.sets {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tile {
    min-height: 125px;
    padding: 22px;
  }
  header {
    padding-bottom: 20px;
  }
  .tasks li {
    padding: 15px 12px;
    gap: 12px;
  }
  section {
    padding-top: 12px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .tasks p {
    font-size: 19px;
  }
}

/* A single-sided playing card: theme above five ruled rows. */
.card-screen {
  max-width: 560px;
  margin: auto;
  padding-top: 8px;
}

.card-screen .counter {
  text-align: center;
  margin-bottom: 20px;
}

.playing-card {
  position: relative;
  padding: 13px;
  border: 1px solid #ba743e;
  border-radius: 22px;
  background: #302a22;
  box-shadow: 0 20px 48px #0005,0 5px 0 #111,0 6px 0 #6c4a30;
  isolation: isolate;
}

.card-inner {
  overflow: hidden;
  border: 1px solid #ad794c;
  border-radius: 12px;
  background: #23231f;
}

.card-heading {
  text-align: center;
  padding: 24px 20px 22px;
  background: linear-gradient(140deg,#453021,#30271e);
  border-bottom: 1px solid #ad794c;
}

.card-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c5a183;
  margin: 0 0 9px;
}

.card-screen h1 {
  font-size: clamp(23px,4vw,32px);
  line-height: 1.2;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0;
  color: #ffad6e;
  overflow-wrap: anywhere;
}

.tasks {
  list-style: none;
  padding: 0 20px;
  margin: 0;
}

.tasks li {
  display: grid;
  grid-template-columns: 28px 92px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 18px 0;
  border-bottom: 1px dashed #6c6250;
}

.tasks li:last-child {
  border-bottom: 0;
}

.dice-icon {
  display: block;
  width: 27px;
  height: 27px;
  color: #ff994b;
  flex-shrink: 0;
}

.tasks h2 {
  color: #c3b9a7;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.tasks p {
  color: #f5f2e9;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 650;
  text-align: center;
  margin: 0;
  overflow-wrap: anywhere;
}

.card-imprint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-top: 1px solid #61503a;
  color: #a4947b;
  font-size: 10px;
  letter-spacing: .5px;
}

.card-imprint span:first-child {
  color: #ff994b;
  font-weight: 750;
  font-size: 13px;
}

.card-imprint span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.card-screen .back {
  margin-top: 30px;
}

.playing-card-special .tasks {
  padding: 26px;
}

.playing-card-special .tasks li {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 22px;
  min-height: 310px;
  padding: 12px 0 30px;
}

.playing-card-special .dice-icon {
  width: 36px;
  height: 36px;
}

.playing-card-special .tasks h2 {
  text-align: center;
  font-size: 16px;
  max-width: 340px;
  color: #d0b596;
}

.playing-card-special .tasks p {
  font-size: 25px;
}

@media(max-width: 550px) {
  .playing-card {
    padding: 9px;
    border-radius: 18px;
  }
  .card-heading {
    padding: 23px 12px;
  }
  .tasks {
    padding: 0 13px;
  }
  .tasks li {
    grid-template-columns: 24px 68px minmax(0,1fr);
    gap: 9px;
    padding: 17px 0;
    min-height: 83px;
  }
  .dice-icon {
    width: 24px;
    height: 24px;
  }
  .tasks h2 {
    font-size: 11px;
  }
  .tasks p {
    font-size: 17px;
  }
  .card-imprint {
    padding: 14px 13px;
  }
  .playing-card-special .tasks {
    padding: 20px;
  }
  .playing-card-special .tasks p {
    font-size: 22px;
  }
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 30px;
}

.card-actions button {
  min-width: 0;
  min-height: 60px;
  padding: 14px 10px;
}

@media(max-width: 380px) {
  .card-actions {
    gap: 8px;
  }
  .card-actions button {
    font-size: 13px;
  }
}

footer {
  text-align: center;
}

footer a {
  color: inherit;
  text-underline-offset: 3px;
}

footer a:hover {
  color: #ff994b;
}

.home-screen .tile {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-imprint {
  justify-content: flex-end;
}

.card-imprint span:first-child {
  color: #a4947b;
  font-size: 10px;
  font-weight: 400;
}

.special-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 26px;
  min-height: 350px;
}

.action-description {
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.55;
  color: #d0b596;
  max-width: 380px;
  overflow-wrap: anywhere;
}

.special-words {
  list-style: none;
  padding: 0;
  margin: 0 auto 18px;
  width: 100%;
  display: grid;
  gap: 14px;
  text-align: center;
}

.special-words li {
  font-size: 23px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media(max-width: 550px) {
  .special-content {
    padding: 22px 18px;
  }
  .special-words li {
    font-size: 20px;
  }
}


.home-screen .modes {
  grid-template-columns: 1fr;
}
