@font-face {
  font-family: Jua;
  src: url(./jua.woff2) format("woff2");
  font-display: swap;
}
:root {
  --paper: #fff8ec;
  --ink: #503f36;
  --line: #624b3b;
  --mint: #bde8d3;
  --butter: #ffe7a1;
  --lav: #d8c5f5;
  --peach: #ffd1d9;
  --panel: #fffdf7;
  --shadow: 0 4px 0 #765b492b;
  --round: Jua, system-ui, sans-serif;
  font-family:
    system-ui,
    -apple-system,
    "Malgun Gothic",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-image: radial-gradient(#ccba9970 0.85px, transparent 1px);
  background-size: 15px 15px;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.62;
}
button:focus-visible {
  outline: 4px solid #187e77;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
button,
b,
strong,
.tag,
.brand,
.mini-label,
.rail,
.hint,
#boss,
.final-stats {
  font-family: var(--round);
  font-weight: 400;
}
#cover {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 74px);
}
.cover-wrap {
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(270px, 0.79fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 68px);
  align-items: center;
}
.intro {
  padding-left: 2%;
}
.tag {
  background: var(--butter);
  display: table;
  padding: 5px 13px;
  border: 2px solid var(--line);
  border-radius: 9px;
  transform: rotate(-2deg);
  font-size: 16px;
  box-shadow: var(--shadow);
  margin: 0;
}
.intro h1 {
  font-size: clamp(56px, 6.5vw, 94px);
  letter-spacing: -0.066em;
  line-height: 1.09;
  margin: 22px 0 12px;
  color: #d4c2f2;
  -webkit-text-stroke: 2.5px var(--line);
  paint-order: stroke fill;
  text-shadow: 0 4px var(--line);
  word-break: keep-all;
}
.intro h1 span {
  color: #aedec4;
}
.pitch {
  line-height: 1.65;
  font-size: clamp(15px, 1.5vw, 21px);
  font-weight: 650;
  margin: 14px 0 23px;
}
.primary {
  border: 2px solid var(--line);
  border-radius: 16px;
  min-height: 48px;
  font-size: 21px;
  padding: 10px 28px;
  background: var(--mint);
  box-shadow: 0 4px 0 var(--line);
}
.primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px var(--line);
}
.input-note {
  margin-top: 14px;
  display: block;
  font-weight: 650;
  font-size: 13px;
}
.input-note i {
  padding: 0 5px;
}
.cover-art {
  margin: 0;
  overflow: hidden;
  border: 4px solid var(--line);
  border-radius: 46% 46% 22px 22px/32% 32% 22px 22px;
  background: #315654;
  box-shadow:
    0 0 0 6px #b5d7bf,
    0 0 0 8px var(--line),
    6px 13px 0 #6e665539;
}
.cover-art img {
  width: 100%;
  display: block;
}
#play {
  min-height: 100svh;
  padding: 0 max(13px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left));
  max-width: 1150px;
  margin: auto;
}
.mast {
  height: 62px;
  border-bottom: 2px solid #c8b99e;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: clamp(20px, 2.3vw, 31px);
  letter-spacing: -0.045em;
}
.tools {
  display: flex;
  gap: 7px;
}
.tools button,
#home {
  min-height: 44px;
  min-width: 44px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 15px;
  padding: 0 10px;
}
#pause {
  font-size: 20px;
}
.desk {
  display: flex;
  gap: clamp(13px, 3vw, 38px);
  align-items: center;
  justify-content: center;
  padding-top: 14px;
}
.stage {
  width: min(calc(100% - 240px), calc((100svh - 138px) * 1.0769), 760px);
}
.rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 37px;
  gap: 5px;
  margin-bottom: 6px;
}
.rail strong,
.rail span,
.readout,
.garden-status,
.brief {
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.rail strong {
  padding: 5px 12px;
  background: var(--lav);
  font-size: 17px;
}
.rail span {
  padding: 4px 11px;
  background: #e7f4df;
  font-size: 14px;
}
#board {
  position: relative;
  width: 100%;
  aspect-ratio: 560/520;
  border: 3px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 5px 0 #8aa496;
  background: #456b67;
  isolation: isolate;
  touch-action: none;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.mirror {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 13%;
  height: 14%;
  min-width: 46px;
  min-height: 46px;
  background: transparent;
  border: none;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.mirror:focus-visible {
  outline-color: #ffe197;
}
.mirror:active {
  background: #fff6bd22;
}
#boss {
  position: absolute;
  left: 50%;
  top: 3%;
  transform: translateX(-50%);
  border: 2px solid var(--line);
  background: #f7dbea;
  border-radius: 10px;
  min-width: 95px;
  padding: 2px 9px;
  text-align: center;
  font-size: 15px;
}
#boss span {
  display: block;
  height: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}
