/* "Your Atlas". Builds on style.css (colours, fonts, buttons). Phone first, like the daily page. */

body.atlas {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-ui);
  margin: 0;
}

.atlas-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: grid;
  gap: 18px;
}

.atlas-home {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9rem;
}

.atlas-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.8rem);
  margin: 0;
  line-height: 1.05;
}
.atlas-title em {
  color: var(--red);
}

.atlas-count {
  margin: 8px 0 0;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--gold-2);
}
.atlas-count:empty {
  display: none;
}

.atlas-empty {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.atlas-empty p {
  margin: 0;
  line-height: 1.45;
  color: var(--ink-2);
}

.atlas-tip {
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  justify-items: start;
}
.atlas-tip p {
  margin: 0;
  line-height: 1.45;
}
.atlas-tip-how {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.atlas-globe {
  width: 100%;
  aspect-ratio: 1;
  max-height: 420px;
  touch-action: none;
}

.atlas-places h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 8px;
}

.place-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.place-row {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.place-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.place-when {
  color: var(--ink-2);
  font-size: 0.85rem;
  white-space: nowrap;
}

.atlas-credits {
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.5;
}
.atlas-credits a {
  color: inherit;
}

/* Move your Atlas (#87) */
.atlas-move {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
}
.atlas-move summary {
  cursor: pointer;
  padding: 11px 0;
  font-weight: 600;
}
.atlas-move[open] {
  display: grid;
  gap: 10px;
}
.atlas-move p {
  margin: 0;
  line-height: 1.45;
  color: var(--ink-2);
}
.move-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.move-label {
  font-weight: 600;
  margin-top: 4px;
}
.atlas-move textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--parchment);
  color: var(--ink);
  resize: vertical;
}
.move-file {
  cursor: pointer;
}
.atlas-move .move-result {
  font-weight: 600;
  color: var(--ink);
}
.atlas-move .move-result:empty {
  display: none;
}

/* Postcards and the field notebook (#73) */
.place-row:hover {
  border-color: var(--gold);
}
.place-row:focus-visible {
  outline: 3px solid var(--teal-2);
  outline-offset: 2px;
}
.places-hint,
.postcard-status {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.postcard-status {
  margin: 8px 0 0;
}

.postcard-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--parchment);
  color: var(--ink);
}
.postcard-dialog::backdrop {
  background: rgba(31, 42, 68, 0.45);
}
.postcard-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.postcard-dialog-head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0;
}
.postcard-list {
  display: grid;
  gap: 14px;
}

.postcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 0 var(--parchment-3);
  display: grid;
  gap: 10px;
}
.postcard-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.postcard-top h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  flex: 1;
}
.postcard-flag {
  width: 32px;
  height: 24px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--line);
}
.postcard-met {
  color: var(--ink-2);
  font-size: 0.85rem;
  white-space: nowrap;
}
.postcard-said {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  background: var(--parchment);
  border-radius: 0 8px 8px 0;
}
.postcard-words {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.postcard-english {
  margin: 6px 0 0;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--ink-2);
}
.postcard-facts {
  margin: 0;
  display: grid;
  gap: 2px;
}
.postcard-facts dt {
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 6px;
}
.postcard-facts dd {
  margin: 0;
  line-height: 1.45;
  color: var(--ink-2);
}
.postcard-note {
  margin: 0;
  padding: 12px 14px;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-2);
}

.atlas-notebook h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.notebook-intro {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.notebook-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.notebook-list li {
  display: grid;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.notebook-lang {
  font-weight: 600;
}
.notebook-phrase {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* Stamps (#74): a page of passport stamps. Pure CSS, no images. Named atlas-stamp so the 2-player game's .stamp (style.css) can't leak in. */
.atlas-stamps h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.atlas-stamps h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 16px 0 4px;
}
.stamps-intro {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.atlas-stamp-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.atlas-stamp {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
  text-align: center;
  min-height: 84px;
  padding: 10px 8px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-2);
  opacity: 0.6;
}
.atlas-stamp.earned {
  opacity: 1;
  color: var(--red);
  border: 3px double var(--red);
  background: var(--card);
  transform: rotate(-2deg);
}
.atlas-stamp.earned:nth-child(even) {
  transform: rotate(1.5deg);
}
.atlas-stamp-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.atlas-stamp-note {
  font-family: var(--font-hand);
  font-size: 1.2rem;
}
@media (prefers-reduced-motion: reduce) {
  .atlas-stamp.earned,
  .atlas-stamp.earned:nth-child(even) {
    transform: none;
  }
}

/* Your ear (#75). Named atlas-ear so nothing in style.css can leak in. */
.atlas-ear h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.atlas-ear h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 14px 0 6px;
}
.atlas-ear-intro {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.atlas-ear-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.atlas-ear-row {
  display: grid;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.atlas-ear-name {
  font-weight: 600;
}
.atlas-ear-detail {
  color: var(--ink-2);
}
.atlas-ear-row[data-level="sharp"] .atlas-ear-detail {
  color: var(--teal-2);
  font-weight: 600;
}
.atlas-ear-practise {
  color: var(--teal-2);
  font-weight: 600;
  font-size: 0.9rem;
  justify-self: start;
}
.atlas-ear-tune {
  margin-top: 12px;
  justify-self: start;
}

/* Test days (DAILY_TEST_LAUNCH): a clear line that this isn't the real daily, with "Clear test data". */
.test-banner {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 2px dashed var(--red);
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--ink);
  font-size: 0.9rem;
}
.test-banner button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--red-2);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
