:root {
  color-scheme: light;
  --green: #193e35;
  --red: #a83930;
  --paper: #f8f4eb;
  --line: #c7c7b5;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--green);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 5% 90%, #e9ebdc80, transparent 58%);
}
header,
footer,
.cover,
#root {
  width: min(1080px, calc(100% - 64px));
  margin-inline: auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font:
    600 23px Georgia,
    serif;
  letter-spacing: -0.7px;
  color: inherit;
  text-decoration: none;
}
.star {
  color: var(--red);
  font-size: 38px;
  line-height: 1;
}
.edition,
.eyebrow,
.posthead,
footer,
.door small,
.saveStatus {
  font:
    600 12px/1.5 ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 1.6px;
}
.cover {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(30px, 7vw, 100px);
  flex: 1;
  padding-block: 72px;
}
.postcard {
  background: #e8e4d3;
  border: 1px solid #c9c5b3;
  padding: 18px 22px 15px;
  transform: rotate(-2deg);
  box-shadow: 2px 6px 10px #24362814;
}
.posthead,
.postfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.posthead {
  font-size: 11px;
  letter-spacing: 2px;
  border-bottom: 1px solid #abae97;
  padding-bottom: 10px;
}
.posthead span:nth-child(2) {
  color: var(--red);
}
.stamp {
  padding: 10px;
  background: #fcf5df;
  margin: 16px 2px 12px;
  mask:
    linear-gradient(#000 0 0) center/calc(100% - 10px) calc(100% - 10px)
      no-repeat,
    radial-gradient(
        circle at 5px 5px,
        transparent 3px,
        #000 3.5px
      ) -5px -5px/10px
      10px;
}
.stamp img {
  display: block;
  width: 100%;
  aspect-ratio: 1.3;
  object-fit: cover;
}
.postfoot {
  gap: 16px;
  font:
    italic 20px Georgia,
    serif;
}
.postfoot i {
  flex: 1;
  height: 1px;
  background: #a5ac96;
}
.red,
em {
  color: var(--red);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
}
.eyebrow .red {
  margin-right: 5px;
}
.invite h1,
.calendarHead h1 {
  font:
    normal clamp(48px, 5.1vw, 80px)/1.04 Georgia,
    serif;
  letter-spacing: -3.7px;
  margin: 18px 0;
}
.invite h1 em,
.calendarHead em {
  font-size: 0.46em;
  vertical-align: middle;
  font-style: normal;
}
.invite p,
.detail p,
.calendarHead p {
  color: #4b5c51;
  line-height: 1.55;
}
.invite p {
  max-width: 320px;
  font-size: 17px;
}
.invite form {
  margin-top: 32px;
  max-width: 365px;
}
.invite label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 9px;
}
.invite input,
.primary {
  width: 100%;
  border-radius: 5px;
  font: inherit;
  height: 49px;
}
.invite input {
  padding: 0 15px;
  border: 1px solid #aeb8a9;
  background: #fffdf6;
  color: var(--green);
}
.primary {
  background: var(--green);
  border: 0;
  color: #fffbec;
  margin-top: 12px;
  font-weight: 600;
  cursor: pointer;
}
.primary span {
  margin-left: 7px;
  color: #ddc794;
}
.invite p.error {
  color: var(--red);
  font-size: 14px;
}
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  padding: 17px 0 24px;
  font-size: 10px;
}
footer span {
  color: var(--red);
  font-size: 16px;
}
#root {
  padding-block: 30px 48px;
}
.calendarHead {
  display: flex;
  gap: 35px;
  align-items: center;
  padding: 20px;
  background: #e6e8d9;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.calendarHead img {
  width: 33%;
  aspect-ratio: 1.6;
  object-fit: cover;
}
.doors {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.door {
  position: relative;
  text-align: center;
  padding: 18px 6px;
  display: grid;
  gap: 4px;
  background: #eeeddf;
  border: 1px dashed #a4af9d;
  border-radius: 4px;
  color: #546557;
  text-decoration: none;
}
.door strong {
  font:
    38px Georgia,
    serif;
}
.doorMark {
  font-size: 20px;
  color: #798a71;
}
.door small {
  font-size: 10px;
  letter-spacing: 1px;
}
.today {
  background: var(--green);
  color: #fff7e2;
}
.today .doorMark {
  color: #e7cc8e;
}
.detail {
  max-width: 660px;
  margin: auto;
}
.detail h1,
.detail h2,
.detail h3 {
  font-family: Georgia, serif;
  font-weight: normal;
}
.detail h1 {
  font-size: clamp(36px, 7vw, 60px);
  letter-spacing: -2px;
  margin: 15px 0;
}
.detail h2 {
  font-size: 31px;
}
.detail h3 {
  font-size: 25px;
  margin-bottom: 10px;
}
.puzzleGrid {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 1px;
  margin-block: 26px;
}
.cell {
  aspect-ratio: 0.86;
  position: relative;
  border: 1px solid #949e8c;
  background: #fffcf4;
}
.cell.active {
  background: #e4eadb;
}
.cell small,
.cell b {
  position: absolute;
  top: 0;
  font: 9px/1 monospace;
  pointer-events: none;
}
.cell small {
  left: 1px;
}
.cell b {
  right: 1px;
  color: var(--red);
}
.cell input,
.word input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font:
    20px Georgia,
    serif;
  color: inherit;
  padding: 5px 0 0;
}
.clue {
  font: inherit;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 4px;
  display: flex;
  gap: 9px;
  width: 100%;
  line-height: 1.5;
  cursor: pointer;
}
.chosen {
  color: #8e352b;
}
.hidden {
  border-top: 1px solid var(--line);
  margin-top: 27px;
}
.words,
.word {
  display: flex;
  align-items: flex-start;
}
.words {
  gap: 10px;
  flex-wrap: wrap;
}
.word label,
.given {
  width: clamp(17px, 5vw, 32px);
  text-align: center;
}
.word input,
.given {
  height: 34px;
  border-bottom: 1px solid #a4ac99;
  font-size: 20px;
}
.given {
  font-family: Georgia, serif;
  padding-top: 7px;
}
.word small {
  color: var(--red);
  font-family: monospace;
}
.words em {
  align-self: center;
}
.back {
  display: inline-block;
  color: var(--green);
  padding: 15px 0;
}
.detail img,
.detail video,
.detail iframe {
  display: block;
  width: 100%;
  border: 0;
}
.detail iframe {
  height: 65svh;
}
.letter {
  white-space: pre-wrap;
}
.saveStatus {
  letter-spacing: 0.4px;
}
@media (max-width: 700px) {
  header,
  footer,
  .cover,
  #root {
    width: calc(100% - 36px);
  }
  header {
    padding: 14px 0;
  }
  .brand {
    font-size: 20px;
    gap: 7px;
  }
  .star {
    font-size: 30px;
  }
  .edition {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    padding: 28px 4px;
  }
  .postcard {
    width: min(95%, 390px);
    padding: 10px 16px;
  }
  .posthead {
    font-size: 9px;
    padding-bottom: 5px;
  }
  .stamp {
    margin: 9px 0 7px;
    padding: 7px;
  }
  .stamp img {
    aspect-ratio: 2.05;
    object-position: 50% 58%;
  }
  .postfoot {
    font-size: 16px;
  }
  .invite {
    width: min(100%, 390px);
  }
  .invite h1,
  .calendarHead h1 {
    font-size: 46px;
    letter-spacing: -2.3px;
    margin: 10px 0;
  }
  .invite p {
    font-size: 16px;
    max-width: 100%;
    margin: 8px 0;
  }
  .invite form {
    margin-top: 19px;
    max-width: none;
  }
  .eyebrow {
    font-size: 10px;
  }
  .calendarHead {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px;
  }
  .calendarHead img {
    width: 100%;
    aspect-ratio: 2.6;
  }
  .calendarHead p {
    margin-bottom: 5px;
  }
  .doors {
    grid-template-columns: repeat(3, 1fr);
  }
  .door {
    padding: 14px 4px;
  }
  #root {
    padding-top: 22px;
  }
  .puzzleGrid {
    margin-inline: -6px;
  }
  .cell input {
    font-size: 16px;
    padding-top: 6px;
  }
  .detail p {
    font-size: 16px;
  }
}
