/* Orchard confectionery: warm paper, berry enamel, honey edges and leaf carvings. */
:root {
  --ink: #574464;
  --muted: #88718a;
  --cream: #fff8e6;
  --line: #ead2b8;
  --accent: #ef7790;
  background: #fff0d9;
}
body {
  background:
    radial-gradient(ellipse at 12% 2%, #ffe6b6 0, transparent 48%),
    radial-gradient(ellipse at 100% 80%, #ffd6ce 0, transparent 47%), #fff3df;
}
.garden-scenery {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}
#app {
  position: relative;
  gap: 10px;
}
.ui-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
button {
  transition:
    transform 0.14s,
    filter 0.14s,
    box-shadow 0.14s;
}
button:disabled {
  opacity: 0.56;
  filter: saturate(0.65);
}
button:active:not(:disabled) {
  transform: translateY(3px) scale(0.97);
}
.toolbar {
  gap: 9px;
}
.toolbar .icon-button {
  color: #fff6df;
  background: linear-gradient(#b8a1da, #8d6bb5);
  border: 2px solid #fff0db;
  border-radius: 15px 15px 18px 18px;
  box-shadow:
    0 3px 0 #795598,
    0 5px 9px #62436b19,
    inset 0 2px 0 #e6cef1;
  padding: 8px;
}
.toolbar .icon-button:first-child {
  background: linear-gradient(#8cc8a1, #5eaa83);
  box-shadow:
    0 3px 0 #4b8068,
    0 5px 9px #62436b19,
    inset 0 2px 0 #c4e7b6;
}
.toolbar .icon-button:last-child {
  background: linear-gradient(#f6b871, #e89359);
  box-shadow:
    0 3px 0 #b87349,
    0 5px 9px #62436b19,
    inset 0 2px 0 #ffe2a8;
}
.level-label {
  display: block;
  padding-left: 2px;
}
.level-label b {
  display: block;
  color: #655077;
  font-weight: 850;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.level-label span {
  display: inline-block;
  font-size: 10px;
  color: #9a6e7b;
  margin-top: 2px;
  letter-spacing: 1px;
}
.mission {
  position: relative;
  min-height: 88px;
  padding: 9px;
  gap: 11px;
  margin-top: 3px;
  border: 2px solid #fffdf2;
  border-radius: 22px 22px 25px 25px;
  background:
    radial-gradient(circle at 100% 0, #ffe9b5, transparent 50%), #fffbec;
  box-shadow:
    0 4px 0 #dfbfa6,
    0 7px 13px #af8d6a17,
    inset 0 0 0 1px #f2d7af;
}
.mission:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #e4c99e;
  border-radius: 17px;
  pointer-events: none;
}
.moves {
  width: 66px;
  position: relative;
  z-index: 1;
  border: 2px solid #ffe8c9;
  border-radius: 18px;
  background: linear-gradient(145deg, #f7a6b3, #e67898 65%, #d9658b);
  color: #fff7db;
  box-shadow:
    0 3px 0 #b9567b,
    inset 0 2px #ffced0;
  text-shadow: 0 2px #bf597c;
}
.moves:before,
.moves:after {
  content: "✦";
  position: absolute;
  top: 7px;
  font-size: 9px;
  color: #ffe8ab;
}
.moves:before {
  left: 5px;
}
.moves:after {
  right: 5px;
}
.moves strong {
  font-family: ui-rounded, system-ui, sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -1px;
}
.moves span {
  color: #fff8e5;
  font-size: 9px;
  font-weight: 600;
  text-shadow: none;
}
.moves.urgent {
  background: linear-gradient(#ff9f70, #ee6669);
  color: #fffbe1;
  box-shadow:
    0 3px #bb485d,
    inset 0 2px #ffcf9f;
}
.mission-main {
  z-index: 1;
  gap: 7px;
}
.mission-heading {
  color: #9c755d;
  font-size: 10px;
  font-weight: 700;
  align-items: center;
}
.mission-heading > span:first-child:before {
  content: "✿";
  color: #dca962;
  margin-right: 4px;
}
.mission-heading #score {
  color: #a16e37;
  background: #ffedbd;
  border: 1px solid #f3db9a;
  border-radius: 9px;
  padding: 2px 6px;
  font-size: 10px;
}
.goals {
  gap: 5px;
}
.goal {
  position: relative;
  overflow: hidden;
  padding: 5px 6px 7px;
  gap: 4px;
  font-size: 12px;
  color: #655274;
  background: linear-gradient(#fffef7, #f9eedf);
  border: 1px solid #e8d5c6;
  border-radius: 12px;
  box-shadow: 0 2px 0 #ebd8c1;
}
.goal:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, #e9a8b4, #c77ca4);
  transition: width 0.3s ease-out;
}
.goal small {
  color: #9b879a;
  font-size: 9px;
}
.goal-mark {
  width: 24px;
  height: 24px;
  background: none !important;
  box-shadow: none;
  border-radius: 8px;
  padding: 0;
}
.goal-mark .ui-icon {
  filter: drop-shadow(0 1px 0 #e4d3bc);
}
.goal.done {
  color: #41846b;
  background: #e6f3d9;
  border-color: #c7dbb1;
}
.goal.done:after {
  background: #8ebf86;
}
.goal.done .goal-mark {
  background: #86b884 !important;
  padding: 3px;
}
.mood-line {
  color: #92677d;
  min-height: 20px;
  font-size: 11px;
  padding: 0 7px;
}
.mood-line > span:first-child {
  color: #df9d79;
}
.mood-dot {
  background: #d89cc0;
  box-shadow: 0 0 0 3px #efcddd55;
}
.board-wrap {
  border: 3px solid #fff8dd;
  border-radius: 29px;
  padding: 10px;
  background:
    radial-gradient(ellipse at 30% 0, #2e817a55, transparent 55%),
    linear-gradient(145deg, #518f83, #3d746f);
  box-shadow:
    0 0 0 2px #dbb68b,
    0 7px 0 #b98a67,
    0 12px 22px #8f674f26,
    inset 0 0 0 3px #7fa998,
    inset 0 0 30px #254c5925;
}
.board-wrap:before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #b5d4b677;
  border-radius: 21px;
  pointer-events: none;
}
.board-wrap:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 12%, #fff9b92b 0 2px, transparent 3px),
    radial-gradient(circle at 85% 90%, #fff9b92b 0 2px, transparent 3px);
}
.board-decoration {
  z-index: 2;
}
.deco-a {
  top: -16px;
  right: 3px;
  width: 66px;
  height: 42px;
  transform: rotate(12deg);
}
.deco-b {
  width: 43px;
  height: 49px;
  bottom: -14px;
  left: -11px;
  transform: rotate(12deg);
  filter: drop-shadow(0 2px 0 #477967);
}
.fruit-cluster {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}
.fruit-cluster .ui-icon {
  position: absolute;
  width: 55%;
  height: 90%;
  bottom: 0;
  filter: drop-shadow(0 2px 0 #9c5f6940);
}
.fruit-cluster .ui-icon:nth-child(1) {
  left: 0;
  transform: rotate(-20deg);
}
.fruit-cluster .ui-icon:nth-child(2) {
  left: 24%;
  bottom: 4px;
  z-index: 1;
}
.fruit-cluster .ui-icon:nth-child(3) {
  right: 0;
  transform: rotate(18deg);
}
.fruit-cluster i {
  position: absolute;
  right: 5%;
  top: -6px;
  color: #fff0b6;
  font-size: 17px;
  text-shadow: 0 1px #b58557;
}
.tools {
  gap: 9px;
  margin-top: 3px;
}
.tools button {
  position: relative;
  isolation: isolate;
  min-height: 62px;
  overflow: visible;
  background: linear-gradient(#ffca9b, #f6a483);
  border: 2px solid #fff2d3;
  border-radius: 17px 17px 22px 22px;
  box-shadow:
    0 4px 0 #c77b70,
    0 6px 0 #c77b7020,
    inset 0 2px 0 #ffe4b9;
  padding: 7px 5px;
  gap: 5px;
  color: #834e60;
}
.tools button:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #fff4d58f;
  border-radius: 11px 11px 16px 16px;
  z-index: -1;
}
.tools button:nth-child(2) {
  color: #39765e;
  background: linear-gradient(#bce3a6, #8ec8a0);
  box-shadow:
    0 4px 0 #5a9a7a,
    0 6px 0 #5a9a7a20,
    inset 0 2px 0 #e7f5c4;
}
.tools button:nth-child(3) {
  color: #75538b;
  background: linear-gradient(#ddc6ef, #bca1da);
  box-shadow:
    0 4px 0 #8a6bad,
    0 6px 0 #8a6bad20,
    inset 0 2px 0 #f4e3fa;
}
.tools button[aria-pressed="true"] {
  background: linear-gradient(#ffe6a7, #ffc278);
  border-color: #fffbea;
  box-shadow:
    0 4px #bf8057,
    0 0 0 3px #ffe7a8;
  transform: translateY(-2px);
}
.tool-icon {
  display: block;
  width: 36px;
  height: 40px;
  background: none;
  border-radius: 0;
  filter: drop-shadow(0 2px 0 #86604622);
}
.tools b {
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.tools small {
  color: inherit;
  opacity: 0.85;
  font-size: 9px;
  font-weight: 600;
  margin-top: 3px;
}
.bottom-note {
  color: #aa8a7d;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.bottom-note span {
  color: #d8aa72;
  margin: 0 4px;
}
dialog {
  color: #655072;
  border: 3px solid #fff5d7;
  background:
    radial-gradient(ellipse at 50% -15%, #ffdca3, transparent 54%),
    linear-gradient(#fffbef, #fff1dd);
  box-shadow:
    0 0 0 2px #d3a180,
    0 8px 0 #a37a6b,
    0 20px 70px #36354955,
    inset 0 0 0 1px #ead0ae;
  border-radius: 30px;
}
dialog::backdrop {
  background: #34495185;
  backdrop-filter: blur(7px);
}
.dialog-head h2 {
  color: #705175;
  font-weight: 850;
  letter-spacing: -0.5px;
}
.dialog-head .icon-button {
  padding: 10px;
  background: #f3dfd9;
  color: #a7758b;
  border: 2px solid #fff4e5;
  box-shadow: 0 2px #d8b6b1;
  border-radius: 50%;
}
.dialog-kicker {
  color: #ae7a66;
  letter-spacing: 2px;
  font-weight: 750;
  text-align: center;
}
.dialog-copy,
.result-note {
  color: #987b88;
}
.primary {
  position: relative;
  border: 2px solid #fff0c8;
  border-radius: 17px 17px 22px 22px;
  background: linear-gradient(#fa9a99, #ed788c 55%, #e86f88);
  color: #fffbea;
  text-shadow: 0 1px #bd526c;
  font-weight: 850;
  box-shadow:
    0 5px 0 #b75076,
    0 8px 0 #d7909c30,
    inset 0 2px 0 #ffc7b6;
}
.primary:before {
  content: "✦";
  color: #ffe4a1;
  font-size: 18px;
}
.primary:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed #ffe8c87d;
  border-radius: 11px 11px 16px 16px;
  pointer-events: none;
}
.secondary {
  color: #88657e;
  border: 1px solid #dcc1b9;
  background: linear-gradient(#fff9ed, #f4e5db);
  box-shadow:
    0 3px #ddc2b8,
    inset 0 1px #fff;
  font-weight: 650;
}
.intro-crest {
  width: 120px;
  height: 106px;
  margin: 5px auto 12px;
  position: relative;
}
.intro-crest > .fruit-cluster {
  position: absolute;
  width: 110px;
  height: 60px;
  left: 5px;
  top: -7px;
  z-index: 2;
}
.start-badge {
  position: absolute;
  bottom: 0;
  left: 22px;
  width: 76px;
  height: 76px;
  margin: 0;
  border: 3px solid #fff0c3;
  border-radius: 24px;
  background: linear-gradient(#b9a2d8, #9879ba);
  color: #fff4c9;
  box-shadow:
    0 4px 0 #795c9a,
    inset 0 2px #ddc9ee,
    0 0 0 2px #cbb1cd;
  padding-top: 10px;
  font:
    900 37px ui-rounded,
    system-ui,
    sans-serif;
}
.start-badge small {
  display: block;
  font-size: 8px;
  letter-spacing: 1px;
  color: #fff4da;
  position: absolute;
  top: 11px;
  left: 0;
  width: 100%;
}
.centered {
  color: #715275;
}
.star-row {
  color: #f3bf4e;
  text-shadow:
    0 2px #bc8240,
    0 -1px #fff0b4;
}
.result-score {
  color: #a16a9b;
  font-family: ui-rounded, system-ui, sans-serif;
  font-weight: 900;
}
.result-score small {
  color: #a18b93;
}
.chapter-card {
  background: linear-gradient(125deg, #e6edbc, #cce3c1);
  border: 2px solid #fff8df;
  box-shadow: 0 3px #aec496;
  padding: 13px;
  border-radius: 18px;
  overflow: hidden;
}
.chapter-card h3 {
  color: #4c846c;
  font-size: 21px;
}
.chapter-card p {
  color: #608e76;
  font-size: 10px;
  max-width: 75%;
}
.chapter-card > .fruit-cluster {
  position: absolute;
  width: 77px;
  height: 65px;
  right: -1px;
  top: 10px;
  opacity: 1;
}
.level-node {
  color: #94759b;
  border: 2px solid #fff8df;
  border-radius: 19px 19px 23px 23px;
  background: linear-gradient(#f6e2db, #ebccd4);
  box-shadow:
    0 4px #c6a5b7,
    inset 0 2px #fff2ea;
  font-family: ui-rounded, system-ui, sans-serif;
  font-weight: 850;
}
.level-node:nth-child(even) {
  transform: translateY(4px);
}
.level-node.current {
  background: linear-gradient(#ffc779, #ed9e66);
  color: #fff9dd;
  border-color: #fff0ca;
  box-shadow:
    0 4px #b87b58,
    inset 0 2px #ffdfab;
}
.level-node small {
  color: #ad7f54;
  text-shadow: 0 1px #ffe9a9;
}
.map-pager {
  color: #98728b;
  font-weight: 650;
}
.map-pager button {
  border: 2px solid #fff4d9;
  color: #fff4da;
  background: linear-gradient(#c7aedf, #a186be);
  box-shadow: 0 3px #83659d;
  font-size: 19px;
}
.legend > div {
  background: #f8e9db;
  border: 1px solid #e7cbb6;
  border-radius: 14px;
  color: #96777e;
}
.legend > div:nth-child(3n + 2) {
  background: #edf0dc;
  border-color: #d7dfbe;
}
.legend > div:nth-child(3n) {
  background: #f2e3f0;
  border-color: #dfcce1;
}
.legend b {
  color: #88628a;
}
.sound-state {
  filter: saturate(0.5);
}
@media (max-height: 650px) {
  #app {
    gap: 6px;
  }
  .mission {
    min-height: 70px;
    padding: 7px;
    margin-top: 1px;
  }
  .moves {
    width: 54px;
    border-radius: 15px;
  }
  .moves strong {
    font-size: 27px;
  }
  .moves:before,
  .moves:after {
    top: 5px;
    font-size: 7px;
  }
  .goal {
    padding: 3px 4px 5px;
    font-size: 10px;
  }
  .goal-mark {
    width: 21px;
    height: 21px;
  }
  .mission-main {
    gap: 4px;
  }
  .mission-heading #score {
    font-size: 9px;
    padding: 1px 4px;
  }
  .board-wrap {
    padding: 6px;
    border-radius: 23px;
  }
  .deco-a {
    width: 43px;
    height: 25px;
    top: -17px;
    right: 2px;
  }
  .deco-b {
    width: 30px;
    height: 36px;
    left: -18px;
    bottom: -15px;
  }
  .tools button {
    min-height: 52px;
    padding: 5px 4px;
    gap: 3px;
  }
  .tool-icon {
    width: 28px;
    height: 33px;
  }
  .tools b {
    font-size: 11px;
  }
  .tools small {
    font-size: 8px;
  }
  .mood-line {
    font-size: 10px;
    min-height: 17px;
  }
  .intro-crest {
    width: 105px;
    height: 90px;
    margin: 3px auto 10px;
  }
  .intro-crest > .fruit-cluster {
    width: 95px;
    height: 51px;
  }
  .start-badge {
    left: 21px;
    width: 66px;
    height: 64px;
    font-size: 31px;
    border-radius: 21px;
  }
  .start-badge small {
    top: 7px;
  }
}
@media (max-width: 350px) {
  .toolbar {
    gap: 6px;
  }
  .level-label b {
    font-size: 15px;
  }
  .level-label span {
    font-size: 9px;
    letter-spacing: 0;
  }
  .mission {
    gap: 7px;
  }
  .mission-heading {
    font-size: 9px;
  }
  .tools {
    gap: 7px;
  }
  .tools button {
    text-align: left;
    justify-content: center;
  }
  .tools .tool-icon {
    display: block;
    width: 25px;
    height: 31px;
  }
  .tools b {
    font-size: 10px;
  }
  .tools small {
    font-size: 8px;
  }
  .goals {
    gap: 4px;
  }
  .goal {
    gap: 2px;
  }
  .goal small {
    font-size: 8px;
  }
  .goal-mark {
    width: 18px;
    height: 20px;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .deco-b {
    bottom: -3px;
    left: -12px;
    width: 24px;
    height: 29px;
  }
  #app {
    gap: 8px 15px;
  }
  .mission {
    margin: 0;
  }
  .toolbar {
    gap: 6px;
  }
  .level-label b {
    font-size: 12px;
  }
  .level-label span {
    font-size: 8px;
    letter-spacing: 0;
  }
  .toolbar .icon-button {
    padding: 9px;
  }
  .mission-heading {
    display: block;
  }
  .mission-heading > span:first-child:before {
    display: none;
  }
  .goal {
    padding: 3px 3px 5px;
    gap: 2px;
  }
  .goal-mark {
    width: 17px;
    height: 18px;
  }
  .goal small {
    font-size: 8px;
  }
  .tools {
    gap: 5px;
    margin: 0;
  }
  .tools button {
    min-height: 48px;
    padding: 3px 2px;
  }
  .tools .tool-icon {
    display: none;
  }
  .tools b {
    font-size: 10px;
  }
  .intro-crest {
    float: left;
    margin: 3px 15px 3px 3px;
    height: 85px;
  }
  .intro-crest .start-badge {
    margin: 0;
    float: none;
  }
  dialog[open][data-kind="intro"] {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 4px 12px;
  }
  dialog[data-kind="intro"] > .intro-crest {
    grid-column: 1;
    grid-row: 1 / 6;
    align-self: center;
    float: none;
    margin: 0;
    width: 100px;
  }
  dialog[data-kind="intro"] > .centered,
  dialog[data-kind="intro"] > .intro-goals,
  dialog[data-kind="intro"] > .primary,
  dialog[data-kind="intro"] > .button-row {
    grid-column: 2;
    margin: 3px 0;
  }
  dialog[data-kind="intro"] > .dialog-copy {
    font-size: 10px;
    line-height: 1.4;
  }
  dialog[data-kind="intro"] > h2 {
    font-size: 20px;
  }
  .level-node {
    min-height: 48px;
    border-radius: 13px;
  }
  .level-node:nth-child(even) {
    transform: none;
  }
  .primary {
    min-height: 44px;
    padding: 7px;
  }
  .primary:before {
    font-size: 14px;
  }
  .centered {
    font-size: 21px;
    margin: 9px 0;
  }
  .result-note {
    margin: 7px 0;
    font-size: 11px;
  }
  .star-row {
    margin: 3px 8px;
  }
  .result-score {
    font-size: 28px;
  }
}

/* Localized tool labels must shrink inside narrow landscape columns. */
.tools button > span:not(.tool-icon) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.tools b {
  white-space: normal;
  overflow-wrap: anywhere;
}
