:root {
  --bone: #E7E6E1; --card: rgba(231, 230, 225, .92); --night: #000F08; --muted: #4c534e; --lime: #AAFB3B;
  --line: rgba(0, 15, 8, .14);
  font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--night);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe0e8; }
canvas#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.card { position: fixed; background: var(--card); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.mono, .date, .note, .stats td, .log time { font-family: ui-monospace, "DM Mono", Menlo, monospace; font-size: 12px; }

.top { top: 12px; left: 12px; width: 300px; }
.brand { font-weight: 800; letter-spacing: .06em; }
.brand span { font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 6px; font-size: 12px; }
.date { margin-top: 6px; }
.sky { margin-top: 2px; color: var(--muted); }
.speeds { display: flex; gap: 4px; margin-top: 10px; }
.speeds button { flex: 1; padding: 6px 0; border: 1px solid var(--line); background: #fff8; border-radius: 8px; }
.speeds button[aria-pressed="true"] { background: var(--night); color: var(--lime); border-color: var(--night); }
.note { margin-top: 6px; color: var(--muted); }
.tools { display: flex; gap: 4px; margin-top: 10px; }
.tools button { flex: 1; padding: 6px 0; border: 1px solid var(--line); background: #fff8; border-radius: 8px; }
.tools button[aria-pressed="true"] { background: var(--lime); border-color: var(--night); font-weight: 700; }
.toolNote { display: none; }
body[data-tool="dig"] .toolNote, body[data-tool="raise"] .toolNote { display: block; }
body[data-tool="dig"] canvas#world, body[data-tool="raise"] canvas#world { cursor: crosshair; }

.stats { top: 12px; right: 12px; width: 300px; }
.stats table { width: 100%; border-collapse: collapse; }
.stats th { text-align: left; font-weight: 600; padding: 2px 0; }
.stats td { text-align: right; padding: 2px 0 2px 6px; }
.stats .h td, .stats .h th { color: var(--muted); font-weight: 400; font-size: 11px; }
.stats .lake { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.stats .lake .mono { color: var(--muted); font-size: 11px; }
.stats .dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }

.log { right: 12px; bottom: 12px; width: 330px; max-height: 42vh; display: flex; flex-direction: column; }
.logToggle { all: unset; cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.log ol { list-style: none; margin: 0; padding: 0; overflow: auto; }
.log li { padding: 5px 0; border-top: 1px solid var(--line); }
.log li.first, .log li.world { font-weight: 600; }
.log li.new { animation: flash 1.2s ease-out; }
.log time { display: block; color: var(--muted); font-size: 11px; }
@keyframes flash { from { background: var(--lime); } to { background: transparent; } }

.inspect { left: 12px; bottom: 12px; width: 300px; }
.inspect h3 { margin: 0 0 6px; font-size: 15px; }
.inspect dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
.inspect dt { color: var(--muted); }
.inspect dd { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.inspect .x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; }

.overlay { position: fixed; inset: 0; background: rgba(0, 15, 8, .35); display: grid; place-items: center; z-index: 5; }
.dialog { position: relative; width: min(460px, calc(100vw - 32px)); max-height: 80vh; overflow: auto; }
.dialog h2 { margin: 0 0 10px; font-size: 20px; }
.dialog ul { padding-left: 18px; margin: 8px 0; }
.dialog .diff td { padding: 2px 8px 2px 0; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--night); }
.cta { margin-top: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: var(--night); color: var(--lime); font-weight: 700; }

.modes { display: flex; gap: 4px; margin-top: 8px; }
.modes button { flex: 1; padding: 6px 0; border: 1px solid var(--line); background: #fff8; border-radius: 8px; font-weight: 600; }
.modes button[aria-pressed="true"] { background: var(--night); color: var(--lime); border-color: var(--night); }
body[data-mode="valley"] .tools, body[data-mode="valley"] .toolNote, body[data-mode="valley"] .stats,
body[data-mode="valley"] .inspect, body[data-mode="valley"] #newWorld { display: none !important; }
body[data-mode="garden"] .valleyNote, body[data-mode="garden"] .pinLabel, body[data-mode="garden"] .attrib { display: none !important; }
.pinLabel { position: fixed; left: 0; top: 0; margin: -46px 0 0 14px; z-index: 2; border: 1px solid var(--night); background: var(--lime);
  border-radius: 999px; padding: 5px 12px; font-weight: 700; white-space: nowrap; }
.attrib { display: block; max-width: min(560px, 60vw); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: var(--muted); background: var(--card); border-radius: 8px; padding: 3px 8px; }

.foot { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); }
.foot button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: 12px; }

@media (max-width: 760px) {
  .top { left: 8px; right: 8px; top: 8px; width: auto; padding: 10px 12px; }
  .stats { top: auto; bottom: 56px; left: 8px; right: auto; width: calc(50vw - 12px); font-size: 12px; padding: 8px 10px; }
  .stats .h { display: none; }
  .log { left: auto; right: 8px; bottom: 56px; width: calc(50vw - 12px); max-height: 34vh; padding: 8px 10px; }
  .log.closed ol { display: none; }
  .inspect { left: 8px; right: 8px; bottom: 56px; width: auto; z-index: 3; }
  .foot { bottom: 12px; left: 8px; transform: none; }
  .attrib { max-width: calc(100vw - 16px); }
}
.plantHere { margin: 10px 0 0 -70px; background: var(--card); }
.plantHere:disabled { background: var(--card); color: var(--muted); border-color: var(--line); }
.mapLabel { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; transform-origin: 0 0; margin: -10px 0 0 -30px;
  font: 600 13px/1 var(--mono, ui-monospace, monospace); letter-spacing: .14em; text-transform: uppercase; color: #f4f2ea;
  text-shadow: 0 1px 3px #000a, 0 0 12px #0006; white-space: nowrap; }
.foot .v1 { margin-left: 8px; font-size: 12px; color: var(--muted); }
body.gardenOnly .modes, body.gardenOnly .valleyNote, body.gardenOnly .pinLabel { display: none !important; }
body.gardenOnly .attrib { display: block !important; }
.world { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.world select { flex: 1; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff8; font: inherit; color: var(--night); font-weight: 600; }
.curve { display: block; width: 100%; height: 44px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.curveNote { font-size: 10px; opacity: .6; }

.jumps { display: flex; gap: 4px; margin-top: 6px; }
.jumps button { flex: 1; padding: 5px 0; border: 1px dashed var(--line); background: transparent; border-radius: 8px; font-size: 12px; }
.jumps button:disabled { opacity: .4; }
.dialog .ghost { margin-top: 10px; padding: 8px 14px; border: 1px solid var(--line); background: transparent; border-radius: 10px; }
/* A jump plays back like a time-lapse: the garden stays visible, the small dialog sits at the bottom. */
.overlay.jump { background: transparent; place-items: end center; padding-bottom: 72px; pointer-events: none; }
.overlay.jump .dialog { pointer-events: auto; max-width: 340px; }

/* bed labels in the botanical garden (src/view/plots.ts) */
.plotLabel { position: fixed; left: 0; top: 0; pointer-events: none; white-space: nowrap; font-size: 11px; line-height: 1.25; text-align: center;
  background: rgba(231, 230, 225, .86); border: 1px solid var(--line, #0002); border-radius: 6px; padding: 2px 6px; color: var(--night, #000F08); }
.plotLabel b { display: block; font-size: 12px; }
.plotLabel span { color: var(--muted, #555); font-variant-numeric: tabular-nums; }
.plotLabel.dead { opacity: .6; text-decoration: line-through; }
@media (max-width: 700px) { .plotLabel { font-size: 10px; } }
