:root {
  --bg: #17140f;
  --panel: #1f1a14;
  --ink: #eae3d6;
  --muted: #b7ae9f;
  --accent: #d7b169;
  --blue: #1d3ea6;
  --red: #7a1f1f;
  --green: #2f5d2f;
  --gold: #c9a455;
  --border: #3d352a;
}

* {
  box-sizing: border-box;
}

html, body, #app {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(70, 55, 35, 0.35), rgba(0,0,0,0) 60%),
    radial-gradient(1200px 600px at 80% 100%, rgba(50, 40, 28, 0.35), rgba(0,0,0,0) 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(#201b15, #18140f);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}

.app-header h1 {
  margin: 0;
  font-family: "Cinzel Decorative", "Uncial Antiqua", "MedievalSharp", cursive;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

.turn-panel {
  display: flex;
  gap: 10px;
  align-items: center;
}

.label {
  color: var(--muted);
  margin-right: 4px;
}

.turn-panel > div {
  background: #221c16;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

.app-main {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100% - 64px);
}

.sidebar {
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--panel);
  padding: 18px;
  position: relative;
}

.sidebar h2 {
  margin: 10px 0 8px;
  font-size: 17px;
  font-family: "Uncial Antiqua", "Cinzel Decorative", serif;
  color: var(--accent);
}

.sidebar h3 {
  margin: 12px 0 6px;
  font-size: 16px;
  color: var(--accent);
}

.realm-panel,
.hex-info,
.actions {
  background: #221c15;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 1px 6px rgba(0,0,0,0.25);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}

.help {
  font-size: 14px;
  color: var(--muted);
  background: #1f1913;
  border: 1px dashed #5a4e3e;
  border-radius: 10px;
  padding: 10px;
}

.group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #5a4e3e;
}

button {
  background: linear-gradient(#2b241c, #403426);
  color: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 9px 13px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

button:hover:enabled {
  background: linear-gradient(#3a3024, #4a3b2a);
  border-color: #d4ae59;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
}

input[type="number"] {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  background: #1f1a14;
  color: var(--ink);
}

.board {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

canvas#board {
  background:
    radial-gradient(800px 400px at 30% 20%, rgba(140, 110, 60, 0.15), rgba(0,0,0,0) 60%),
    radial-gradient(900px 500px at 70% 70%, rgba(90, 70, 40, 0.12), rgba(0,0,0,0) 65%),
    #2a241b;
  border: 2px solid #4a4033;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.04),
    inset 0 0 0 6px rgba(182, 140, 64, 0.15),
    0 4px 16px rgba(0,0,0,0.4);
  max-width: 100%;
  height: auto;
}

.app-footer {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(#201b15, #18140f);
}

#statusMsg {
  min-height: 20px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay[hidden] {
  display: none !important;
}
.modal-card {
  background: #221c15;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 16px 18px;
  width: 360px;
  position: relative;
}
.modal-card h3 {
  margin: 0 0 8px;
  font-family: "Uncial Antiqua", "Cinzel Decorative", serif;
  color: var(--accent);
}
/* removed the X close button */
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}


