:root { --cream: #f6ecdc; --ink: #3a2a1e; --wood: #7a4d2b; --amber: #f2a33a; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: "Nunito", "Segoe UI", system-ui, sans-serif; color: var(--ink); }
body.app { overflow: hidden; background: #efe3d0; touch-action: none; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
header { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px; background: linear-gradient(#2b221cee, #2b221cd0); color: #f6ecdc; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand img { width: 26px; height: 26px; }
.brand em { font-style: normal; font-size: 11px; background: #ffffff22; padding: 2px 7px; border-radius: 9px; }
.actions { display: flex; gap: 8px; }
header button { border: 0; border-radius: 9px; background: #8a5a34; color: #fff4e0; font: inherit; cursor: pointer; padding: 6px 12px; }
#recenter { font-size: 18px; padding: 4px 11px; }
.sim-btn { display: flex; flex-direction: column; align-items: center; line-height: 1.05; background: #a8702f !important; box-shadow: inset 0 0 0 2px #ffd27a88; }
.sim-btn small { font-size: 9px; letter-spacing: .12em; font-weight: 800; color: #ffe3a8; }
.sim-btn b { font-size: 14px; }
.sim-btn:disabled { opacity: .75; cursor: default; }
#sim-banner { display: none; position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 6; background: var(--amber); color: #3a2208; font-weight: 800;
  letter-spacing: .06em; padding: 5px 14px; border-radius: 999px; font-size: 13px; box-shadow: 0 2px 10px #0003; white-space: nowrap; }
body.sim #sim-banner { display: block; }
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.tag { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 5px; background: #fffaf1; border-radius: 8px;
  padding: 2px 8px 2px 6px; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px #0003; white-space: nowrap; will-change: transform; }
.tag i { width: 8px; height: 8px; border-radius: 50%; background: #c6b39b; }
.tag[data-s="needs_jools"] { background: #ffe2b0; box-shadow: 0 0 0 2px var(--amber), 0 1px 6px #0003; }
.tag[data-s="error"] { background: #ffd8d4; box-shadow: 0 0 0 2px #e0524a; }
#card { position: fixed; z-index: 7; width: 250px; background: #fffaf1; border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 24px #0004; font-size: 13px; pointer-events: none; }
#card .c-h { display: flex; align-items: center; gap: 7px; }
#card .c-h i { width: 14px; height: 14px; border-radius: 5px; }
#card .c-h b { font-size: 15px; }
#card .pill { margin-left: auto; color: #fff; font-weight: 700; font-size: 11px; border-radius: 999px; padding: 2px 8px; }
#card .c-r { color: #8a7560; font-size: 12px; margin: 2px 0 6px 21px; }
#card dl { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 3px 8px; }
#card dt { color: #8a7560; } #card dd { margin: 0; }
#card em { color: #a8702f; font-style: normal; font-size: 11px; }
#night-sign { display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; background: #2b221cdd; color: #ffe3a8; border: 2px solid #8a5a34;
  border-radius: 14px; padding: 14px 20px; text-align: center; box-shadow: 0 4px 30px #0008; }
#night-sign b { display: block; font-size: 18px; margin-bottom: 4px; } #night-sign span { font-size: 13px; color: #f6ecdc; }
body.night #night-sign { display: block; }
#loading { position: fixed; inset: 0; display: grid; place-items: center; font-weight: 700; color: #7a4d2b; }
body.login { background: radial-gradient(circle at 50% 30%, #f6ecdc, #e2cfae); display: grid; place-items: center; min-height: 100vh; }
#f { width: min(340px, 90vw); background: #fffaf1; border-radius: 18px; padding: 28px 24px; text-align: center; box-shadow: 0 10px 40px #5a3a2033; }
#f h1 { margin: 10px 0 2px; font-size: 22px; } #f p { margin: 0 0 18px; color: #8a7560; font-size: 14px; }
#f input { width: 100%; font: inherit; padding: 11px 12px; border-radius: 10px; border: 2px solid #e2cfae; background: #fff; }
#f button { margin-top: 12px; width: 100%; font: inherit; font-weight: 700; padding: 11px; border: 0; border-radius: 10px; background: #8a5a34; color: #fff4e0; cursor: pointer; }
#err { min-height: 20px; margin-top: 8px; color: #c0392b; font-size: 13px; }
@media (max-width: 520px) { .brand { font-size: 15px; white-space: nowrap; } .brand em { display: none; } .sim-btn b { font-size: 13px; } header { padding-left: 10px; padding-right: 10px; } #sim-banner { top: 54px; font-size: 12px; } #card { width: 220px; } .tag { font-size: 11px; padding: 1px 6px 1px 5px; } }
