@font-face {
  font-family: Pixelify;
  src: url("fonts/pixelify.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  font:
    16px Pixelify,
    "Courier New",
    monospace;
  color: #513e2b;
  background: #344d32;
  --ink: #513e2b;
  --paper: #f7e9c8;
  --edge: #775136;
  --muted: #827459;
  --gold: #bd8b37;
  --green: #698646;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #365f42;
  outline-offset: 4px;
}
button:hover:not(:disabled) {
  filter: brightness(1.06);
}
button:active:not(:disabled) {
  translate: 0 1px;
}
[hidden] {
  display: none !important;
}
#game {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #799e49;
}
#world {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  touch-action: none;
  outline: none;
}
.pixel-frame {
  background: #f5e3b8;
  border: 3px solid #785337;
  box-shadow:
    inset 0 0 0 2px #fff3d6,
    inset 0 -4px 0 #ddbd84,
    0 0 0 1px #e7c78f,
    3px 4px 0 #293c304d;
  border-radius: 2px;
}
.pixel-icon {
  width: 24px;
  height: 24px;
  display: block;
  shape-rendering: crispEdges;
}
button .pixel-icon {
  margin: auto;
}
kbd {
  font: inherit;
}
.top-left {
  position: absolute;
  left: 24px;
  top: 19px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.game-name {
  font-size: 13px;
  letter-spacing: 3px;
  color: #fff3cc;
  text-shadow: 1px 2px #344d32;
  padding-left: 3px;
}
.location {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 17px;
  line-height: 1.2;
}
.location-icon {
  color: #65864d;
}
.location-icon .pixel-icon {
  width: 18px;
  height: 18px;
}
.location small {
  display: none;
}
.location.sync-err {
  flex-wrap: wrap;
}
.location.sync-err small {
  display: block;
  width: 100%;
  color: #963c2d;
  font-size: 12px;
}
.quest-pin {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 3px 8px;
  padding: 9px 12px;
  text-align: left;
  background: #faf0d5;
}
.quest-pin .pixel-icon {
  width: 18px;
  height: 18px;
  color: #94713e;
  grid-row: 1/3;
}
.quest-pin b {
  font-size: 15px;
  font-weight: 500;
}
.quest-pin small {
  grid-column: 2;
  font-size: 12px;
  color: #807151;
}
.quest-pin kbd {
  grid-column: 3;
  grid-row: 1/3;
  align-self: center;
  font-size: 12px;
  padding: 3px 5px;
  border: 1px solid #c6aa72;
  color: #836845;
}
.top-right {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 208px;
}
.clock {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px 14px;
  padding: 12px 14px;
  background: #fbefd0;
}
.clock-day {
  display: contents;
}
.clock-day #weather {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
}
.clock-day #weather .pixel-icon {
  width: 22px;
  height: 22px;
}
.clock-day b {
  grid-column: 1;
  grid-row: 1;
  margin-left: 29px;
  font-size: 18px;
  font-weight: 500;
}
.clock-day > span:last-child {
  grid-column: 1;
  grid-row: 2;
  font-size: 13px;
  color: #8a7556;
}
.clock > strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}
.money {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  color: #986923;
}
.money .pixel-icon {
  width: 18px;
  height: 18px;
}
.money b {
  white-space: nowrap;
  font-weight: 500;
}
.quick-buttons {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  justify-content: flex-end;
}
.quick-buttons button {
  width: 40px;
  height: 40px;
  padding: 6px;
}
.quick-buttons .pixel-icon {
  width: 23px;
  height: 23px;
}
.quick-buttons #helpButton {
  font-size: 26px;
  padding: 0;
}
.bottom {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}
.hotbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px;
  background: #b68a53;
  border-color: #61422f;
  box-shadow:
    inset 0 0 0 2px #e1b879,
    0 0 0 1px #e7c78f,
    3px 4px 0 #293c304d;
}
.hotbar button {
  position: relative;
  min-width: 61px;
  width: 61px;
  height: 59px;
  padding: 9px;
  background: #ebd5a5;
  border: 2px solid #9b744c;
  box-shadow:
    inset 0 2px 0 #fff2d1,
    inset 0 -3px 0 #cfac73;
  color: #78563a;
}
.hotbar .pixel-icon {
  width: 35px;
  height: 35px;
}
.hotbar button.active {
  background: #fff0bd;
  border-color: #455e3c;
  box-shadow:
    inset 0 0 0 2px #c9d58c,
    inset 0 -3px 0 #dcc787,
    0 0 0 2px #e9d795;
  transform: translateY(-3px);
}
.hotbar kbd {
  position: absolute;
  left: 4px;
  top: 2px;
  font-size: 12px;
  color: #8a6b45;
  line-height: 1;
}
.hotbar small {
  display: none;
}
.slot-count {
  position: absolute;
  bottom: 2px;
  right: 5px;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 1px 1px #fff3cf;
}
.tool-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff0d0;
  border: 2px solid #785337;
  box-shadow:
    inset 0 0 0 1px #fff9e3,
    2px 3px 0 #293c303d;
  padding: 5px 15px;
  font-size: 15px;
  white-space: nowrap;
  pointer-events: none;
}
.status-bars {
  position: absolute;
  left: 24px;
  bottom: 31px;
  padding: 9px 12px;
  min-width: 174px;
  pointer-events: none;
  background: #fcf0d0;
}
.status-title {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: #927956;
  margin-bottom: 5px;
}
.status-bars > div {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 20px;
}
.status-bars .pixel-icon {
  width: 15px;
  height: 15px;
}
.status-bars b {
  font-size: 13px;
  font-weight: 500;
  min-width: 31px;
}
.meter {
  height: 9px;
  background: #ddcba5;
  border: 1px solid #a2946f;
  width: 86px;
}
.meter i {
  display: block;
  height: 100%;
  background: #88a955;
  box-shadow: inset 0 2px #b7cd7e;
  transition: width 0.2s;
}
.meter.xp {
  height: 6px;
}
.meter.xp i {
  background: #89b3b2;
  box-shadow: inset 0 1px #bce0ca;
}
.sound {
  position: absolute;
  right: 24px;
  bottom: 32px;
  width: 42px;
  height: 42px;
  padding: 7px;
}
.sound span {
  display: none;
}
.sound[aria-pressed="false"] {
  color: #998463;
}
.desktop-hint {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #fff3cc;
  text-shadow: 1px 2px #344d32;
  white-space: nowrap;
  pointer-events: none;
}
.desktop-hint span {
  margin: 0 8px;
}
.desktop-hint kbd {
  color: #fff7d9;
}
#interaction {
  position: absolute;
  bottom: 148px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 15px;
  pointer-events: none;
  background: #fcf2d7;
}
#interaction kbd {
  background: #788c50;
  color: #fff7dc;
  border: 1px solid #47613e;
  box-shadow: inset 0 1px #bbcc83;
  padding: 2px 6px;
  font-size: 13px;
}
#toast {
  position: absolute;
  top: 155px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff2d4;
  border: 2px solid #8a6844;
  box-shadow:
    inset 0 0 0 1px #fff9e6,
    2px 3px 0 #293c303d;
  padding: 9px 15px;
  max-width: 430px;
  font-size: 15px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  text-align: center;
}
#loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  z-index: 10;
  background:
    linear-gradient(#263b2eaa, #263b2eee),
    url("farm.webp") center/cover;
  color: #ffedc1;
  padding: 24px;
  overflow: auto;
}
#loading h1 {
  font-size: 52px;
  letter-spacing: 1px;
  font-weight: 600;
  text-shadow: 3px 4px #4b3929;
  margin: 0;
}
#startBody {
  width: 100%;
  max-width: 360px;
  background: #f7e9c8;
  color: var(--ink);
  border: 3px solid #785337;
  box-shadow:
    inset 0 0 0 2px #fff3d6,
    0 0 0 1px #e7c78f,
    5px 6px 0 #17251e55;
  padding: 24px;
  text-align: center;
}
#startBody p {
  margin: 0 0 14px;
  line-height: 1.5;
}
#startBody .who {
  font-size: 21px;
  margin-bottom: 18px;
}
#startBody .who small {
  display: block;
  font-size: 13px;
  color: #807457;
  margin-top: 4px;
}
#startBody .preview {
  display: flex;
  justify-content: space-between;
  background: #ead9b2;
  border: 1px solid #cfb88c;
  padding: 12px;
  margin-bottom: 17px;
}
#startBody .preview div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#startBody .preview b {
  font-weight: 500;
  font-size: 21px;
}
#startBody .preview small {
  font-size: 12px;
  color: #8a7755;
}
#startBody a.panel-button {
  display: block;
  text-decoration: none;
}
#startBody .start-foot {
  font-size: 12px;
  color: #887456;
  margin: 18px 0 0;
}
#startBody .start-foot a {
  color: #73573a;
}
#startBody .panel-button.ghost {
  background: #ead9b2;
  color: #715437;
  border-color: #af8b59;
  box-shadow: inset 0 1px #fff2d0;
}
.touch-controls {
  display: none;
}
dialog.pixel-frame {
  color: var(--ink);
  background: var(--paper);
  max-width: 690px;
  width: calc(100% - 40px);
  max-height: 86dvh;
  padding: 26px;
  overflow-y: auto;
  scrollbar-color: #ba9a62 #ead9b2;
  box-shadow:
    inset 0 0 0 2px #fff6de,
    0 0 0 2px #e8c68b,
    6px 7px 0 #15251e55;
}
dialog::backdrop {
  background: #14291ab5;
}
dialog h2 {
  font-size: 29px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 10px;
}
dialog h3 {
  font-size: 17px;
  font-weight: 500;
  margin: 22px 0 10px;
  color: #90714b;
}
dialog p {
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0 18px;
}
.panel-header {
  position: sticky;
  top: -26px;
  margin: -26px -26px 22px;
  background: #b88b52;
  z-index: 2;
  min-height: 49px;
  border-bottom: 2px solid #987247;
}
.panel-header:has(nav[hidden]) {
  min-height: 34px;
  background: var(--paper);
  border-bottom: 0;
  margin-bottom: 12px;
}
.close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  font-size: 24px;
  line-height: 20px;
  color: #785337;
  background: #f3dfb3;
  border: 2px solid #956f47;
  box-shadow: inset 0 1px #fff3d6;
}
#panelTabs {
  display: flex;
  gap: 4px;
  padding: 14px 49px 0 13px;
}
#panelTabs button {
  padding: 9px 10px;
  background: #d5b07a;
  border: 1px solid #a57b4d;
  border-bottom: 0;
  white-space: nowrap;
  font-size: 14px;
}
#panelTabs button.active {
  background: var(--paper);
  color: #59432e;
  box-shadow: 0 3px var(--paper);
}
#panelTabs kbd {
  font-size: 11px;
  color: #957244;
  margin-left: 3px;
}
.panel-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #93764e;
  margin-bottom: 8px;
}
.inventory-summary {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #8a7859;
  margin-bottom: 20px;
}
.inventory-summary b {
  font-weight: 500;
  color: #a07431;
}
.grid-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 112px;
  padding: 14px 8px 12px;
  border: 2px solid #d0b582;
  background: #efe0bc;
  box-shadow: inset 0 1px #fff5db;
  color: #725535;
  text-align: center;
  font-size: 14px;
}
.item .icon {
  display: grid;
  place-items: center;
  height: 35px;
}
.item .pixel-icon {
  width: 32px;
  height: 32px;
}
.item strong {
  font-size: 15px;
  font-weight: 500;
}
.item small {
  font-size: 12px;
  color: #9a825d;
  line-height: 1.3;
}
.item-count {
  position: absolute;
  right: 8px;
  top: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #8b6838;
}
.item.selected {
  background: #fbefcc;
  border-color: #7e9559;
  box-shadow: inset 0 0 0 1px #c3d293;
}
.item.selected:after {
  content: "✓";
  position: absolute;
  left: 7px;
  top: 5px;
  font-size: 15px;
  color: #708650;
}
.panel-button {
  padding: 11px 14px;
  background: #7c9655;
  border: 2px solid #526b3b;
  border-bottom-width: 3px;
  font-size: 15px;
  color: #fff7dd;
  width: 100%;
  margin-top: 14px;
  box-shadow: inset 0 1px #b8cf84;
}
.panel-button:hover:not(:disabled) {
  background: #8aa565;
}
.shop-row,
.quest-row,
.recipe {
  padding: 16px 0;
  border-bottom: 1px solid #d2bb91;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.shop-row b,
.quest-row b,
.recipe b {
  display: block;
  font-size: 17px;
  font-weight: 500;
}
.shop-row small,
.quest-row small,
.recipe small {
  display: block;
  margin-top: 5px;
  line-height: 1.5;
  font-size: 14px;
  color: #927b56;
}
.shop-row button,
.quest-row button,
.recipe button {
  width: auto;
  margin: 0;
  white-space: nowrap;
  font-size: 14px;
}
.row-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}
.row-icon .pixel-icon {
  width: 20px;
  height: 20px;
}
.hearts {
  color: #c57b67;
  font-size: 22px;
  margin: 6px 0 18px;
}
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.map-place {
  padding: 18px;
  border: 2px solid #c4ad81;
  background: #eadcba;
  font-size: 18px;
  font-weight: 500;
}
.map-place span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-top: 8px;
  color: #907952;
}
.help-list {
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.8;
}
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #d2bb91;
}
.board-row.me {
  background: #e6d9ae;
  margin: 0 -8px;
  padding: 12px 8px;
}
.board-rank {
  width: 26px;
  text-align: right;
  color: #967e54;
}
.board-row > div {
  flex: 1;
  min-width: 0;
}
.board-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-row small {
  display: block;
  font-size: 12px;
  color: #8a7655;
}
.board-level {
  font-size: 15px;
}
.board-gap {
  text-align: center;
  color: #967e54;
}
#fishing {
  text-align: center;
  max-width: 440px;
}
.fish-track {
  height: 160px;
  position: relative;
  background: #83b3bc;
  border: 3px solid #637f7b;
  width: 54px;
  margin: 20px auto;
  overflow: hidden;
}
#fishZone {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50px;
  background: #b5ce7a;
  border-top: 2px solid #dfebae;
  border-bottom: 2px solid #829f57;
}
#fishMarker {
  position: absolute;
  left: 8px;
  width: 30px;
  height: 9px;
  background: #ffe7a0;
  border: 2px solid #715c36;
  top: 60px;
}
.catch-meter {
  height: 13px;
  background: #e1d3ae;
  border: 1px solid #b1a079;
  margin: 20px 0;
}
#catchProgress {
  height: 100%;
  background: #88a459;
  width: 30%;
}
#reel {
  padding: 13px;
  width: 100%;
  user-select: none;
  touch-action: none;
  font-size: 16px;
  font-weight: 500;
  background: #7c9655;
  color: #fff7dd;
  border-color: #526b3b;
}
.text-button {
  background: none;
  border: 0;
  border-bottom: 1px solid #b19770;
  font-size: 14px;
  display: block;
  margin: 18px auto 0;
  padding: 3px;
  color: #927450;
}
@media (max-width: 900px) {
  .top-left {
    left: 16px;
    top: 14px;
  }
  .top-right {
    right: 16px;
    top: 18px;
    width: 190px;
  }
  .hotbar button {
    width: 52px;
    min-width: 52px;
    height: 54px;
  }
  .hotbar .pixel-icon {
    width: 31px;
    height: 31px;
  }
  .status-bars {
    left: 16px;
    min-width: 133px;
    padding: 8px;
  }
  .status-title {
    font-size: 9px;
  }
  .meter {
    width: 60px;
  }
  .sound {
    right: 16px;
  }
  .location {
    font-size: 15px;
  }
}
@media (max-width: 700px) {
  .status-title {
    display: none;
  }
  .bottom {
    bottom: 19px;
  }
  .hotbar {
    padding: 6px;
    gap: 4px;
  }
  .hotbar button {
    width: 45px;
    min-width: 45px;
    height: 49px;
  }
  .status-bars {
    bottom: 108px;
  }
  .sound {
    bottom: 109px;
  }
  .desktop-hint {
    bottom: 2px;
  }
}
@media (max-width: 600px) {
  .top-left {
    left: 12px;
    top: 10px;
    gap: 7px;
    max-width: calc(100% - 176px);
  }
  .game-name {
    font-size: 10px;
    letter-spacing: 2px;
  }
  .location {
    font-size: 13px;
    padding: 6px 7px;
    gap: 5px;
  }
  .location-icon .pixel-icon {
    width: 14px;
    height: 14px;
  }
  .quest-pin {
    padding: 6px 7px;
    gap: 3px 5px;
    grid-template-columns: 14px minmax(0, 1fr);
    width: 100%;
  }
  .quest-pin b {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .quest-pin .pixel-icon {
    width: 14px;
    height: 14px;
  }
  .quest-pin kbd {
    display: none;
  }
  .quest-pin small {
    font-size: 11px;
  }
  .top-right {
    right: 12px;
    top: 14px;
    width: 150px;
  }
  .clock {
    padding: 8px 9px;
    gap: 6px;
  }
  .clock-day b {
    font-size: 14px;
    margin-left: 22px;
  }
  .clock-day #weather .pixel-icon {
    width: 16px;
    height: 16px;
  }
  .clock-day > span:last-child {
    font-size: 12px;
  }
  .clock > strong {
    font-size: 21px;
  }
  .money {
    font-size: 14px;
    gap: 3px;
  }
  .money .pixel-icon {
    width: 15px;
    height: 15px;
  }
  .quick-buttons {
    gap: 5px;
    margin-top: 7px;
  }
  .quick-buttons button {
    width: 33px;
    height: 33px;
    padding: 4px;
  }
  .quick-buttons .pixel-icon {
    width: 18px;
    height: 18px;
  }
  .quick-buttons #helpButton {
    font-size: 23px;
  }
  .bottom {
    bottom: 12px;
    width: max-content;
    max-width: 100%;
  }
  .hotbar {
    gap: 3px;
    padding: 5px;
  }
  .hotbar button {
    width: 42px;
    min-width: 42px;
    height: 46px;
    padding: 6px;
  }
  .hotbar .pixel-icon {
    width: 27px;
    height: 27px;
  }
  .hotbar kbd {
    display: none;
  }
  .hotbar button.active {
    transform: translateY(-2px);
  }
  .slot-count {
    font-size: 11px;
    right: 3px;
    bottom: 0;
  }
  .tool-label {
    font-size: 12px;
    padding: 4px 9px;
    bottom: calc(100% + 7px);
  }
  .status-bars {
    left: 12px;
    bottom: 85px;
    min-width: 121px;
    padding: 5px 7px;
  }
  .status-bars > div {
    height: 18px;
    gap: 5px;
  }
  .status-bars b {
    font-size: 12px;
    min-width: 29px;
  }
  .status-bars .pixel-icon {
    width: 12px;
    height: 12px;
  }
  .meter {
    width: 48px;
    height: 7px;
  }
  .meter.xp {
    height: 5px;
  }
  .sound {
    right: 12px;
    bottom: 85px;
    width: 34px;
    height: 34px;
    padding: 5px;
  }
  .sound .pixel-icon {
    width: 18px;
    height: 18px;
  }
  .desktop-hint {
    display: none;
  }
  .touch-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 147px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
  }
  .dpad {
    display: grid;
    grid-template-columns: 40px 40px 40px;
    grid-template-rows: 40px 40px;
    gap: 3px;
    pointer-events: auto;
  }
  .dpad button {
    background: #f0deb9db;
    border: 2px solid #876441;
    box-shadow:
      inset 0 1px #fff4d3,
      2px 2px #293c304d;
    color: #79613e;
    font: 18px monospace;
    touch-action: none;
  }
  .dpad button:first-child {
    grid-column: 2;
  }
  .dpad button:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .dpad button:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .dpad button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  .dpad button:active {
    background: #b7cb86;
  }
  #actionButton {
    pointer-events: auto;
    width: 65px;
    height: 65px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  #actionButton .pixel-icon {
    width: 21px;
    height: 21px;
  }
  #interaction {
    bottom: 242px;
    max-width: 92%;
    font-size: 13px;
    padding: 5px 8px;
    white-space: nowrap;
  }
  #interaction kbd {
    display: none;
  }
  #toast {
    top: 138px;
    max-width: 88%;
    width: max-content;
    font-size: 13px;
    padding: 7px 11px;
  }
  dialog.pixel-frame {
    padding: 19px;
    width: calc(100% - 24px);
    max-height: 84dvh;
  }
  dialog h2 {
    font-size: 25px;
  }
  dialog p {
    font-size: 15px;
  }
  .panel-header {
    top: -19px;
    margin: -19px -19px 18px;
  }
  #panelTabs {
    padding: 12px 38px 0 7px;
    gap: 2px;
  }
  #panelTabs button {
    padding: 9px 5px;
    font-size: 12px;
  }
  #panelTabs kbd {
    display: none;
  }
  .close {
    right: 6px;
    top: 9px;
    width: 27px;
    height: 27px;
  }
  .grid-items {
    gap: 6px;
  }
  .item {
    min-height: 105px;
    padding: 12px 5px 10px;
  }
  .item strong {
    font-size: 13px;
  }
  .item small {
    font-size: 11px;
  }
  .item .pixel-icon {
    width: 27px;
    height: 27px;
  }
  .shop-row,
  .quest-row,
  .recipe {
    gap: 10px;
    align-items: flex-start;
  }
  .shop-row b,
  .quest-row b,
  .recipe b {
    font-size: 15px;
  }
  .shop-row small,
  .quest-row small,
  .recipe small {
    font-size: 13px;
  }
  .shop-row button,
  .quest-row button,
  .recipe button {
    font-size: 12px;
    padding: 9px 8px;
  }
  .map-grid {
    grid-template-columns: 1fr;
  }
  .help-list {
    font-size: 14px;
  }
  #loading h1 {
    font-size: 42px;
  }
  #startBody {
    padding: 20px;
  }
}
@media (max-width: 350px) {
  .hotbar button {
    width: 36px;
    min-width: 36px;
  }
  .hotbar .pixel-icon {
    width: 24px;
    height: 24px;
  }
  .top-left {
    max-width: calc(100% - 162px);
  }
  .top-right {
    width: 140px;
  }
  .location {
    font-size: 12px;
  }
  .quest-pin .pixel-icon {
    display: none;
  }
  .quest-pin {
    grid-template-columns: 1fr;
  }
  .quest-pin small {
    grid-column: 1;
  }
  #panelTabs button {
    font-size: 11px;
    padding: 9px 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  button:active:not(:disabled) {
    translate: none;
  }
}

