* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #f3d6a8; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
kbd { display: inline-block; min-width: 1.5em; padding: 0 .35em; margin: 0 .1em; border-radius: 4px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); font: 600 .8em/1.5 inherit; text-align: center; }
#crosshair { position: fixed; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; }
#crosshair::before, #crosshair::after { content: ""; position: absolute; background: rgba(255,255,255,.9); box-shadow: 0 0 2px rgba(0,0,0,.6); }
#crosshair::before { left: 6px; top: 0; width: 2px; height: 14px; }
#crosshair::after { top: 6px; left: 0; height: 2px; width: 14px; }
#hud { position: fixed; left: 16px; top: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(30,40,25,.55); backdrop-filter: blur(4px); text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; min-width: 180px; }
#hud .life { font-size: 30px; font-weight: 800; color: #c8f59a; line-height: 1.1; }
#hud .life small { font-size: 15px; font-weight: 600; color: #e9ffd6; }
#lps { font-size: 15px; font-weight: 600; color: #f4f9e6; }
#hud .sub { margin-top: 4px; font-size: 13px; color: #e8e0cc; }
#openPanel { position: fixed; right: 16px; top: 14px; padding: 9px 14px; border: 0; border-radius: 10px; background: rgba(30,40,25,.6); color: #fff; font: 600 15px inherit; cursor: pointer; }
#openPanel:hover { background: rgba(50,70,40,.75); }
#hint { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 7px 14px; border-radius: 10px; background: rgba(30,40,25,.5); font-size: 14px; white-space: nowrap; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
#hint:empty { display: none; }
#toast { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); padding: 8px 16px; border-radius: 10px; background: rgba(90,40,30,.75); font-size: 15px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.on { opacity: 1; }
#ver { position: fixed; right: 10px; bottom: 8px; font-size: 11px; color: rgba(60,40,20,.7); pointer-events: none; }
#panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 100vw); padding: 16px; background: rgba(24,32,20,.9); backdrop-filter: blur(6px); overflow-y: auto; z-index: 5; }
#panel[hidden], #overlay[hidden], #loading[hidden] { display: none; }
#panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
#panel h2 { margin: 0; font-size: 20px; color: #c8f59a; }
#panel header button, #reset { border: 0; border-radius: 8px; padding: 7px 12px; background: rgba(255,255,255,.12); color: #fff; font: 600 14px inherit; cursor: pointer; }
.card { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; font: inherit; cursor: pointer; }
.card .ct { display: flex; justify-content: space-between; font-size: 15px; }
.card .lvl { color: #d9cfb5; font-size: 13px; }
.card .cd { margin: 4px 0 6px; font-size: 13px; color: #d8dccd; }
.card .cp { font-weight: 700; color: #f0c977; font-size: 14px; }
.card.afford { border-color: rgba(160,240,120,.6); background: rgba(120,200,90,.14); }
.card.afford .cp { color: #b8f58c; }
.card.dim { opacity: .55; }
#panel footer { margin-top: 18px; text-align: center; }
#reset { background: rgba(160,60,40,.45); font-size: 13px; }
#overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(40,28,14,.45); z-index: 6; cursor: pointer; }
#overlay .box { max-width: 460px; margin: 16px; padding: 24px 28px; border-radius: 16px; background: rgba(24,32,20,.88); text-align: center; }
#overlay h1 { margin: 0 0 8px; font-size: 32px; color: #c8f59a; }
#overlay p { margin: 0 0 12px; color: #e6e2d2; line-height: 1.45; }
#overlay ul { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; line-height: 2; color: #f1eee2; }
#overlay .go { display: inline-block; padding: 10px 22px; border-radius: 10px; background: #5d9b45; font-weight: 700; font-size: 17px; }
#loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #f3d6a8; color: #6b4a2f; font-size: 20px; z-index: 9; }
