/* Zeitgeist (protótipo): CSS leve, sem fontes externas */
* { box-sizing: border-box; }
html, body { margin: 0; background: #14161c; color: #e8e8e8; }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
#app { max-width: 960px; margin: 0 auto; padding: 8px 10px 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 8px; }
h1 { font-size: 1.15em; margin: 0; color: #f0b429; }
h1 small { color: #b9c0cc; font-weight: normal; font-size: .7em; }
h2 { font-size: 1em; margin: 14px 0 6px; color: #f0b429; }
p { margin: 0 0 .6em; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

button { font: inherit; color: #fff; background: #2f6f4e; border: 1px solid #3f8f66; border-radius: 6px; padding: 8px 12px; min-height: 42px; cursor: pointer; }
button:hover { background: #38815b; }
button:disabled { background: #2a2f3a; border-color: #3a4150; color: #9aa3b3; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
button[aria-pressed="true"] { background: #f0b429; border-color: #f0b429; color: #1b1f27; font-weight: bold; }
button.danger { background: #7a2f2f; border-color: #a04444; }

#stage { position: relative; background: #000; border-radius: 6px; overflow: hidden; }
#view { display: block; width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
#fx { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: #c0392b; }
#fx.on { opacity: .35; }
#mini { position: absolute; right: 6px; bottom: 6px; width: 25%; max-width: 160px; height: auto; image-rendering: pixelated; opacity: .85; border: 1px solid #000; background: #000; }
#target { position: absolute; left: 6px; top: 6px; min-width: 150px; background: rgba(10, 10, 14, .8); padding: 4px 8px; border-radius: 6px; font-size: .9em; }
#dialog { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(12, 12, 18, .94); border-top: 2px solid #f0b429; padding: 10px 12px; }
#dialog strong { color: #f0b429; }
#d-text { white-space: pre-wrap; margin: 4px 0 8px; }

.bar { position: relative; height: 18px; background: #2a2f3a; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 0; background: #b83b3b; }
.bar.xp { height: 8px; }
.bar.xp i { background: #4a7fd1; }
#t-hp { background: #b83b3b; }
.bar.hp span { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: .8em; line-height: 18px; color: #fff; text-shadow: 0 0 2px #000; }

#hud { margin-top: 8px; }
#hud .line { display: flex; flex-wrap: wrap; gap: 2px 14px; }
#hud .buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#hud .buttons button { flex: 1 1 90px; }

#touch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
#touch button { min-height: 48px; touch-action: none; }
@media (hover: hover) and (pointer: fine) { #touch { display: none; } }

#side li { padding: 5px 0; border-bottom: 1px solid #2a2f3a; }
#side li small { display: block; color: #b9c0cc; }
#side li.ready b { color: #7ee2a8; }
#log { max-height: 11em; overflow: auto; color: #c3cad6; font-size: .92em; }
#log li { border: 0; padding: 2px 0; }
#log li.hurt { color: #ff9d9d; }
#log li.good { color: #7ee2a8; }
#log li.quest { color: #f0b429; }
#log li.hit { color: #cfd6e2; }

#menu { margin-top: 12px; padding: 10px 12px; background: #1b1f27; border-radius: 6px; }
#menu .row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
#menu label { display: block; margin-top: 8px; }
#menu textarea { width: 100%; background: #12151b; color: #e8e8e8; border: 1px solid #3a4150; border-radius: 6px; padding: 8px; font: 13px/1.3 monospace; }
#menu textarea:focus { outline: 3px solid #f0b429; outline-offset: 1px; }

@media (min-width: 760px) {
  #game { display: grid; grid-template-columns: 1fr 280px; gap: 0 14px; align-items: start; }
  #stage { grid-column: 1; }
  #hud { grid-column: 1; }
  #touch { grid-column: 1; }
  #side { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  #menu { grid-column: 1 / span 2; }
}

.back { color: inherit; opacity: .75; text-decoration: none; font-size: 14px; white-space: nowrap; }
.back:hover, .back:focus { opacity: 1; text-decoration: underline; }
