@font-face { font-family: "Baskervville"; src: url("/fonts/baskervville.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #fbf3df; --paper-2: #f3e6c6; --ink: #3b2f22; --soft: #7a6650; --leaf: #3c5a46; --leaf-2: #5f8f6c;
  --berry: #b5483c; --honey: #e2a63d; --blush: #e9a6a0; --line: #d9c29a;
  --shadow: 0 3px 0 rgba(80, 52, 24, .22), 0 10px 24px rgba(40, 26, 12, .24);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe0b0; overscroll-behavior: none; }
body { font: 15px/1.45 "DM Sans", system-ui, sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
h1, h2, h3, .toast b, .who strong { font-family: "Baskervville", Georgia, serif; font-weight: 700; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; cursor: grab; outline: none; }
#scene:active { cursor: grabbing; }
#scene, #hud, #touch, #labels { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

button, .button {
  font: inherit; font-weight: 600; color: var(--ink); background: var(--paper); border: 2px solid var(--line); border-radius: 14px;
  padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; box-shadow: 0 2px 0 rgba(80, 52, 24, .18); transition: transform .08s, background .12s;
}
button:hover, .button:hover { background: #fff9ea; }
button:active, .button:active { transform: translateY(2px); box-shadow: none; }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.primary, .button.primary { background: var(--leaf); border-color: #2c4535; color: #fff8e6; }
button.primary:hover, .button.primary:hover { background: #48705a; }
button.on { border-color: var(--leaf); background: #dcead0; box-shadow: inset 0 0 0 1px var(--leaf); }
button.danger { background: var(--berry); border-color: #85332a; color: #fff; }
/* Not possible yet. Still pressable, so that it can say why. */
button.dim { color: var(--soft); border-style: dashed; }
button.dim > span { filter: grayscale(1); opacity: .55; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
kbd { font: 700 11px/1 "DM Sans", sans-serif; background: #fff8e8; color: var(--ink); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 6px; min-width: 20px; text-align: center; }

.card { background: color-mix(in srgb, var(--paper) 94%, transparent); border: 2px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }

/* Heads-up display */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
.who { position: absolute; top: calc(10px + var(--safe-t)); left: calc(10px + var(--safe-l)); display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; max-width: min(420px, 62vw); }
.paper::before { content: ""; position: absolute; top: -9px; left: 34px; width: 62px; height: 18px; background: rgba(233, 166, 160, .78); transform: rotate(-4deg); border-radius: 2px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; font-size: 28px; padding: 0; flex: none; background: var(--paper-2); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who strong { font-size: 18px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-text > span { font-size: 12px; color: var(--soft); }
.switch { align-self: center; padding: 5px 10px; min-height: 34px; font-size: 13px; }
.meters { display: grid; grid-template-columns: repeat(3, minmax(58px, 1fr)); gap: 2px 8px; margin-top: 4px; }
.meter { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 3px; font-size: 11px; }
.meter i { height: 7px; background: #e4d3ae; border-radius: 4px; overflow: hidden; display: block; }
.meter b { display: block; height: 100%; background: var(--leaf-2); border-radius: 4px; transition: width .5s; }
.meter.low b { background: var(--berry); }
.meter small { display: none; }

.wallet { position: absolute; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; gap: 14px; padding: 6px 16px; font-size: 13px; font-weight: 600; white-space: nowrap; border-radius: 30px; }
.wallet .address { color: var(--soft); }
.wallet .where { min-height: 0; padding: 0 8px; font-size: 12px; border-radius: 12px; box-shadow: none; }
.wallet .offline { color: var(--berry); }

.corner { position: absolute; top: calc(10px + var(--safe-t)); right: calc(10px + var(--safe-r)); }
.minimap { width: 138px; height: 138px; border-radius: 50%; border: 4px solid var(--paper); box-shadow: var(--shadow); cursor: pointer; display: block; }

.menu { position: absolute; left: calc(10px + var(--safe-l)); bottom: calc(10px + var(--safe-b)); display: flex; gap: 6px; }
.menu button { position: relative; flex-direction: column; gap: 1px; padding: 5px 6px; width: 62px; border-radius: 15px; }
.menu button span { font-size: 21px; line-height: 1.1; }
.menu button small { font-size: 10px; font-weight: 600; }
.menu em { position: absolute; top: -6px; right: -5px; background: var(--berry); color: #fff; font-style: normal; font-size: 11px; border-radius: 10px; padding: 0 6px; }

.quick { position: absolute; right: calc(12px + var(--safe-r)); bottom: calc(12px + var(--safe-b)); display: flex; align-items: flex-end; gap: 8px; }
button.round { position: relative; flex-direction: column; gap: 0; width: 62px; height: 62px; border-radius: 50%; padding: 0; }
button.round span { font-size: 24px; line-height: 1.05; }
button.round small { font-size: 10px; }
button.round kbd { position: absolute; top: -7px; right: -2px; }
button.round.big { width: 74px; height: 74px; background: var(--paper-2); }
button.round.small { width: 46px; height: 46px; }
button.round.small small, button.round.small kbd { display: none; }

.actions { position: absolute; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: max-content; max-width: min(760px, 94vw); }
.actions button { background: color-mix(in srgb, var(--paper) 92%, transparent); animation: rise .18s ease-out; }
.actions button.primary { background: var(--leaf); font-size: 16px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.reticle { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); transition: transform .15s, background .15s; pointer-events: none !important; }
.reticle.on { transform: scale(2); background: var(--honey); }
body[data-as="cat"] #hud::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px 30px rgba(50, 34, 70, .28); }

.objective { position: absolute; top: calc(52px + var(--safe-t)); left: 50%; transform: translateX(-50%); min-height: 0; padding: 5px 14px; font-size: 13px; white-space: nowrap; max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis; display: block; }
.objective:active { transform: translateX(-50%) translateY(2px); }

/* Names and speech above heads */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.tag, .bubble { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; will-change: transform; }
.tag { background: rgba(251, 243, 223, .88); border-radius: 12px; padding: 2px 10px 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); border: 1.5px solid rgba(217, 194, 154, .9); }
.tag b { display: block; font-size: 13px; }
.tag small { display: block; font-size: 10.5px; color: var(--soft); line-height: 1.15; }
.tag small:empty { display: none; }
.tag[data-kind="mine"] { border-color: var(--honey); }
.tag[data-kind="friend"] { border-color: var(--blush); }
.tag[data-kind="stray"] small { color: var(--berry); }
.bubble { background: #fff; border-radius: 16px; padding: 7px 13px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow); white-space: normal; width: max-content; max-width: 240px; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
.bubble.emote { font-size: 28px; padding: 3px 12px; }
.bubble.meow { font-style: italic; }

/* Touch movement stick */
#touch { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.stick { position: absolute; width: 112px; height: 112px; margin: -56px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .65); background: rgba(40, 30, 15, .18); display: none; place-items: center; }
.stick i { width: 48px; height: 48px; border-radius: 50%; background: rgba(251, 243, 223, .92); box-shadow: var(--shadow); }
.stick.active { display: grid; }
body.touch .stick:not(.active) { display: grid; left: calc(84px + var(--safe-l)); top: calc(100% - 180px - var(--safe-b)); opacity: .45; }

/* Toasts */
#toasts { position: fixed; top: calc(96px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; z-index: 30; pointer-events: none; width: min(520px, 92vw); }
.toast { background: var(--paper); border: 2px solid var(--line); border-radius: 14px; padding: 8px 16px; box-shadow: var(--shadow); font-weight: 600; text-align: center; animation: rise .25s ease-out; transition: opacity .4s; pointer-events: auto; }
.toast.error { border-color: var(--berry); }
.toast.discovery { border-color: var(--honey); background: #fff4d2; }
.toast.heart { border-color: var(--blush); }
.toast.coins { border-color: var(--honey); }
.toast.link { cursor: pointer; text-decoration: underline; }
.toast.gone { opacity: 0; }

/* Scrapbook sheets */
#sheet { position: fixed; inset: 0; z-index: 20; background: rgba(34, 26, 16, .45); display: flex; align-items: center; justify-content: center; padding: calc(14px + var(--safe-t)) calc(10px + var(--safe-r)) calc(14px + var(--safe-b)) calc(10px + var(--safe-l)); }
.paper { position: relative; width: min(520px, 100%); max-height: 100%; min-height: 0; display: flex; flex-direction: column; border-radius: 20px; border: 2px solid var(--line); box-shadow: var(--shadow);
  background: radial-gradient(circle at 18px 18px, rgba(150, 110, 60, .07) 2px, transparent 3px) 0 0 / 34px 34px, var(--paper); animation: rise .2s ease-out; }
.paper.wide { width: min(880px, 100%); }
.paper header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px; border-bottom: 2px dashed var(--line); }
.paper h2 { margin: 0; font-size: 23px; line-height: 1.2; }
.paper h3 { margin: 10px 0 0; font-size: 17px; }
.close { width: 40px; padding: 0; border-radius: 50%; flex: none; }
.sheet-body { overflow-y: auto; min-height: 0; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.sheet-body > * { flex: none; }
.sheet-body p { margin: 0; }
.note, small { color: var(--soft); }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; }
.album button { flex-direction: column; gap: 2px; padding: 7px 7px 6px; border-radius: 10px; background: #fff; }
.album img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.album span { font-size: 13px; line-height: 1.2; }
.album small { font-size: 11px; font-weight: 500; }
img.print { display: block; max-width: 100%; max-height: 55vh; margin: 0 auto; border: 8px solid #fff; border-radius: 4px; box-shadow: var(--shadow); }
.errand {display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 14px; border: 2px dashed var(--honey); border-radius: 14px; background: #fff8e2; }
.sheet-body p.said { font-size: 17px; line-height: 1.45; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.line { justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.list { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-weight: 700; font-size: 13px; }
input:not([type="checkbox"]), select, textarea { font: inherit; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fffdf6; color: var(--ink); min-width: 0; width: 100%; }
form.row input { flex: 1; width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { min-height: 34px; padding: 4px 11px; font-size: 13.5px; }
.chips.big button { font-size: 26px; padding: 6px 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatches button { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.swatches button.on { box-shadow: 0 0 0 3px var(--leaf); }
.swatches.coats button { width: 44px; height: 44px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; min-height: 32px; }
.check input { width: 20px; height: 20px; accent-color: var(--leaf); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
.item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 8px; border-radius: 16px; border: 2px solid var(--line); background: #fffaf0; justify-content: flex-start; }
button.item { min-height: 108px; }
.item .big { font-size: 32px; line-height: 1.2; }
.item small { font-size: 11.5px; line-height: 1.25; }
/* Room for "You have 5" and "Need 3 more coins" is always kept, so buying never moves a button. */
.item .owned { height: 2.5em; overflow: hidden; }
.item button { margin-top: auto; min-height: 34px; padding: 3px 10px; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; }
.pick { flex-direction: column; gap: 3px; padding: 12px 8px; border-radius: 18px; }
.face { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 29px; background: var(--paper-2); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); flex: none; }
.catcard { display: flex; gap: 11px; align-items: center; padding: 10px; border: 2px solid var(--line); border-radius: 16px; background: #fffaf0; }
.catcard strong { display: block; }
.catcard small { display: block; font-size: 12px; }
.catcard .away { color: var(--berry); font-weight: 600; margin: 3px 0 5px; }
.catcard .stack button { font-size: 13.5px; }
.wants { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.wants span { font-size: 12px; font-weight: 600; color: var(--berry); border: 1.5px solid currentColor; border-radius: 99px; padding: 0 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.creator { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; align-items: start; }
.creator-view { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.turntable { width: 100%; height: 330px; display: block; border-radius: 18px; background: linear-gradient(#cfe6f2 0 60%, #cdd9a8 60%); border: 2px solid var(--line); touch-action: none; cursor: ew-resize; }
.creator-form { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
/* Keep Next and Save in reach on short screens. */
.creator-form > .row.end, .creator-form > button.primary { position: sticky; bottom: -18px; z-index: 2; margin-bottom: -6px; padding-block: 10px; background: var(--paper); }
.phrase { justify-content: flex-start; text-align: left; }
.chatlog { height: min(300px, 40vh); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.chatlog p { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 11px; max-width: 82%; align-self: flex-start; overflow-wrap: anywhere; }
.chatlog p.mine { align-self: flex-end; background: #dcead0; }
.bigmap { width: 100%; height: auto; max-height: 46vh;object-fit: contain; border-radius: 14px; border: 2px solid var(--line); cursor: pointer; touch-action: manipulation; background: #cdd9a8; }
.mapview.zoomed { overflow: auto; height: 52vh; border-radius: 14px; overscroll-behavior: contain; }
.mapview.zoomed .bigmap { width: 1100px; max-width: none; max-height: none; }
.mapinfo { justify-content: space-between; min-height: 40px; }
.stops { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 7px; }
button.stop { justify-content: flex-start; text-align: left; padding: 6px 10px; gap: 9px; }
.stop > span:first-child { font-size: 22px; }
.stop strong, .stop small { display: block; line-height: 1.2; }
.stop small { font-size: 11.5px; font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li::before { content: "☐ "; }
.checks li.done { text-decoration: line-through; color: var(--soft); }
.checks li.done::before { content: "☑ "; }
.sticker { border: 2px dashed var(--line); border-radius: 12px; padding: 4px 10px; font-size: 13px; color: var(--soft); }
.sticker.on { border-style: solid; border-color: var(--honey); background: #fff4d2; color: var(--ink); transform: rotate(-1.5deg); }
.entries { padding-left: 18px; margin: 0; font-size: 14px; }
.entries li { margin-bottom: 4px; }
.orders { display: flex; gap: 8px; justify-content: center; }
.orders span { display: flex; flex-direction: column; align-items: center; font-size: 34px; min-width: 54px; background: #fffaf0; border: 2px solid var(--line); border-radius: 14px; padding: 4px; }
.orders span small, .orders b { font-size: 11px; }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; margin: 0; }
dl.keys dt { font-weight: 700; }
dl.keys dd { margin: 0; }
details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
details > * + * { margin-top: 8px; }
hr { border: 0; border-top: 2px dashed var(--line); width: 100%; }

.placing { position: fixed; left: 50%; top: calc(58px + var(--safe-t)); transform: translateX(-50%); z-index: 12; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; padding: 8px 12px; width: max-content; max-width: 94vw; }
.veil { position: fixed; inset: 0; z-index: 15; background: radial-gradient(circle, rgba(60, 40, 20, .35), #20180f 80%); animation: fade .18s ease-in; transition: opacity .35s; pointer-events: none; }
.veil.gone { opacity: 0; }
.flash { position: fixed; inset: 0; z-index: 14; background: #fff; pointer-events: none; animation: flash .45s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #fff4d6, #e2c98f); transition: opacity .6s; }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-card { text-align: center; padding: 20px; }
.boot-card h1 { font-size: 44px; margin: 6px 0 2px; }
.boot-bar { width: 220px; height: 10px; border-radius: 6px; background: #d9c29a; margin: 12px auto 0; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 5%; background: var(--leaf); transition: width .4s; }

/* Narrow and short screens */
@media (max-width: 1080px) {
  .wallet { top: auto; bottom: calc(84px + var(--safe-b)); left: calc(10px + var(--safe-l)); transform: none; gap: 9px; padding: 4px 11px; font-size: 12px; }
  .wallet .address { display: none; }
  .actions { bottom: calc(122px + var(--safe-b)); }
  /* Under the name card, which now reaches past the middle of the screen. */
  .objective { top: calc(88px + var(--safe-t)); left: calc(10px + var(--safe-l)); transform: none; }
  .objective:active { transform: translateY(2px); }
  #toasts { top: calc(124px + var(--safe-t)); }
}
/* A narrow desktop window: slimmer menu buttons so they clear the round ones. */
@media (max-width: 900px) {
  .menu button { width: 48px; padding: 4px 0; }
  .menu button small { font-size: 9px; }
}
@media (max-width: 760px), (pointer: coarse) {
  kbd { display: none; }
  .minimap { width: 96px; height: 96px; border-width: 3px; }
  .who { max-width: calc(100vw - 128px); padding: 7px 8px; gap: 7px; }
  .avatar { width: 40px; height: 40px; font-size: 22px; }
  .who strong { font-size: 15px; }
  .switch { display: none; }
  .avatar { position: relative; }
  .avatar::after { content: "⇄"; position: absolute; right: -6px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; background: var(--leaf); color: #fff8e6; font-size: 13px; line-height: 18px; }
  .meters { grid-template-columns: repeat(3, minmax(44px, 1fr)); gap: 1px 5px; }
  /* The menu becomes a column down the right edge, clear of both thumbs. */
  .menu { left: auto; right: calc(6px + var(--safe-r)); top: calc(116px + var(--safe-t)); bottom: auto; flex-direction: column; gap: 4px; }
  .menu button { width: 54px; min-height: 42px; height: 42px; padding: 0; gap: 0; border-radius: 13px; }
  .menu button small { font-size: 9px; line-height: 1.1; }
  .menu button span { font-size: 18px; }
  .quick { right: calc(10px + var(--safe-r)); bottom: calc(14px + var(--safe-b)); display: grid; grid-template-columns: repeat(2, 58px); justify-items: center; align-items: center; gap: 8px; direction: rtl; }
  button.round { width: 56px; height: 56px; direction: ltr; }
  button.round.big { width: 64px; height: 64px; }
  .actions { bottom: calc(224px + var(--safe-b)); right: 8px; left: 8px; transform: none; width: auto; max-width: none; }
  .actions button { font-size: 14px; padding: 6px 12px; }
  /* Stay left of the minimap. */
  .wallet { bottom: auto; top: calc(88px + var(--safe-t)); max-width: calc(100vw - 124px); white-space: nowrap; }
  .wallet .where .wide, .wallet .season { display: none; }
  body[data-as="cat"] .wallet { top: calc(112px + var(--safe-t)); }
  .objective { top: calc(125px + var(--safe-t)); max-width: calc(100vw - 80px); }
  #toasts { top: calc(162px + var(--safe-t)); width: 76vw; }
  .toast { font-size: 13px; padding: 6px 12px; }
  .creator { grid-template-columns: 1fr; }
  .creator-view { position: static; }
  .turntable { height: 220px; }
  .paper h2 { font-size: 20px; }
  .sheet-body { padding: 12px; }
}
@media (max-height: 520px) {
  .menu { flex-direction: row; top: auto; bottom: calc(8px + var(--safe-b)); left: 36%; right: auto; transform: translateX(-30%); }
  .menu button { width: 46px; padding: 3px 0; }
  .menu button small { font-size: 8.5px; }
  .quick { grid-template-columns: repeat(3, 52px); }
  button.round { width: 50px; height: 50px; }
  button.round.big { width: 56px; height: 56px; }
  .actions { bottom: calc(58px + var(--safe-b)); left: 22%; right: 200px; transform: none; width: auto; max-width: none; }
  .wallet { top: calc(8px + var(--safe-t)); bottom: auto; left: 50%; transform: translateX(-30%); }
  body[data-as="cat"] .wallet { top: calc(8px + var(--safe-t)); }
  .minimap { width: 84px; height: 84px; }
  #toasts { top: calc(46px + var(--safe-t)); }
  .objective { top: calc(74px + var(--safe-t)); max-width: 40vw; }
  .creator { grid-template-columns: 220px 1fr; }
  .turntable { height: 200px; }
  .creator-view { position: sticky; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
