:root {
  font-family: 'Trebuchet MS', sans-serif;
  color: #203d35;
  background: #bad6c9;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  color: inherit;
  background: #f5f4e9;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform .15s, background .15s;
}
button:hover {
  background: #fffdf4;
  transform: translateY(-2px);
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e99841;
  outline-offset: 4px;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
header {
  position: fixed;
  top: 26px;
  left: 34px;
  right: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #183e36;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 45px;
  height: 48px;
  border-radius: 15px 15px 19px 8px;
  background: #204c40;
  color: #f9edba;
  font-size: 34px;
  transform: rotate(-8deg);
}
.brand small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
  letter-spacing: 2.5px;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wallet > span {
  background: #fff9e9e8;
  border: 1px solid #ffffff90;
  padding: 12px 19px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 5px 20px #204c4010;
}
#stars {
  color: #956a1b;
}
#crystals {
  color: #7256a4;
}
#help {
  border-radius: 50%;
  padding: 10px 16px;
}
.location {
  position: fixed;
  top: 114px;
  left: 35px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}
.location small {
  display: block;
  margin: 8px 0 0 17px;
  font-size: 8px;
  letter-spacing: 1.4px;
  opacity: .6;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  background: #598454;
  border-radius: 50%;
}
#map {
  position: fixed;
  top: 114px;
  right: 34px;
  width: 160px;
  padding: 10px;
  background: #fff9e9ed;
  border-radius: 18px;
  box-shadow: 0 10px 35px #204c4010;
}
#map svg {
  display: block;
  width: 100%;
}
#map small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.island-guide {
  max-width: 440px;
  margin: 12px auto;
}
.island-guide svg {
  display: block;
  width: 100%;
}
.destinations {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.destinations button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
  background: #edf0df;
}
.destinations .item-icon {
  width: 42px;
  height: 42px;
}
.destinations strong {
  font-size: 12px;
}
.destinations small {
  display: block;
  margin-top: 5px;
  color: #687665;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.4;
}
.panel {
  position: fixed;
  background: #fff9e9ed;
  border: 1px solid #fff8;
  border-radius: 18px;
  padding: 18px;
  width: 245px;
  box-shadow: 0 10px 35px #204c4010;
}
#companion {
  left: 34px;
  top: 174px;
}
#opponent {
  right: 34px;
  top: 114px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  text-transform: uppercase;
  color: #73826b;
  margin: 0 0 10px;
}
.panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
}
.panel p {
  font-size: 12px;
  margin: 8px 0 0;
}
progress {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #dce0cc;
  accent-color: #688f57;
}
progress::-webkit-progress-bar {
  background: #dce0cc;
}
progress::-webkit-progress-value {
  background: #688f57;
  border-radius: 8px;
}
#opponent progress {
  accent-color: #c57653;
}
#opponent progress::-webkit-progress-value {
  background: #c57653;
}
#notice {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 420px;
  width: max-content;
  padding: 13px 20px;
  border-radius: 14px;
  background: #244d42ee;
  color: #fff8e5;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 5;
}
#notice.visible {
  opacity: 1;
}
#toolbar {
  position: fixed;
  bottom: 60px;
  left: 34px;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: #264f42e8;
  box-shadow: 0 8px 35px #163e3430;
}
#toolbar button {
  color: #fff5df;
  background: transparent;
  font-size: 12px;
  padding: 12px;
}
#toolbar button:hover {
  background: #ffffff18;
}
#toolbar span {
  font-size: 20px;
  padding-right: 4px;
}
kbd {
  font: 9px 'Trebuchet MS', sans-serif;
  opacity: .65;
  margin-left: 5px;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 3px 4px;
}
#actions {
  position: fixed;
  bottom: 60px;
  right: 34px;
  display: flex;
  gap: 7px;
}
#actions button {
  font-size: 12px;
  padding: 17px 13px;
  box-shadow: 0 5px 20px #204c4015;
}
#prompt {
  position: fixed;
  bottom: 143px;
  left: 50%;
  transform: translateX(-50%);
}
#prompt button {
  color: #fff7df;
  background: #244d42ed;
  box-shadow: 0 5px 24px #163e3430;
}
footer {
  position: fixed;
  left: 35px;
  right: 35px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #244d42aa;
}
footer b {
  font-weight: normal;
  color: #244d42;
}
dialog {
  border: 1px solid #fffc;
  border-radius: 26px;
  padding: 34px;
  color: #203d35;
  background: #fcf8ea;
  max-width: 700px;
  width: calc(100% - 32px);
  max-height: calc(100dvh - 40px);
  box-shadow: 0 30px 100px #183e3640;
}
dialog::backdrop {
  background: #234c3a35;
  backdrop-filter: blur(5px);
}
#dialog-notice:empty {
  display: none;
}
#dialog-notice {
  padding: 10px 14px;
  background: #e6edda;
  border-radius: 10px;
  color: #285443;
}
dialog h1,
dialog h2 {
  font-family: Georgia, serif;
  font-weight: normal;
  letter-spacing: -1px;
  margin: 8px 0 12px;
  font-size: 42px;
  line-height: 1.06;
}
dialog p {
  line-height: 1.65;
  color: #687665;
  font-size: 14px;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.close {
  border-radius: 50%;
  background: #eae9da;
  padding: 7px 12px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}
.card {
  text-align: left;
  padding: 20px 15px;
  border: 1px solid #dedfce;
  background: #f1f0e1;
  border-radius: 17px;
}
.card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 17px;
}
.card small {
  display: block;
  font-weight: normal;
  font-size: 11px;
  color: #74806e;
  line-height: 1.5;
}
.egg {
  display: block;
  width: 64px;
  height: 82px;
  margin: 4px auto 18px;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 35% 40%, #fff6 0 7%, transparent 8%),
    radial-gradient(ellipse at 70% 64%, #284c402a 0 10%, transparent 11%), radial-gradient(ellipse
    at 24% 72%, #284c402a 0 6%, transparent 7%), var(--egg);
  box-shadow: inset -9px -6px 0 #0000000d, 0 12px 16px #29432a12;
  transform: rotate(-9deg);
}
.hatch {
  display: block;
  margin: 24px auto;
  background: transparent;
}
.hatch .egg {
  width: 115px;
  height: 148px;
}
.center {
  text-align: center;
}
.primary {
  background: #285443;
  color: #fff7df;
}
.primary:hover {
  background: #376d57;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e6e4d5;
}
.row:last-child {
  border: 0;
}
.row strong {
  font-size: 14px;
}
.row small {
  display: block;
  color: #73806d;
  font-size: 11px;
  margin-top: 5px;
  line-height: 1.5;
}
.row button {
  font-size: 12px;
  flex-shrink: 0;
  background: #e9ecd9;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}
.tabs button {
  background: #e9ecd9;
  font-size: 12px;
}
.tabs button.selected {
  background: #285443;
  color: #fff7df;
}
.item-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.battle-loot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.battle-loot li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  background: #edf1de;
  border: 2px solid #dce5c8;
  border-radius: 18px;
  text-align: center;
}
.battle-loot .item-icon {
  width: 96px;
  height: 96px;
}
.battle-loot strong {
  font-size: 30px;
  color: #3e704f;
}
.battle-loot span {
  font-size: 14px;
  font-weight: 700;
}
.battle-loot small {
  font-size: 11px;
  color: #687665;
}
.battle-loot.lost li {
  background: #f4e9db;
  border-color: #e8d9c7;
}
.battle-loot.lost strong {
  color: #a26548;
}
.battle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.new-game {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.new-game > span {
  font-size: 24px;
}
.saved-games {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.saved-game {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef0df;
  border: 1px solid #dce2cd;
  border-radius: 18px;
  padding: 10px;
}
.load-game {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
  text-align: left;
  background: transparent;
}
.load-game .item-icon {
  width: 78px;
  height: 78px;
}
.load-game .egg {
  width: 48px;
  height: 62px;
  margin: 8px 15px;
  flex-shrink: 0;
}
.load-game strong {
  display: block;
  font-size: 20px;
}
.load-game small {
  display: block;
  font-size: 11px;
  font-weight: normal;
  color: #66765f;
  margin-top: 7px;
  line-height: 1.4;
}
.load-game b {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #356647;
}
.delete-game {
  font-size: 11px;
  padding: 10px;
  color: #996349;
  background: #f6eee2;
}
.danger {
  background: #a35f49;
  color: #fff8e8;
}
.danger:hover {
  background: #8b4d3a;
}
.delete-preview {
  display: grid;
  place-items: center;
  margin: 20px 0;
}
.delete-preview .item-icon {
  width: 110px;
  height: 110px;
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.item-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px;
  border: 2px solid #e0e2d0;
  background: #f2f1e3;
  text-align: center;
  border-radius: 18px;
  min-width: 0;
}
.item-card:hover {
  border-color: #94b080;
  background: #fffdf4;
}
.item-card:disabled {
  opacity: .7;
}
.item-card:disabled:hover {
  border-color: #e0e2d0;
  background: #f2f1e3;
}
.item-picture {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e6ead6;
  margin-bottom: 12px;
  min-height: 112px;
}
.item-picture > .item-icon {
  width: 104px;
  height: 104px;
  filter: drop-shadow(0 5px 1px #314e3510);
}
.item-count {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 4px 7px;
  background: #fffbed;
  border-radius: 9px;
  font-size: 13px;
}
.item-card strong {
  font-size: 14px;
  line-height: 1.3;
}
.item-card small {
  color: #667660;
  font-size: 11px;
  font-weight: normal;
  line-height: 1.4;
  margin: 6px 0 12px;
}
.item-action {
  display: block;
  background: #e0e6ce;
  border-radius: 8px;
  padding: 10px 3px;
  font-size: 12px;
  margin-top: auto;
}
.item-card.equipped {
  background: #edf3df;
  border-color: #648b55;
}
.equipped .item-action,
.equipped-mark {
  background: #3e704f;
  color: #fffbed;
}
.equipped-mark {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  font-size: 17px;
}
.care-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.care-grid .item-picture > .item-icon {
  width: 86px;
  height: 86px;
}
.care-grid .item-picture {
  min-height: 96px;
}
.companion-summary,
.care-reward {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.care-reward {
  padding: 10px 14px;
  border-radius: 14px;
  background: #e9ebd8;
}
.care-reward strong {
  font-size: 13px;
}
.care-reward small {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: #64735b;
  margin-top: 4px;
}
.care-reward .item-icon {
  width: 44px;
  height: 44px;
}
.outfit-tabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid transparent;
}
.outfit-tabs button.selected {
  border-color: #87a778;
}
.outfit-tabs small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: normal;
}
.crystal-bag {
  display: flex;
  gap: 8px;
}
.crystal-bag > div {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #f0efe0;
  border-radius: 12px;
  padding: 10px 3px;
}
.crystal-bag .item-icon {
  width: 40px;
  height: 44px;
}
.crystal-bag strong {
  font-size: 16px;
}
.crystal-bag small {
  display: block;
  font-size: 10px;
  color: #6a785f;
  margin-top: 3px;
}
.footnote {
  font-size: 11px !important;
}
.hidden {
  display: none !important;
}
#movement {
  display: none;
  position: fixed;
  bottom: 125px;
  left: 22px;
  grid-template-columns: repeat(3, 38px);
  gap: 4px;
  touch-action: none;
}
#movement button {
  padding: 10px;
  background: #fff9e9b0;
}
#movement button:first-child {
  grid-column: 2;
}
#movement button:nth-child(2) {
  grid-column: 1;
}
@media (pointer: coarse) {
  #movement {
    display: grid;
  }
  footer span:first-child {
    visibility: hidden;
  }
  kbd {
    display: none;
  }
}
@media (max-width: 750px) {
  header {
    top: 18px;
    left: 18px;
    right: 18px;
  }
  .brand {
    font-size: 15px;
    letter-spacing: 1px;
  }
  .brand-mark {
    width: 34px;
    height: 38px;
    font-size: 26px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .wallet {
    gap: 5px;
  }
  .wallet > span {
    font-size: 14px;
    padding: 9px 11px;
  }
  #help {
    padding: 8px 12px;
  }
  .location {
    left: 20px;
    top: 83px;
  }
  .location small {
    display: none;
  }
  #companion {
    left: 18px;
    top: 110px;
    width: 175px;
    padding: 12px;
  }
  .panel h3 {
    font-size: 17px;
  }
  .panel p {
    font-size: 10px;
  }
  #opponent {
    right: 18px;
    top: 110px;
    width: 155px;
    padding: 12px;
  }
  #toolbar {
    left: 50%;
    transform: translateX(-50%);
    bottom: 17px;
    white-space: nowrap;
  }
  #toolbar button {
    padding: 8px 12px;
  }
  #toolbar kbd {
    display: none;
  }
  #actions {
    bottom: 78px;
    right: 14px;
    gap: 4px;
  }
  #actions button {
    padding: 12px 9px;
    font-size: 10px;
  }
  #actions kbd {
    display: none;
  }
  #prompt {
    bottom: 215px;
    width: max-content;
    max-width: 90%;
    font-size: 12px;
  }
  footer {
    display: none;
  }
  dialog {
    padding: 24px;
  }
  dialog h1,
  dialog h2 {
    font-size: 34px;
  }
  .cards {
    gap: 7px;
  }
  .card {
    padding: 14px 9px;
  }
  .card strong {
    font-size: 14px;
  }
  .card small {
    font-size: 10px;
  }
  .egg {
    width: 49px;
    height: 64px;
  }
  #notice {
    top: 74px;
    max-width: 92%;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media (max-width: 520px) {
  #map {
    top: 110px;
    right: 18px;
    width: clamp(96px, 32vw, 128px);
    padding: 8px;
  }
  .destinations {
    grid-template-columns: 1fr;
  }
  .brand > span:last-child {
    display: none;
  }
  #games {
    font-size: 12px;
    padding: 10px 12px;
  }
  .saved-game {
    flex-wrap: wrap;
    gap: 0;
  }
  .load-game {
    padding: 10px;
    gap: 12px;
  }
  .load-game .item-icon {
    width: 58px;
    height: 58px;
  }
  .load-game .egg {
    margin: 5px;
  }
  .delete-game {
    margin: 0 10px 6px auto;
  }
  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .item-card {
    padding: 9px;
  }
  .item-card strong {
    font-size: 12px;
  }
  .item-picture > .item-icon,
  .care-grid .item-picture > .item-icon {
    width: 86px;
    height: 86px;
  }
  .item-picture {
    min-height: 100px;
  }
  .item-action {
    font-size: 11px;
  }
  .outfit-tabs button {
    padding: 8px;
    gap: 5px;
  }
  .outfit-tabs .item-icon {
    width: 43px;
    height: 48px;
  }
  .outfit-tabs small {
    font-size: 9px;
  }
  .companion-summary {
    gap: 6px;
  }
  .companion-summary .item-icon {
    width: 40px;
    height: 45px;
  }
  .crystal-bag {
    gap: 5px;
  }
  .crystal-bag > div {
    flex-direction: column;
    text-align: center;
  }
}