/* Querformat auf Touch-Geräten: Steuerung neben der Werkzeugleiste. */
@media (pointer: coarse) and (min-width: 601px) and (max-height: 600px) {
  .top-left {
    top: 10px;
    gap: 5px;
  }
  .location {
    padding: 6px 9px;
  }
  .quest-pin {
    padding: 6px 9px;
  }
  .top-right {
    top: 12px;
  }
  .status-bars {
    top: 164px;
    bottom: auto;
  }
  .status-title {
    display: none;
  }
  .touch-controls {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    pointer-events: none;
  }
  .dpad {
    display: grid;
    grid-template-columns: 36px 36px 36px;
    grid-template-rows: 36px 36px;
    gap: 3px;
    pointer-events: auto;
  }
  .dpad button {
    background: #f0deb9df;
    border: 2px solid #876441;
    color: #79613e;
    font: 18px monospace;
    touch-action: none;
  }
  .dpad button:first-child {
    grid-column: 2;
  }
  .dpad button:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .dpad button:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }
  .dpad button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
  }
  #actionButton {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 65px;
    height: 65px;
    font-size: 12px;
  }
  #actionButton .pixel-icon {
    width: 21px;
    height: 21px;
  }
  #interaction {
    bottom: 135px;
  }
  .sound {
    bottom: auto;
    top: 151px;
  }
  .desktop-hint {
    display: none;
  }
}
