/* Header specifics */
.header-title-group {
  display: flex;
  flex-direction: column;
}

.back-link {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--soft);
  text-decoration: none;
  width: fit-content;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Progress */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-text {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: var(--soft);
  font-size: 1rem;
}

.progress-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--sea);
  box-sizing: border-box;
  transition: background-color 150ms ease;
}

.dot.current {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.dot.dot-correct { background-color: var(--tief); }
.dot.dot-high { background-color: var(--huegel); }
.dot.dot-mid { background-color: var(--hoch); }
.dot.dot-low { background-color: var(--warn); }

/* Silhouette Stage */
.silhouette-stage {
  height: 300px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  overflow: hidden;
}

.silhouette-stage svg {
  display: block;
  width: 100%;
  height: 300px;
}

.silhouette-stage path {
  stroke: none;
}

/* Status message */
.status-msg {
  text-align: center;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
}

.status-msg:empty {
  display: none;
}

.status-msg.correct {
  color: var(--tief);
}

.status-msg.lost {
  color: var(--ink);
  background-color: var(--panel);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 2px;
  width: fit-content;
  margin: 0 auto;
}

/* Revealed country on end */
.revealed-country {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
}

.revealed-country[hidden] {
  display: none !important;
}

.revealed-flag {
  width: 36px;
  height: 27px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.revealed-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
}

/* Play Controls */
.play-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.search-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row .search-input {
  flex: 1;
}

/* Guess list & rows */
.guess-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.guess-list:empty {
  display: none;
}

.guess-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background-color: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  color: var(--ink);
}

.guess-row.row-correct {
  border-color: var(--tief);
}

.guess-flag {
  width: 28px;
  height: 21px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  object-fit: cover;
  flex-shrink: 0;
}

.guess-name {
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guess-distance {
  color: var(--soft);
  white-space: nowrap;
  font-size: 1.05rem;
}

.guess-dir {
  font-size: 1.3rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.guess-prox {
  font-weight: 700;
  min-width: 48px;
  text-align: right;
  white-space: nowrap;
}

.row-correct .guess-prox { color: var(--tief); }
.row-high .guess-prox { color: var(--huegel); }
.row-mid .guess-prox { color: var(--hoch); }
.row-low .guess-prox { color: var(--warn); }

/* End View */
.end-view {
  width: 100%;
}

.end-card {
  background-color: var(--panel);
  border: 2px solid var(--line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.end-score-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
}

.end-score-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: var(--ink);
}

.end-score-max {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 1.8rem;
  color: var(--soft);
}

.end-grid-emojis {
  font-size: 2.2rem;
  line-height: 1.25;
  letter-spacing: 6px;
  white-space: pre-line;
  font-family: monospace, sans-serif;
  margin: 4px 0;
}

.end-note {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: var(--soft);
  font-size: 1rem;
}

.end-note:empty {
  display: none;
}

.end-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}
