/* ================================================================
   MINUTICA — shared styles
   ================================================================ */


/* ---- TOP NAV ---- */
#world-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  width: 780px;
}

.world-btn {
  font: bold small-caps 12px sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 3px solid #444;
  padding: 6px 16px;
  cursor: pointer;
  background: #222;
  color: #888;
  box-shadow: 3px 3px 0 #111;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

.world-btn.active {
  background: #8C8CFF;
  color: #fffce2;
  border-color: #222;
  box-shadow: 3px 3px 0 #222;
}

.world-btn:hover:not(.active) {
  background: #333;
  color: #fffce2;
}

.world-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ---- LAYOUT ---- */
#game {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* ---- PANELS ---- */
#main {
  flex: 1;
  color: #181818;
  min-height: 400px;
}

#main h1 {
  font: bold small-caps 18px sans-serif;
  color: #8C8CFF;
  text-shadow: 1px 1px 1px black;
  text-transform: uppercase;
  margin-top: 0;
}

/* ---- STORY LOG ---- */
#story {
  line-height: 1.7;
  height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  padding-right: 4px;
  margin-bottom: 12px;
}

#story-inner { display: flex; flex-direction: column; }

#story p { margin: 0 0 8px 0; }
#story p.find      { color: #7070cc; font-style: italic; }
#story p.conclusion{ color: #7070cc; font-style: italic; }
#story p.wizard    { color: #c07a00; }
#story p.gateway   { color: #2a8a50; font-weight: bold; }
#story p.warn      { color: #c07a00; }
#story p.leave     { color: #888; font-style: italic; }

/* ---- ACTION BUTTONS ---- */
.action, .game-btn {
  font: bold small-caps 12px sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 3px solid #222;
  padding: 6px 14px;
  cursor: pointer;
  background: #fffce2;
  color: #181818;
  box-shadow: 3px 3px 0 #222;
  transition: transform 0.1s, box-shadow 0.1s;
  margin: 4px 6px 4px 0;
}

.action:hover, .game-btn:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 #222;
}

.action:active, .game-btn:active {
  transform: translate(1px,1px);
  box-shadow: 1px 1px 0 #222;
}

.game-btn.purple {
  background: #8C8CFF;
  color: #fffce2;
}

.game-btn.pink {
  background: #ff8ccc;
  color: #181818;
}

#actions { margin-top: 16px; }

/* ---- RIGHT JOURNAL PANEL ---- */
#journal {
  width: 230px;
  padding: 16px;
  min-height: 400px;
  flex-shrink: 0;
}

#journal h2 {
  font: bold small-caps 13px sans-serif;
  color: #8C8CFF;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px black;
  margin-top: 0;
  border-bottom: 2px solid #8C8CFF;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

#journal h3 {
  font: bold small-caps 11px sans-serif;
  color: #ff8ccc;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 14px 0 6px 0;
  border-bottom: 1px solid #ffb8dd;
  padding-bottom: 4px;
}

/* ---- RESOURCES ---- */
#resources {
  margin-bottom: 4px;
}

.res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 12px sans-serif;
  border-bottom: 1px dashed #ddd;
  padding: 3px 0;
}

.res-name { color: #555; }
.res-val  { font: bold 13px sans-serif; color: #222; }

/* ---- JOURNAL ENTRIES (meadow) ---- */
#journal-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

#journal-entries li {
  font: 12px sans-serif;
  color: #333;
  padding: 5px 0;
  border-bottom: 1px dashed #ccc;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

#journal-entries li input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #8C8CFF;
  cursor: pointer;
}

.note-text { flex: 1; }

.note-tag {
  display: block;
  font: 10px sans-serif;
  color: #aaa;
  letter-spacing: 1px;
  margin-bottom: 1px;
}

/* Spent notes — used in a successful combination */
#journal-entries li.spent,
#conclusions-list li.spent {
  opacity: 0.4;
}

#journal-entries li.spent input,
#conclusions-list li.spent input {
  pointer-events: none;
}

#journal-entries li.spent .note-text,
#conclusions-list li.spent .conclusion-text {
  text-decoration: line-through;
  color: #999;
}

#journal-entries li.spent .note-tag,
#conclusions-list li.spent .conclusion-tag {
  color: #ccc;
}

/* Small "used" badge on spent items */
#journal-entries li.spent::after,
#conclusions-list li.spent::after {
  content: "✓";
  font: bold 10px sans-serif;
  color: #8C8CFF;
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}

/* ---- REFLECT BUTTON ---- */
#reflect-btn {
  display: none;
  width: 100%;
  margin-top: 10px;
  font: bold small-caps 12px sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 3px solid #222;
  padding: 6px 14px;
  cursor: pointer;
  background: #8C8CFF;
  color: #fffce2;
  box-shadow: 3px 3px 0 #222;
  transition: transform 0.1s, box-shadow 0.1s;
  box-sizing: border-box;
}

#reflect-btn:hover  { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 #222; }
#reflect-btn:active { transform: translate(1px,1px);   box-shadow: 1px 1px 0 #222; }

/* ---- CONCLUSIONS ---- */
#conclusions-section { display: none; margin-top: 14px; }

#conclusions-section h2 {
  font: bold small-caps 13px sans-serif;
  color: #ff8ccc;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px black;
  margin-top: 0;
  border-bottom: 2px solid #ff8ccc;
  padding-bottom: 6px;
  margin-bottom: 8px;
}

#conclusions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#conclusions-list li {
  font: 12px sans-serif;
  color: #333;
  padding: 5px 0;
  border-bottom: 1px dashed #ffb8dd;
  line-height: 1.4;
  font-style: italic;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

#conclusions-list li input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #ff8ccc;
  cursor: pointer;
}

.conclusion-text { flex: 1; }

.conclusion-tag {
  display: block;
  font: 10px sans-serif;
  color: #ffb8dd;
  letter-spacing: 1px;
  margin-bottom: 1px;
  font-style: normal;
}

/* ---- WARMTH BAR ---- */
#warmth-container { margin-bottom: 14px; }

#warmth-label {
  font: bold small-caps 11px sans-serif;
  color: #c07a00;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

#warmth-track {
  width: 100%;
  height: 12px;
  background: #ddd;
  border: 2px solid #222;
  box-sizing: border-box;
}

#warmth-fill {
  height: 100%;
  background: #ff8ccc;
  transition: width 0.3s ease;
}

/* ---- UNDERGROUND GRID ---- */
#grid-wrap { margin-bottom: 14px; }

#grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.cell {
  aspect-ratio: 1;
  border: 2px solid #222;
  background: #3a2e1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.15s;
  user-select: none;
}

.cell:hover:not(.dug) { background: #4f3f28; }
.cell.dug             { cursor: default; background: #6b5033; }
.cell.dug.empty       { background: #5a4229; }

/* ---- VISIT COUNT ---- */
#visit-count {
  font: 11px sans-serif;
  color: #aaa;
  margin-top: 10px;
  text-align: center;
}

/* ---- GATEWAY COST ---- */
#gateway-cost {
  font: 11px sans-serif;
  color: #7070cc;
  font-style: italic;
  margin-top: 6px;
}
