/* Portolan — a dark atlas leaf above, parchment guessing below. */

.portolan-frame {
  width: min(620px, 96vw);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.4vw, 18px);
  padding: clamp(12px, 2.4vw, 18px);
}

/* ---- the leaf ---- */
.leaf {
  position: relative;
  border-radius: 8px;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(217, 148, 65, 0.10), rgba(217, 148, 65, 0) 55%),
    linear-gradient(180deg, #241a12, #171009 70%, #140d08);
  box-shadow: inset 0 0 0 1px rgba(200, 156, 58, .35);
  padding: clamp(10px, 2vw, 16px);
}
#silhouette {
  display: block;
  width: min(340px, 72%);
  margin: 0 auto;
  filter: drop-shadow(0 0 14px rgba(227, 183, 84, .25));
}
.leaf-caption {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  color: rgba(241, 230, 200, .5);
}
.continent-hint {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--hand);
  font-style: italic;
  font-size: 14.5px;
  color: rgba(241, 230, 200, .75);
}
.continent-hint b { color: var(--gold-bright); font-weight: 600; }

/* ---- guessing ---- */
.guess-line { display: flex; gap: 10px; align-items: stretch; }
.guess-box { position: relative; flex: 1; }
#guess-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--body);
  font-size: 17px;
  color: var(--ink);
  background: rgba(246, 238, 214, .6);
  border: 1px solid rgba(122, 104, 80, .45);
  border-radius: 8px;
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
#guess-input:focus { border-color: var(--oxblood); background: var(--cream); }
#guess-input::placeholder { color: var(--ink-light); font-style: italic; }
.how { white-space: nowrap; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  z-index: 20;
  background: var(--cream);
  border: 1px solid rgba(122, 104, 80, .5);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(58, 46, 34, .3);
  overflow: hidden;
}
.sugg {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--body);
  font-size: 15.5px;
  color: var(--ink-soft);
  padding: 9px 13px;
}
.sugg:hover, .sugg.sel { background: rgba(200, 156, 58, .22); color: var(--ink); }

.guess-counter {
  margin: 8px 2px 0;
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11.5px;
  color: var(--ink-light);
}

/* rows */
.guess-rows {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.g-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 26px 52px;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px dashed rgba(122, 104, 80, .35);
  overflow: hidden;
  font-size: 15px;
  color: var(--ink-soft);
}
.g-row.filled, .g-row.hit { border-style: solid; background: rgba(246, 238, 214, .45); }
.g-row.filled::before, .g-row.hit::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, rgba(200, 156, 58, .28), rgba(227, 183, 84, .16));
  border-radius: 7px 0 0 7px;
}
.g-row.hit::before { background: linear-gradient(90deg, rgba(200, 156, 58, .55), rgba(227, 183, 84, .35)); }
.g-row > span { position: relative; z-index: 1; }
.g-name { font-weight: 600; color: var(--ink); }
.g-dist { font-variant-numeric: tabular-nums; justify-self: end; white-space: nowrap; }
.g-arrow { text-align: center; font-size: 18px; color: var(--oxblood); }
.g-pct { justify-self: end; font-variant-numeric: tabular-nums; font-family: var(--display); font-weight: 600; color: var(--oxblood); }
.g-row.hit .g-pct, .g-row.hit .g-arrow { color: var(--forest); }
.g-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--caps);
  color: rgba(107, 90, 72, .5);
  font-size: 12px;
}

.help-body { text-align: left; font-size: 15.5px; line-height: 1.55; color: var(--ink-soft); }
.help-body p { margin: 0 0 12px; }
.help-body b { color: var(--oxblood); }
.overlay-next {
  margin: 14px 0 0;
  font-family: var(--hand);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-light);
}

@media (max-width: 460px) {
  .guess-line { flex-direction: column; }
  .g-row { grid-template-columns: 1fr auto 22px 46px; font-size: 14px; }
}
