html {
  --color-bg: oklch(92% 0.015 150);
  --color-text: oklch(29% 0.035 157);
  --color-muted: oklch(44% 0.028 157);
  --color-accent: oklch(42% 0.075 153);
  --color-surface: oklch(98% 0.008 140);
  --color-line: oklch(80% 0.025 150);
  --font-body: 'Figtree', sans-serif;
  --font-heading: 'Bricolage Grotesque', sans-serif;
  --space: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-synthesis: none;
  height: 100%;
  accent-color: var(--color-accent);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100%; font-size: 1rem; line-height: 1.5; overflow: hidden; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button, summary { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, canvas:focus-visible, .animal-inspector:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 5px; }
::selection { background: var(--color-accent); color: var(--color-surface); }
.experience { position: relative; isolation: isolate; height: 100%; overflow: hidden; }
.world-loading { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(25 38 29 / 72%); }
.world-loading-card { width: min(460px, 100%); padding: 12px 12px 22px; text-align: center; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 14px; box-shadow: 0 15px 40px rgb(0 0 0 / 25%); }
.world-loading-image { display: block; width: 100%; height: auto; border-radius: 8px; }
.world-loading-card h2 { margin: 14px 0 8px; font: 600 1.4rem var(--font-heading); }
.world-loading-card p { margin: 0; font-size: .875rem; }
.world-loading-card button { margin-top: 16px; padding: 7px 16px; color: var(--color-surface); background: var(--color-accent); border: 0; border-radius: 6px; }
.clock-sync-status { position: absolute; z-index: 5; top: 150px; left: 16px; padding: 8px; background: var(--color-surface); border-radius: 6px; font-size: .75rem; }
#landscape { position: absolute; inset: 0; }
#landscape canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#landscape canvas:active { cursor: grabbing; }
#landscape canvas.orbiting { cursor: move; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.header { position: absolute; top: 36px; left: 40px; right: 40px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; pointer-events: none; }
.terrain-notice { position: absolute; z-index: 6; top: 145px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: 0 5px 20px oklch(30% .025 150 / .12); font-size: .8125rem; }
.terrain-notice a { color: var(--color-accent); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 16px; pointer-events: auto; padding-top: 4px; }
.new-world { display: flex; align-items: center; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-line); padding: .7em 1.1em; border-radius: 7px; font-size: .8125rem; font-weight: 600; transition: background 180ms, transform 180ms; box-shadow: 0 2px 4px oklch(30% .03 150 / .03); }
.new-world svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.new-world:hover { background: oklch(95% .025 150); transform: translateY(-1px); }
.help { position: relative; }
.help > summary { list-style: none; display: grid; place-items: center; height: 28px; width: 28px; border: 1px solid var(--color-muted); border-radius: 50%; cursor: pointer; font-weight: 500; font-size: .875rem; background: rgb(255 255 255 / 30%); }
.help > summary::-webkit-details-marker { display: none; }
.help > summary:hover, .help[open] > summary { background: var(--color-surface); }
.help-panel { position: absolute; z-index: 5; top: 44px; right: 0; width: min(320px, calc(100vw - 40px)); padding: 24px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 12px; box-shadow: 0 12px 35px oklch(25% .02 150 / .12); }
.help-panel h2 { font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.2; font-weight: 600; margin: 0 0 16px; }
.help-panel p { font-size: .875rem; color: var(--color-muted); margin: 12px 0 0; }
.update-log-frame { display: block; width: 100%; height: 180px; border: 0; background: var(--color-surface); color: var(--color-text); }
.compass { position: static; width: 32px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; background: rgb(255 255 255 / 30%); border-radius: 50%; }
.compass > span { color: var(--color-muted); font-size: .625rem; font-weight: 600; }
.compass svg { width: 32px; height: 32px; fill: none; stroke: var(--color-muted); stroke-width: 1; }
.compass svg circle { stroke: var(--color-line); }
.compass-needle { fill: var(--color-accent); stroke: var(--color-accent); }
.footer { position: absolute; bottom: 30px; left: 40px; right: 40px; display: flex; justify-content: center; align-items: end; pointer-events: none; }
.ecosystem { display: flex; align-items: flex-start; gap: 9px; padding-bottom: 8px; }
.status-mark { width: 6px; height: 6px; background: var(--color-accent); border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }
.ecosystem > div { display: flex; flex-direction: column; gap: 4px; }
#status { font-size: .75rem; font-weight: 500; }
#world-clock { font-size: .6875rem; font-variant-numeric: tabular-nums; }
.ecosystem small { color: var(--color-muted); font-size: .625rem; }
.navigation { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 100%; }
.hint { margin: 0; font-size: .6875rem; color: var(--color-muted); }
.hint span { margin: 0 8px; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 7px; background: var(--color-surface); border: 1px solid oklch(85% .018 150); border-radius: 12px; box-shadow: 0 5px 20px oklch(30% .025 150 / .08), 0 1px 2px oklch(30% .025 150 / .04); pointer-events: auto; }
.tool-group { display: flex; align-items: center; gap: 4px; }
.water-controls { flex: 0 0 auto; }
.toolbar:has(.water-controls) { flex-wrap: wrap; }
.toolbar-shell { max-width: calc(100vw - 48px); align-self: center; }
.toolbar { width: max-content; max-width: 100%; flex-wrap: nowrap !important; }
.toolbar-frame { width: max-content; min-width: 0; max-width: calc(100vw - 120px); transition: width 280ms ease, height 280ms ease; }
.toolbar-frame.animating, .toolbar-frame.collapsed { overflow: hidden; }
.toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar-controls > * { flex-shrink: 0; }
.account-tool { color: inherit; text-decoration: none; }
#toolbar-toggle svg { transition: transform 280ms ease; }
#toolbar-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.tool { display: grid; place-items: center; width: 37px; height: 36px; border: 0; background: transparent; border-radius: 6px; transition: background 160ms, color 160ms; }
.tool:hover { background: oklch(91% .025 150); }
.tool.selected { color: var(--color-surface); background: var(--color-accent); }
.tool.selected:hover { background: oklch(35% .07 153); }
.tool:disabled { cursor: default; color: var(--color-muted); background: oklch(91% .012 150); }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.divider { width: 1px; height: 22px; background: var(--color-line); margin: 0 2px; }
#zoom { font-size: .6875rem; font-variant-numeric: tabular-nums; width: 39px; text-align: center; }
.performance-metrics { position: absolute; top: auto; right: 0; bottom: 62px; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 2px 10px; color: var(--color-muted); font-size: .5625rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ecosystem, .hint, .performance-metrics { background: rgb(255 255 255 / 30%); border-radius: 6px; }
.ecosystem { padding: 8px 10px; }
.hint, .performance-metrics { padding: 4px 8px; }
.toolbar:has(#terrain-resolution-panel), .toolbar:has(#cloud-humidity-panel), .toolbar:has(#terrain-ceiling-panel), .toolbar:has(#cloud-resolution-panel), .toolbar:has(#terrain-lod-panel) { flex-wrap: wrap; }
#terrain-resolution-panel, #cloud-humidity-panel, #terrain-ceiling-panel, #cloud-resolution-panel, #terrain-lod-panel { display: flex; flex: 1 1 100%; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px 6px; border-top: 1px solid var(--color-line); color: var(--color-text); pointer-events: auto; }
#terrain-resolution-panel[hidden], #cloud-humidity-panel[hidden], #terrain-ceiling-panel[hidden], #cloud-resolution-panel[hidden], #terrain-lod-panel[hidden] { display: none; }
#terrain-resolution-panel label, #cloud-humidity-panel label, #terrain-ceiling-panel label, #cloud-resolution-panel label, #terrain-lod-panel label { font-size: .75rem; font-weight: 600; white-space: nowrap; }
#terrain-resolution-panel input[type="range"], #cloud-humidity-panel input[type="range"], #terrain-ceiling-panel input[type="range"], #cloud-resolution-panel input[type="range"], #terrain-lod-panel input[type="range"] { flex: 1 1 120px; width: 100%; min-width: 80px; accent-color: var(--color-accent); cursor: pointer; }
#terrain-resolution-panel input[type="range"]:focus-visible, #cloud-humidity-panel input[type="range"]:focus-visible, #terrain-ceiling-panel input[type="range"]:focus-visible, #cloud-resolution-panel input[type="range"]:focus-visible, #terrain-lod-panel input[type="range"]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
#terrain-resolution-panel output, #cloud-humidity-panel output, #terrain-ceiling-panel output, #cloud-resolution-panel output, #terrain-lod-panel output { min-width: 3ch; text-align: right; font-size: .75rem; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) {
  .compass { right: 30px; }
  .footer { left: 28px; right: 28px; gap: 12px; }
  .toolbar { gap: 4px; }
  .tool { width: 32px; }
}
@media (max-width: 760px) {
  .toolbar:has(#terrain-resolution-panel), .toolbar:has(#cloud-humidity-panel), .toolbar:has(#terrain-ceiling-panel), .toolbar:has(#cloud-resolution-panel), .toolbar:has(#terrain-lod-panel) { max-width: calc(100vw - 48px); }
  #terrain-resolution-panel, #cloud-humidity-panel, #terrain-ceiling-panel, #cloud-resolution-panel, #terrain-lod-panel { gap: 8px; padding: 8px 6px 5px; }
  .header { top: 24px; left: 24px; right: 24px; gap: 12px; }
  .header-actions { gap: 12px; padding-top: 1px; }
  .new-world { padding: .65em .8em; font-size: .75rem; gap: 7px; }
  .help > summary { width: 24px; height: 24px; }
  .compass { width: 40px; }
  .compass svg { width: 40px; height: 40px; }
  .footer { bottom: 22px; left: 24px; right: 24px; }
  .ecosystem small { font-size: .5625rem; }
  .performance-metrics { display: none; }
  .tool { width: 34px; height: 37px; }
  .toolbar { gap: 5px; }
  .toolbar-controls { gap: 4px; }
  .toolbar:has(.water-controls) { max-width: calc(100vw - 48px); }
  .hint { font-size: .6875rem; }
}
@media (max-width: 420px) {
  .footer { left: 16px; right: 16px; }
  .toolbar-shell { max-width: calc(100vw - 32px); }
  .toolbar:has(.water-controls) { max-width: 100%; }
  .toolbar-frame { max-width: calc(100vw - 86px); }
  #terrain-resolution-panel, #cloud-humidity-panel, #terrain-ceiling-panel, #cloud-resolution-panel, #terrain-lod-panel, #cloud-update-panel, #rain-threshold-panel { max-width: calc(100vw - 32px); flex-wrap: wrap; }
  #terrain-resolution-panel label, #cloud-humidity-panel label, #terrain-ceiling-panel label, #cloud-resolution-panel label, #terrain-lod-panel label, #cloud-update-panel label, #rain-threshold-panel label { white-space: normal; }
}
@media (max-height: 600px) and (min-width: 761px) {
  .header { top: 22px; }
  .footer { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.toolbar:has(#rain-threshold-panel) { flex-wrap: wrap; }
#rain-threshold-panel { display: flex; flex: 1 1 100%; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px 6px; border-top: 1px solid var(--color-line); color: var(--color-text); pointer-events: auto; }
#rain-threshold-panel[hidden] { display: none; }
#rain-threshold-panel label { font-size: .75rem; font-weight: 600; white-space: nowrap; }
#rain-threshold-panel input[type="range"] { flex: 1 1 120px; width: 100%; min-width: 80px; accent-color: var(--color-accent); cursor: pointer; }
#rain-threshold-panel input[type="range"]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
#rain-threshold-panel output { min-width: 3ch; text-align: right; font-size: .75rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .toolbar:has(#rain-threshold-panel) { max-width: calc(100vw - 48px); }
  #rain-threshold-panel { gap: 8px; padding: 8px 6px 5px; }
}
.optimization-menu { position: relative; }
.optimization-menu > summary { list-style: none; cursor: pointer; }
.optimization-menu > summary::-webkit-details-marker { display: none; }
.optimization-menu[open] > summary { color: var(--color-surface); background: var(--color-accent); }
.optimization-menu[open] > summary:hover { background: oklch(35% .07 153); }
.optimization-panel { position: absolute; z-index: 10; right: 0; bottom: calc(100% + 12px); display: grid; gap: 10px; width: min(300px, calc(100vw - 32px)); padding: 18px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 12px; box-shadow: 0 12px 35px oklch(25% .02 150 / .12); pointer-events: auto; }
.optimization-panel h2 { margin: 0 0 2px; font-family: var(--font-heading); font-size: 1.05rem; line-height: 1.2; }
.optimization-panel label { font-size: .75rem; font-weight: 600; }
.optimization-panel .optimization-check { display: flex; align-items: center; gap: 8px; }
.optimization-panel input, .optimization-panel select { accent-color: var(--color-accent); font: inherit; }
.optimization-panel select { width: 100%; padding: 7px 9px; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 6px; }
.optimization-panel p { margin: 0; color: var(--color-muted); font-size: .6875rem; }
.optimization-panel :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .optimization-panel { right: -2px; }
}
.toolbar:has(#cloud-update-panel) { flex-wrap: wrap; }
#cloud-update-panel { display: flex; flex: 1 1 100%; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px 6px; border-top: 1px solid var(--color-line); color: var(--color-text); pointer-events: auto; }
#cloud-update-panel[hidden] { display: none; }
#cloud-update-panel label { font-size: .75rem; font-weight: 600; white-space: nowrap; }
#cloud-update-panel input[type="range"] { flex: 1 1 120px; width: 100%; min-width: 80px; accent-color: var(--color-accent); cursor: pointer; }
#cloud-update-panel input[type="range"]:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }
#cloud-update-panel output { min-width: 5ch; text-align: right; font-size: .75rem; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  #cloud-update-panel label, #rain-threshold-panel label { white-space: normal; }
}
@media (max-width: 760px) {
  .toolbar:has(#cloud-update-panel) { max-width: calc(100vw - 48px); }
  #cloud-update-panel { gap: 8px; padding: 8px 6px 5px; }
}
.animal-inspector { position: absolute; z-index: 4; top: 112px; right: 32px; display: grid; gap: 12px; width: min(348px, calc(100vw - 32px)); max-height: calc(100% - 210px); overflow: auto; padding: 0 16px; color: #302419; background: radial-gradient(circle, rgb(91 64 35 / 11%) 1px, transparent 1.4px) 0 0 / 11px 11px, linear-gradient(90deg, #a9936c, #dfcfaa 7%, #dbcaa4 90%, #ae9872); border: 1px solid #7d694b; border-radius: 12px 12px 8px 8px; box-shadow: inset 0 0 30px rgb(78 50 21 / 25%), 0 12px 35px rgb(20 15 9 / 35%); pointer-events: auto; font-family: Georgia, serif; scrollbar-width: none; -ms-overflow-style: none; }
.animal-inspector::-webkit-scrollbar { display: none; width: 0; height: 0; }
.animal-inspector::before, .animal-inspector::after { content: ''; height: 14px; margin: 0 -16px; border: 1px solid #796342; border-radius: 50% / 45%; background: linear-gradient(#a78f69, #e1d0aa 40%, #b39a70 75%, #866f4e); box-shadow: 0 3px 4px rgb(51 36 20 / 30%); }
.animal-inspector[data-selected="false"] { display: none; }
.inhabitant-heading { position: relative; text-align: center; }
#animal-close { position: absolute; z-index: 2; top: -8px; right: -8px; width: 30px; height: 30px; border: 1px solid #827252; border-radius: 4px; background: #e4d7b8; font: 1.3rem/1 sans-serif; }
.inhabitant-portrait { display: grid; place-items: center; width: 122px; height: 130px; margin: 0 auto -12px; overflow: hidden; background: radial-gradient(circle at 35% 20%, #414844, #1d2422 75%); border: 4px double #aeb1a6; border-radius: 45% 45% 50% 50% / 8% 8% 60% 60%; box-shadow: 0 0 0 3px #303534, 0 6px 10px #574a38; }
.inhabitant-portrait svg { width: 80%; height: 92%; fill: #101413; }
.portrait-wildlife, .animal-inspector[data-kind="wildlife"] .portrait-villager { display: none; }
.animal-inspector[data-kind="wildlife"] .portrait-wildlife { display: block; }
.inhabitant-role { position: relative; margin: 0; color: #f0c972; text-shadow: 1px 2px 2px #24170d, -1px -1px #24170d; font-size: 1rem; font-weight: bold; }
.inhabitant-heading h3 { position: relative; margin: 0; color: #f1cb75; text-shadow: 2px 2px 1px #24170d, -1px -1px #24170d; font-size: 1.75rem; line-height: 1.1; overflow-wrap: anywhere; }
.inhabitant-kind { margin: 4px 0 0; color: #5b4935; font: 600 .68rem var(--font-body); }
.animal-inspector[data-kind="villager"] .inhabitant-species { display: none; }
.inhabitant-scroll-hint { margin: 3px 0 0; color: #705b40; font: .65rem var(--font-body); }
.inhabitant-section { padding: 10px; background: rgb(239 226 196 / 64%); border: 4px solid #444740; border-radius: 4px; box-shadow: inset 0 0 0 1px #9b927e, 0 3px 5px rgb(41 29 18 / 25%); }
.inhabitant-section > h3 { margin: -22px 0 8px; text-align: center; color: #f0c972; text-shadow: 1px 2px #24170d, -1px -1px #24170d, 1px -1px #24170d; font-size: 1.05rem; }
.inhabitant-action { width: fit-content; max-width: 100%; margin: 0 auto 6px; padding: 3px 8px; background: #c4b799; border: 1px solid #a79879; border-radius: 3px; font-size: .72rem; font-weight: bold; text-align: center; text-transform: uppercase; }
.inhabitant-action::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #c97932; }
.inhabitant-thought { margin: 0 0 8px; text-align: center; font-size: .75rem; overflow-wrap: anywhere; }
.animal-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0; padding-top: 7px; border-top: 1px solid #b5a789; }
.animal-details > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 6px; padding: 4px 5px; background: rgb(152 135 99 / 18%); border-radius: 3px; }
.animal-details .detail-wide { grid-column: 1 / -1; }
.animal-details dt { color: #715943; font-size: .62rem; font-weight: bold; text-transform: uppercase; }
.animal-details dd { margin: 0; overflow-wrap: anywhere; font-size: .68rem; font-weight: bold; }
.inhabitant-vitals { display: grid; gap: 7px; }
.inhabitant-vitals > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .65rem; font-weight: bold; }
.inhabitant-vitals label { text-transform: uppercase; letter-spacing: .04em; }
.inhabitant-vitals progress { grid-column: 1 / -1; width: 100%; height: 9px; appearance: none; border: 1px solid #644b32; border-radius: 5px; overflow: hidden; background: #34231b; }
.inhabitant-vitals progress::-webkit-progress-bar { background: #34231b; }
.inhabitant-vitals progress::-webkit-progress-value { background: #b83439; }
.inhabitant-vitals progress::-moz-progress-bar { background: #b83439; }
.inhabitant-vitals #inhabitant-hunger::-webkit-progress-value { background: #dc931c; }
.inhabitant-vitals #inhabitant-hunger::-moz-progress-bar { background: #dc931c; }
.inhabitant-vitals #inhabitant-thirst::-webkit-progress-value { background: #268ead; }
.inhabitant-vitals #inhabitant-thirst::-moz-progress-bar { background: #268ead; }
.friends-label { display: flex; justify-content: space-between; margin: 0 0 5px; font-size: .65rem; font-weight: bold; text-transform: uppercase; }
.inhabitant-friends { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0 0 8px; padding: 0; }
.inhabitant-friends li { padding: 3px 6px; color: #f7e6bd; background: #463629; border-radius: 3px; font-size: .65rem; overflow-wrap: anywhere; }
.inhabitant-friends .no-friends { color: #715943; background: transparent; padding-left: 0; }
.inhabitant-map-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-legend { display: grid; gap: 3px; font-size: .67rem; }
.map-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #147253; }
.map-legend span + span::before { border-radius: 0; background: #9c4a19; transform: rotate(45deg); }
.inhabitant-map { position: relative; width: 120px; height: 65px; overflow: hidden; border: 1px solid #9c8966; border-radius: 3px; background: linear-gradient(90deg, transparent 49%, #b8a986 50%, transparent 51%) 0 0 / 25% 100%, linear-gradient(transparent 49%, #b8a986 50%, transparent 51%) 0 0 / 100% 25%, #d2c19d; }
.map-marker { position: absolute; width: 8px; height: 8px; transform: translate(-50%, -50%); border: 1px solid #eee1bd; border-radius: 50%; background: #147253; }
.home-marker { border-radius: 0; background: #9c4a19; transform: translate(-50%, -50%) rotate(45deg); }
#animal-next { justify-self: center; padding: .5em .9em; color: #f8e9c2; background: #454339; border: 1px solid #2b2b25; border-radius: 4px; font-size: .75rem; font-weight: bold; }
#animal-next:hover { background: #60573e; }
#resident-chat { border-top: 1px solid #a79776; padding-top: 10px; font-size: .75rem; }
#resident-chat h3 { margin: 0 0 6px; font-size: .85rem; }
#chat-history { max-height: 7rem; overflow: auto; overflow-wrap: anywhere; list-style: none; margin: 0; padding: 0; }
#chat-history li + li { margin-top: 4px; }
#chat-status { margin: 4px 0; color: #715943; }
#chat-form { display: flex; gap: 6px; }
#chat-message { min-width: 0; flex: 1; padding: 5px; }
@media (max-width: 760px) {
  .header { flex-wrap: wrap; }
  .header-actions { gap: 8px; }
  .compass { width: 32px; }
  .compass > span { font-size: .5rem; }
  .compass svg { width: 32px; height: 32px; }
  .animal-inspector { top: 112px; right: 16px; width: min(320px, calc(100vw - 32px)); max-height: calc(100% - 220px); }
}