#boss i {
  display: block;
  height: 100%;
  background: #c7699a;
}
.log {
  width: 217px;
  display: grid;
  gap: 13px;
}
.mini-label {
  display: block;
  font-size: 14px;
  color: #695740;
}
.readout,
.brief,
.garden-status {
  padding: 13px 15px;
}
.readout {
  background: var(--butter);
}
.readout strong {
  font-size: 25px;
}
.brief p {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  font-weight: 650;
  word-break: keep-all;
}
.brief button {
  font-size: 17px;
  min-height: 44px;
  padding: 7px 12px;
  margin: 9px 0 3px;
  width: 100%;
}
#beds {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#beds div {
  font-size: 12px;
  font-weight: 700;
}
#beds b {
  font-size: 13px;
  display: block;
  letter-spacing: 2px;
  color: #965437;
}
.hint {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 4px;
  word-break: keep-all;
}
#modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 5;
  background: #263c3ac2;
}
.sheet {
  width: min(458px, 100%);
  max-height: 95dvh;
  overflow: auto;
  text-align: center;
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 24px;
  padding: 24px 19px 15px;
  box-shadow: 0 6px 0 #473b34aa;
}
.sheet .tag {
  margin: auto;
}
.sheet h2 {
  font-size: 34px;
  letter-spacing: -0.04em;
  margin: 17px 0 7px;
}
.sheet #description {
  margin: 0 auto 14px;
  line-height: 1.5;
  font-size: 15px;
  word-break: keep-all;
}
.sheet #options {
  display: flex;
  gap: 7px;
}
#options button {
  flex: 1;
  border: 2px solid var(--line);
  border-radius: 13px;
  min-height: 65px;
  background: #f4ecd6;
  display: grid;
  place-content: center;
  padding: 7px 3px;
}
#options button:nth-child(2) {
  background: #e1d7f4;
}
#options button:nth-child(3) {
  background: #dbefdc;
}
#options button[aria-pressed="true"] {
  background: var(--butter);
  box-shadow: 0 0 0 2px var(--line);
}
#options b {
  font-size: 17px;
}
#options small {
  font-size: 12px;
}
#choice {
  min-height: 1em;
  font-size: 13px;
}
#home {
  display: block;
  margin: 11px auto 0;
  background: transparent;
  border: 0;
}
.final-stats {
  margin: 12px 0 17px;
  font-size: 18px;
}
#go {
  width: 100%;
}
@media (orientation: portrait) {
  #cover {
    padding: 26px 22px;
  }
  .cover-wrap {
    max-width: 640px;
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }
  .cover-art {
    width: 96%;
  }
  .intro {
    padding: 0;
    text-align: center;
  }
  .intro .tag {
    margin: auto;
  }
  .intro h1 {
    font-size: clamp(55px, 10vw, 87px);
    margin: 12px 0;
  }
  .pitch {
    margin: 8px 0 17px;
  }
  .input-note {
    margin-top: 10px;
  }
  .mast {
    height: 51px;
  }
  .desk {
    flex-direction: column;
    gap: 13px;
    padding-top: 5px;
  }
  .stage,
  .log {
    width: min(100%, calc((100svh - 205px) * 1.0769), 690px);
    min-width: min(100%, 286px);
  }
  .log {
    grid-template-columns: auto 1fr;
    align-items: stretch;
    gap: 7px;
  }
  .readout,
  .brief {
    padding: 8px 10px;
  }
  .readout {
    display: grid;
    align-content: center;
  }
  .readout strong {
    font-size: 20px;
  }
  .brief p {
    font-size: 14px;
    line-height: 1.35;
  }
  .garden-status {
    display: none;
  }
  .hint {
    grid-column: 1/-1;
    text-align: center;
    font-size: 13px;
  }
  .rail {
    margin-bottom: 4px;
  }
  .brief button {
    margin: 5px 0 2px;
  }
  .sheet {
    padding: 18px 13px 10px;
  }
}
@media (orientation: landscape) and (max-height: 545px) {
  #cover {
    padding: 16px 4vw;
  }
  .cover-wrap {
    grid-template-columns: 0.9fr 1fr;
  }
  .cover-art {
    max-height: 82vh;
  }
  .cover-art img {
    height: 78vh;
    object-fit: cover;
  }
  .intro h1 {
    font-size: 48px;
    margin: 11px 0;
  }
  .pitch {
    margin: 7px 0 12px;
    font-size: 14px;
  }
  .intro .tag {
    font-size: 13px;
  }
  .mast {
    height: 48px;
  }
  .desk {
    padding-top: 1px;
    gap: 15px;
  }
  .stage {
    width: min(calc(100% - 180px), calc((100svh - 94px) * 1.0769));
  }
  .rail {
    min-height: 25px;
    margin-bottom: 3px;
  }
  .rail strong,
  .rail span {
    padding: 1px 8px;
    font-size: 13px;
  }
  .log {
    width: 154px;
    gap: 5px;
  }
  .brief p,
  .hint {
    font-size: 12px;
  }
  .readout,
  .brief,
  .garden-status {
    padding: 5px 8px;
  }
  .readout strong {
    font-size: 16px;
  }
  .garden-status {
    display: none;
  }
  .sheet {
    padding: 12px;
  }
  .sheet h2 {
    margin: 5px;
  }
  .sheet #description {
    margin-bottom: 5px;
  }
  #choice {
    margin: 6px;
  }
  #home {
    margin: 4px auto 0;
  }
}

@media (orientation: portrait) and (min-height: 635px) {
  .garden-status {
    display: flex;
    grid-column: 1/-1;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    background: #fffdf6;
  }
  .garden-status .mini-label {
    max-width: 32px;
    line-height: 1.15;
  }
  #beds {
    margin: 0;
    flex: 1;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    text-align: center;
  }
  #beds b {
    font-size: 12px;
  }
  .desk {
    padding-top: 10px;
    gap: 13px;
  }
  .log {
    row-gap: 10px;
  }
}
