* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e8e4da; font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; color: #2f3640; }
canvas { display: block; }
a { color: #9b3d1e; }
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #e8e4da; z-index: 50; transition: opacity 1s; }
#loading .title { font-size: 34px; font-weight: 600; }
#loadmsg { margin-top: 12px; font-style: italic; opacity: .7; }
#hud { position: fixed; top: 16px; left: 18px; pointer-events: none; background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 2px 10px #0002; z-index: 2; }
#hud h1 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
#clock, #weather { font-size: 14px; opacity: .8; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.pin { font-weight: 600; position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; background: #ffffff; border: 1px solid #8a5a3a55; border-radius: 12px; padding: 3px 9px; font-size: 12px; white-space: nowrap; box-shadow: 0 2px 6px #0002; transition: transform .15s; }
.pin:hover { transform: translate(-50%, -100%) scale(1.08); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 1px; height: 6px; background: #8a5a3a; }
#card { position: fixed; right: 18px; top: 18px; width: 320px; max-width: calc(100vw - 36px); background: #ffffff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 8px 30px #0003; }
#card h2 { margin: 0 0 8px; font-weight: normal; font-size: 22px; }
#card p { margin: 0 0 10px; line-height: 1.45; font-size: 14px; }
#cardclose, #menubtn { border: none; background: none; font: inherit; cursor: pointer; color: inherit; }
#cardclose { position: absolute; right: 10px; top: 6px; font-size: 22px; }
#card button.act { background: #9b3d1e; color: #fff; border: none; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 14px; cursor: pointer; margin-right: 6px; }
#btns { position: fixed; left: 18px; bottom: 18px; display: flex; gap: 8px; }
#menubtn, #namesbtn { border: none; font: inherit; cursor: pointer; color: inherit; background: #ffffff; padding: 8px 16px; border-radius: 20px; box-shadow: 0 2px 8px #0002; }
#menu { position: fixed; left: 18px; bottom: 62px; width: 300px; max-height: 70vh; overflow: auto; background: #ffffff; border-radius: 14px; padding: 6px 16px 12px; box-shadow: 0 8px 30px #0003; font-size: 14px; }
#menu h3 { font-weight: normal; letter-spacing: 3px; text-transform: uppercase; font-size: 12px; margin: 14px 0 6px; opacity: .7; }
#golist button { display: inline-block; margin: 2px; border: 1px solid #8a5a3a44; background: #fff; border-radius: 10px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; }
#collection span { display: inline-block; margin: 2px; padding: 3px 8px; border-radius: 10px; background: #e8e4da; font-size: 12px; }
#collection span.got { background: #9b3d1e; color: #fff; }
.attr { font-size: 12px; opacity: .8; }
.hidden { display: none !important; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #3b2a1de6; color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 14px; opacity: 0; transition: opacity .4s; pointer-events: none; }
#toast.show { opacity: 1; }

@media (max-width: 700px) {
  #hud { top: 10px; left: 10px; padding: 8px 12px; }
  #hud h1 { font-size: 15px; }
  #clock, #weather { font-size: 12px; }
  .pin { font-size: 11px; padding: 2px 7px; }
  #card { left: 10px; right: 10px; top: auto; bottom: 64px; width: auto; }
  #menu { left: 10px; right: 10px; width: auto; bottom: 64px; }
  #btns { left: 10px; bottom: 14px; }
  #toast { bottom: 64px; width: max-content; max-width: calc(100vw - 20px); text-align: center; }
}
