* {
  box-sizing: border-box;
}
:root {
  --pine: #19493d;
  --red: #a63e34;
  --ink: #243b33;
  --ivory: #faf5e7;
  --line: #d9d1bb;
  --gold: #edc282;
  --serif:
    Georgia, "Iowan Old Style", "AppleMyungjo", "Batang", "Noto Serif KR", serif;
}
body {
  margin: 0;
  background: #efe9d8;
  color: var(--ink);
  font:
    15px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  word-break: keep-all;
}
button,
a,
input,
textarea {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ef944b;
  outline-offset: 3px;
}
i[data-i] {
  display: inline-block;
  background: currentColor;
  width: 20px;
  height: 20px;
  flex: none;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
}
header {
  height: 68px;
  background: #fbf8ec;
  display: flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 66px);
  gap: 17px;
  border-bottom: 1px solid #c8c3ac;
  position: relative;
  z-index: 2;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--pine);
  font: 800 23px var(--serif);
  letter-spacing: -1.4px;
}
.wordmark .mark {
  width: 32px;
  height: 32px;
}
.header-en,
.eyebrow,
.postmark span,
.kicker {
  font:
    700 11px/1.3 ui-monospace,
    "Courier New",
    monospace;
  letter-spacing: 2px;
}
.header-en {
  border-left: 1px solid #c4c4ac;
  padding-left: 18px;
  font-size: 10px;
  color: #53685b;
}
.actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.circle {
  border: 1px solid #d1d3be;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
}
.circle:hover,
nav button:hover,
.row:hover {
  background: #ebe9d7;
}
#wallet {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}
#wallet i {
  color: var(--red);
}
[hidden] {
  display: none !important;
}
main {
  position: relative;
  height: calc(100dvh - 68px);
  min-height: 295px;
  overflow: hidden;
  background: #e2dfd2;
}
#world,
#cover,
#play,
.cover-image,
.cover-ink {
  position: absolute;
  inset: 0;
}
.cover-image {
  background: url(/postcard.webp) center 57% / cover;
}
.cover-ink {
  background:
    linear-gradient(
      85deg,
      rgba(10, 39, 37, 0.94) 0%,
      rgba(12, 41, 41, 0.88) 19%,
      rgba(15, 42, 40, 0.56) 36%,
      transparent 67%
    ),
    linear-gradient(0deg, #18352c48, transparent 20%);
}
#cover {
  color: var(--ivory);
  isolation: isolate;
}
.cover-text {
  position: absolute;
  left: clamp(30px, 8vw, 145px);
  top: 47%;
  transform: translateY(-50%);
  text-shadow: 0 1px 6px #18322432;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #f8d79e;
  font-size: 11px;
  letter-spacing: 2.8px;
}
.eyebrow i {
  width: 25px;
  height: 25px;
}
.cover-text h1 {
  font: 800 clamp(54px, 6.8vw, 112px)/1.18 var(--serif);
  letter-spacing: -0.09em;
  margin: 25px 0 0;
}
.script {
  font: italic 400 clamp(30px, 3.7vw, 60px)/1.15 var(--serif);
  color: #f5d19f;
  letter-spacing: -0.045em;
}
.cover-text p {
  margin: 27px 0 30px;
  line-height: 1.85;
  font-size: clamp(15px, 1.2vw, 19px);
}
.cta,
.primary {
  background: var(--red);
  color: #fffaf0;
  border: 1px solid #c66451;
  border-radius: 6px;
  font-weight: 700;
}
.cta {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 30px;
  box-shadow: 0 3px 0 #79382f;
}
.cta:hover,
.primary:hover {
  background: #8e332a;
}
.cover-text > small {
  display: block;
  margin-top: 13px;
  font-size: 12px;
  color: #f1e8cf;
}
.postmark {
  position: absolute;
  right: 5%;
  top: 6%;
  height: 95px;
  width: 95px;
  border: 3px double #ffefce;
  color: #fff1ce;
  border-radius: 50%;
  transform: rotate(14deg);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  background: #29372b2b;
}
.postmark span {
  font-size: 8px;
  letter-spacing: 1.5px;
}
.postmark i {
  width: 30px;
  height: 30px;
}
.cover-foot {
  position: absolute;
  right: 4%;
  bottom: 4%;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: white;
  text-shadow: 0 1px 4px black;
}
.cover-foot i {
  width: 15px;
}
#world canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#play {
  pointer-events: none;
}
#play button,
#play nav {
  pointer-events: auto;
}
.location,
.quest,
nav,
#plantTip,
#hint {
  background: #fff9eaf3;
  color: var(--pine);
  box-shadow: 0 3px 14px #183a3320;
}
.location {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.location i {
  width: 15px;
  height: 15px;
}
.divide {
  height: 12px;
  border-left: 1px solid #bcbba8;
  margin: 0 2px;
}
.quest {
  position: absolute;
  right: 20px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  text-align: left;
  border-radius: 5px;
  border-left: 4px solid var(--red);
}
.quest > i:first-child {
  color: var(--red);
  width: 22px;
  height: 22px;
}
.quest span {
  display: grid;
}
.quest small,
.muted {
  color: #647367;
  font-size: 12px;
}
.quest b {
  font-size: 13px;
}
nav {
  position: absolute;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 12px;
  padding: 6px;
  border: 1px solid #b5b9a5;
}
nav button {
  display: flex;
  align-items: center;
  white-space: nowrap;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}
nav i {
  width: 19px;
  height: 19px;
}
#hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 92px;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
}
#plantTip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 95px;
  border-radius: 8px;
  padding: 14px 20px;
  text-align: center;
  min-width: 240px;
}
#plantTip button {
  font-size: 13px;
  text-decoration: underline;
  color: var(--red);
  padding: 4px 8px;
}
dialog {
  color: var(--ink);
  background: var(--ivory);
  padding: 0;
  border: 1px solid #c0bba5;
  border-radius: 12px;
  box-shadow: 0 20px 80px #061d2355;
  width: min(460px, calc(100vw - 28px));
  max-height: 86dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #142c2d75;
  backdrop-filter: blur(3px);
}
.paperline {
  height: 6px;
  background: repeating-linear-gradient(
    125deg,
    #ad4e43 0 13px,
    #f1e8d5 13px 24px,
    #547368 24px 37px,
    #f1e8d5 37px 48px
  );
}
.close {
  position: absolute;
  right: 14px;
  top: 17px;
  z-index: 1;
  width: 32px;
  height: 32px;
  background: var(--ivory);
}
#panel {
  padding: 28px;
}
.kicker {
  color: #8b473e;
  font-size: 10px;
  letter-spacing: 1.7px;
  margin: 0 35px 7px 0;
}
h2 {
  font: 800 29px/1.3 var(--serif);
  letter-spacing: -1.6px;
  margin: 0 25px 15px 0;
}
h3 {
  font-size: 15px;
  margin: 20px 0 8px;
}
p {
  margin: 9px 0 15px;
}
.explain {
  color: #556357;
  font-size: 14px;
}
.row,
.product {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.row > span,
.product > span {
  flex: 1;
}
.row small,
.product small {
  display: block;
  color: #616e61;
  font-size: 12px;
}
.row > i,
.price {
  color: var(--pine);
}
.product b {
  font-size: 15px;
}
.price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
}
.price i {
  width: 14px;
  height: 14px;
}
.item-art {
  width: 54px;
  height: 58px;
  flex: none;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.item-art i {
  width: 36px;
  height: 36px;
  z-index: 1;
}
.item-art.tree:before {
  content: "";
  position: absolute;
  inset: 3px 1px;
  border-radius: 48% 50% 46% 38%;
  background: var(--tint);
  transform: rotate(-13deg);
}
.item-art.tree i {
  color: var(--tone);
}
.item-art.tree:after {
  content: "✦";
  position: absolute;
  color: #a9662d;
  font: 13px Georgia;
  top: 0;
  right: 3px;
}
.tagline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #48695a;
  font-size: 12px;
}
.tagline i {
  width: 16px;
}
.primary,
.secondary {
  padding: 11px 16px;
  border-radius: 6px;
  font-weight: 700;
}
.primary {
  width: 100%;
  margin-top: 13px;
}
.secondary {
  border: 1px solid #b5bdab;
  background: #f8f6eb;
}
.secondary:hover {
  background: #e7eadc;
}
.buttons {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.buttons button {
  flex: 1;
}
.buttons .primary {
  margin: 0;
}
.field {
  display: block;
  font-weight: 650;
  margin: 15px 0 6px;
  font-size: 14px;
}
input,
textarea {
  background: #fffdf4;
  color: var(--ink);
  border: 1px solid #bdc7b3;
  border-radius: 6px;
  width: 100%;
  padding: 10px 12px;
}
textarea {
  resize: vertical;
  min-height: 105px;
}
.letters {
  margin-top: 12px;
}
.letter {
  padding: 13px 15px;
  background: #f3e9cd;
  border: 1px solid #ddd0b1;
  margin: 8px 0;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.letter.berry {
  background: #f5dfd7;
}
.letter.night {
  background: #dce4eb;
}
.letter p {
  white-space: pre-wrap;
  margin: 0 0 5px;
}
.letter footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #546256;
}
.letter footer button {
  font-size: 12px;
  text-decoration: underline;
}
.tabs {
  display: flex;
  gap: 5px;
  margin: 10px 0;
}
.tabs button {
  flex: 1;
  border: 1px solid #b9c2ad;
  background: #fffaf0;
  border-radius: 7px;
  padding: 8px 4px;
  font-size: 13px;
}
.tabs button[aria-pressed="true"] {
  background: var(--pine);
  color: white;
}
.section-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  object-position: 50% 48%;
  border-radius: 5px;
  margin: 0 0 8px;
}
.plotgrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.plotgrid button {
  aspect-ratio: 1;
  border-radius: 5px;
  background: #e5ebdd;
  color: #527459;
  display: grid;
  place-items: center;
}
.plotgrid button:disabled {
  color: #26674c;
  background: #ced9c6;
  opacity: 1;
}
.plotgrid button:focus,
.plotgrid button:hover {
  background: #c3d3b9;
}
.tree-title {
  overflow-wrap: anywhere;
}
.link {
  color: var(--pine);
  font-size: 13px;
  font-weight: 650;
  text-underline-offset: 3px;
}
.links {
  display: flex;
  gap: 16px;
  margin-top: 18px;
}
.help-row {
  padding: 9px 0;
  font-size: 14px;
}
.help-row b {
  display: block;
}
#toast {
  position: fixed;
  z-index: 8;
  bottom: max(18%, 96px);
  left: 50%;
  transform: translateX(-50%);
  background: #163d34;
  color: white;
  font-size: 14px;
  text-align: center;
  border-radius: 9px;
  padding: 9px 15px;
  white-space: normal;
  max-width: min(90vw, 470px);
  width: max-content;
  pointer-events: none;
  box-shadow: 0 4px 16px #142b292a;
}
#toast:empty {
  display: none;
}
.inline-error {
  color: #99382d;
  font-size: 14px;
  font-weight: 650;
}
.fallback {
  background: url(/postcard.webp) center/cover;
}
body:has(#cover:not([hidden])) header {
  border: 0;
}
@media (max-width: 620px) {
  header {
    height: 56px;
    padding: 0 15px;
    gap: 6px;
  }
  .wordmark {
    font-size: 20px;
    gap: 7px;
  }
  .wordmark .mark {
    width: 27px;
    height: 27px;
  }
  .header-en {
    display: none;
  }
  .circle {
    width: 34px;
    height: 34px;
  }
  main {
    height: calc(100dvh - 56px);
  }
  .cover-image {
    background-position: 60% center;
  }
  .cover-ink {
    background: linear-gradient(
      0deg,
      #102f2df7 0%,
      #113432e0 21%,
      #173b3780 48%,
      transparent 70%
    );
  }
  .cover-text {
    left: 26px;
    top: auto;
    bottom: max(34px, 6%);
    transform: none;
  }
  .cover-text h1 {
    font-size: 56px;
    margin: 10px 0 0;
  }
  .script {
    font-size: 31px;
  }
  .cover-text p {
    margin: 16px 0 20px;
    font-size: 14px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .eyebrow i {
    width: 20px;
  }
  .cover-foot {
    display: none;
  }
  .postmark {
    width: 67px;
    height: 67px;
    top: 22px;
  }
  .postmark span {
    font-size: 6px;
  }
  .postmark i {
    width: 20px;
    height: 20px;
  }
  .location {
    top: 12px;
    left: 10px;
    padding: 5px 9px;
  }
  .quest {
    top: 51px;
    left: 10px;
    right: auto;
    padding: 6px 9px;
    gap: 7px;
  }
  .quest small {
    display: none;
  }
  .quest b {
    font-size: 12px;
  }
  .quest > i:first-child {
    width: 16px;
    height: 16px;
  }
  nav {
    bottom: max(15px, env(safe-area-inset-bottom));
    padding: 4px;
  }
  nav button {
    padding: 10px 12px;
    gap: 6px;
    font-size: 13px;
  }
  #hint {
    bottom: 78px;
  }
  #plantTip {
    bottom: 77px;
  }
  #panel {
    padding: 23px 21px;
  }
  .actions {
    gap: 5px;
  }
}
@media (max-height: 540px) and (orientation: landscape) {
  .cover-text h1 {
    font-size: 45px;
    margin: 6px 0;
  }
  .cover-text p {
    margin: 8px 0;
  }
  .cover-text {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .script {
    font-size: 25px;
  }
  .cta {
    padding: 7px 15px;
  }
  .cover-text small {
    margin-top: 5px;
  }
}
.carillon {
  display: flex;
  gap: 9px;
  margin: 20px 0;
}
.carillon button {
  flex: 1;
  background: #e1e7d7;
  color: var(--pine);
  border: 2px solid #b8c4aa;
  border-radius: 48% 48% 12px 12px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 19px 6px 10px;
}
.carillon button:disabled {
  opacity: 0.85;
}
.carillon button.ring,
.carillon button:active {
  background: #f5ce79;
  border-color: #b87332;
  transform: translateY(-4px);
}
.carillon i {
  width: 30px;
  height: 30px;
}
.carillon b {
  font-size: 12px;
}

.copy-invite {
  display: block;
  margin-left: auto;
  min-height: 40px;
  padding: 6px 2px 6px 12px;
  color: var(--pine);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body:has(#cover:not([hidden])) {
  display: grid;
  grid-template-rows: auto minmax(295px, 1fr) auto;
  min-height: 100dvh;
}
body:has(#cover:not([hidden])) main {
  height: auto;
}
body:has(#cover[hidden]) .cover-footer {
  display: none;
}
.cover-footer {
  background: #fbf8ec;
  padding: 3px max(12px, env(safe-area-inset-right))
    max(3px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.service-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(9px, 2.8vw, 22px);
}
.service-pages a {
  display: inline-block;
  padding: 6px 0;
  color: #4d6356;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#premium-pack .service-pages {
  justify-content: flex-start;
  margin-top: 15px;
}
