/* Lure of the Abyss — layout only. All in-world rendering happens on the canvas. */

:root {
  /* Arctic palette — matches the book cover. */
  --bone: #e8f4f8;
  --fog: #6098b8;
  --slate: #1a3050;
  --slate-deep: #0a1622;
  --ochre: #90c8e0;      /* accent (cyan) */
  --sick-green: #7f9e5a;
  --serif: 'Spectral', "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: 'Space Mono', ui-monospace, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--slate-deep);
  color: var(--bone);
  font-family: var(--serif);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: fixed;
  inset: 0;
  background: var(--slate-deep);
}

#game {
  position: absolute;
  inset: 0;
  display: block;
  touch-action: none;
  background: var(--slate-deep);
}

/* ---- DOM text entry overlay (prayers, crew messages) ---- */
#textEntry {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(5, 8, 10, 0.55);
  backdrop-filter: blur(2px);
  padding: 4vh 4vw calc(4vh + env(safe-area-inset-bottom));
}

#textEntry.hidden { display: none; }

#textEntryInner {
  width: min(640px, 100%);
  background: rgba(12, 26, 44, 0.96);
  border: 1px solid rgba(144, 200, 224, 0.28);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
}

#textEntryLabel {
  display: block;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--fog);
  margin-bottom: 8px;
}

#textEntryField {
  width: 100%;
  resize: none;
  background: #0a1622;
  color: var(--bone);
  border: 1px solid rgba(144, 200, 224, 0.3);
  border-radius: 6px;
  padding: 12px;
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  outline: none;
}

#textEntryField:focus { border-color: var(--ochre); }

#textEntryRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

#textEntryCount {
  font-size: 13px;
  color: var(--fog);
  font-variant-numeric: tabular-nums;
}

#textEntryButtons { display: flex; gap: 10px; }

#textEntry button {
  font-family: inherit;
  font-size: 16px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1px solid rgba(144, 200, 224, 0.3);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  min-width: 88px;
  min-height: 44px;
}

#textEntrySend {
  background: var(--ochre);
  border-color: var(--ochre);
  color: #0c1e2c;
  font-weight: 600;
}

#textEntry button:active { transform: translateY(1px); }
