/* -----------------------------------
   BRAND COLOURS
----------------------------------- */
:root {
  --lt-cream: #faf7f2;
  --lt-paper: #f4f1ec;
  --lt-thread: #d8cbb8;
  --lt-black: #1a1a1a;
  --lt-brown: #4a463f;
}

/* -----------------------------------
   GLOBAL
----------------------------------- */
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--lt-cream);
  color: var(--lt-brown);
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* -----------------------------------
   HEADER
----------------------------------- */
.lt-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.lt-moon {
  width: 26px;
  height: 26px;
  opacity: 0.85;
}

h1 {
  font-size: 2rem;
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px dashed var(--lt-thread);
  color: var(--lt-black);
}

.sub {
  margin-top: 0.4rem;
  margin-bottom: 2rem;
  color: #6a645c;
}

/* -----------------------------------
   WORD CLOUD
----------------------------------- */
.cloud {
  position: relative;
  height: 340px;
  margin-bottom: 1.5rem;
  background: var(--lt-paper);
  border: 2px dashed var(--lt-thread);
  border-radius: 10px;
  overflow: hidden;
}

.word {
  position: absolute;
  padding: 0.35rem 0.55rem;
  background: #ffffffdd;
  border-radius: 8px;
  border: 1px solid #e3ddd6;

  /* drag-friendly behaviour */
  touch-action: none;        /* stops page scrolling during drag (mobile + iframe) */
  user-select: none;         /* stops text highlighting */
  -webkit-user-select: none; /* Safari */

  cursor: grab;

  transition:
    transform 0.35s ease,
    background 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.word:active {
  cursor: grabbing;
}

/* ✨ Gentle float on hover */
.word:hover {
  background: #fff9f3;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.word.selected {
  background: #ffeec7;
  border-color: #e4d3a4;
  transform: scale(1.08);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* -----------------------------------
   SELECTED WORDS
----------------------------------- */
.chosen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.pill {
  background: #fff7e3;
  border: 1px solid #e8d9b8;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* -----------------------------------
   CONTROLS
----------------------------------- */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

textarea,
select {
  background: var(--lt-paper);
  border: 1px solid #d6d1c8;
  padding: 0.6rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--lt-brown);
}

textarea {
  flex: 1 1 100%;
  min-height: 60px;
}

select {
  min-width: 140px;
}

/* -----------------------------------
   BUTTONS
----------------------------------- */
button {
  background: var(--lt-paper);
  border: 1px solid #d6d1c8;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  color: var(--lt-brown);
}

button:hover {
  background: #ece7df;
  border-color: #c8c2b8;
}

button:active {
  transform: scale(0.97);
}

#favMantra {
  background: #fff7d6;
  border-color: #e8d9a8;
}

#favMantra:hover {
  background: #fff1c2;
  border-color: #dfcd96;
}

#shuffleCloud {
  background: #eef3ff;
  border-color: #cbd6f2;
}

#shuffleCloud:hover {
  background: #e3eaff;
  border-color: #b9c6e8;
}

/* -----------------------------------
   OUTPUT
----------------------------------- */
.output h2 {
  margin-bottom: 0.5rem;
  border-bottom: 2px dashed var(--lt-thread);
  padding-bottom: 0.3rem;
  color: var(--lt-black);
}

.big {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  min-height: 2rem;
  line-height: 1.4;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.actions {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

/* -----------------------------------
   FAVOURITES
----------------------------------- */
.favourites h3 {
  margin-bottom: 0.6rem;
  border-bottom: 2px dashed var(--lt-thread);
  padding-bottom: 0.3rem;
  color: var(--lt-black);
}

#favList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#favList li {
  background: #f7f5f2;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2ddd6;
}

.clear-favs {
  margin-top: 0.5rem;
  background: #fbeaea;
  border-color: #e4bcbc;
}

.clear-favs:hover {
  background: #f7dede;
  border-color: #d9a8a8;
}

/* -----------------------------------
   TOAST
----------------------------------- */
.toast {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  background: #fff7d6;
  color: #5a4f3a;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid #e8d9a8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.toast.show {
  opacity: 1;
}

/* -----------------------------------
   FOOTER
----------------------------------- */
.lt-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
  color: #6a645c;
}

/* -----------------------------------
   MANTRA DISPLAY — POWERFUL VERSION
----------------------------------- */
.big {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--lt-black);
  margin: 1.4rem auto;
  padding: 1.2rem 1.6rem;
  line-height: 1.55;
  text-align: center;
  max-width: 90%;
  background: #fff9e8;
  border: 1px solid #f0e4c8;
  border-radius: 10px;
  display: inline-block;
  border-bottom: 2px dashed var(--lt-thread);
  animation: mantraReveal 0.6s ease-out;
}

.mantra-moon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.85;
}

@keyframes mantraReveal {
  0% { opacity: 0; transform: translateY(10px) scale(0.96); }
  60% { opacity: 1; transform: translateY(0) scale(1.02); }
  100% { transform: scale(1); }
}

.big.empty {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0.6rem 0 1rem;
}

/* -----------------------------------
   RESPONSIVE
----------------------------------- */
@media (max-width: 600px) {
  .controls {
    flex-direction: column;
  }

  select {
    width: 100%;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* -----------------------------------
   SIGIL OFFER SECTION
----------------------------------- */
.sigil-offer {
  margin-top: 3rem;
  padding: 1.8rem;
  background: var(--lt-paper);
  border: 2px dashed var(--lt-thread);
  border-radius: 10px;
}

.sigil-offer h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
  color: var(--lt-black);
  border-bottom: 2px dashed var(--lt-thread);
  padding-bottom: 0.3rem;
}

.sigil-text {
  margin: 0.8rem 0 1.4rem;
  color: #6a645c;
  line-height: 1.5;
}

.sigil-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.sigil-btn {
  background: #fff7e3;
  border: 1px solid #e8d9b8;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--lt-brown);
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.sigil-btn:hover {
  background: #fff1c2;
  border-color: #dfcd96;
}

/* -----------------------------------
   MINI INSTRUCTION STEPS
----------------------------------- */
.lt-steps {
  max-width: 420px;
  margin: 0.8rem auto 1.6rem;
  padding: 1rem 1.2rem;
  background: #fffdf7;
  border: 2px dashed var(--lt-thread);
  border-radius: 10px;
  color: #6a645c;
  font-size: 0.95rem;
  line-height: 1.45;
}

.lt-steps p {
  margin: 0.2rem 0;
  text-align: center;
}

.steps-moon {
  width: 22px;
  display: block;
  margin: 0 auto 0.4rem;
  opacity: 0.8;
}

.lt-steps {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.lt-steps.hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

@keyframes ltStepsGlow {
  0% { opacity: 0; transform: translateY(4px); }
  60% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; }
}

.lt-steps {
  animation: ltStepsGlow 0.9s ease-out 0.2s both;
}

.sigil-icon {
  width: 22px;
  height: 22px;
  vertical-align: -3px;
  margin-right: 0.5rem;
  stroke: var(--lt-thread);
  opacity: 0.9;
}

.sigil-offer h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}