/* Play page: player bar, today, world map, and a box over the page for every activity. */

.hint-inline { font-size: 15px; font-weight: 400; }
.doodle-title h2 { font-size: 20px; }

.play-login { max-width: 560px; margin-left: auto; margin-right: auto; text-align: center; }

.player-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player-pet { width: 64px; height: 64px; object-fit: contain; border: 3px solid var(--meadow-ink); border-radius: 50%; background: var(--meadow-paper); }
.player-who { flex: 1 1 12em; }
.player-who .name { font-size: 24px; font-weight: 700; }
.player-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.activity {
  font: inherit; text-align: left; color: var(--meadow-ink); cursor: pointer;
  background: var(--meadow-cloud); padding: 10px 12px;
  border: 3px solid var(--meadow-ink); border-radius: var(--wobble);
  box-shadow: 3px 3px 0 var(--meadow-ink);
}
.activity strong, .activity span { display: block; }
.activity span { font-size: 15px; color: #4a4856; margin-top: 2px; }
.activity:hover { background: var(--meadow-sun); }
.activity:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--meadow-ink); }
#today .activity { background: var(--meadow-paper); }
#today .activity:hover { background: var(--meadow-sun); }

/* world map tiles are buttons here */
button.habitat { width: 100%; font: inherit; font-weight: 700; color: var(--meadow-ink); cursor: pointer; text-align: left; min-height: 130px; }
button.habitat[aria-pressed="true"] { outline: 4px solid var(--meadow-sun); outline-offset: 2px; }
button.habitat[aria-pressed="true"] span { background: var(--meadow-sun); }

.activity:focus-visible, button.habitat:focus-visible, .sheet-close:focus-visible {
  outline: 3px solid var(--meadow-ink); outline-offset: 3px;
}

/* ---------- the sheet ---------- */
.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  margin: auto; color: var(--meadow-ink); font-size: 17px;
}
.sheet::backdrop { background: rgba(43, 42, 51, .5); }
.sheet .doodle-title { position: sticky; top: -16px; z-index: 3; }
.sheet .doodle-title h2 { font-family: var(--font-label); font-weight: 700; font-size: 20px; }
.sheet-close {
  font: inherit; font-size: 24px; line-height: 1; cursor: pointer; flex: none;
  width: 34px; height: 34px; padding: 0; background: var(--meadow-cloud); color: var(--meadow-ink);
  border: 3px solid var(--meadow-ink); border-radius: 12px 14px 10px 13px;
}
.sheet-close:hover { background: var(--meadow-flower); }
.sheet-status { margin: 0; font-size: 15px; color: #4a4856; }
.sheet-status:empty { display: none; }
.sheet-status.error { color: #9b2d20; font-weight: 700; }
.sheet .notice { font-size: 18px; }

.message + .message { margin-top: 14px; padding-top: 12px; border-top: 2px dashed rgba(43, 42, 51, .4); }
.message h3 { margin: 4px 0 6px; font-size: 20px; }
.message-author { margin: 0; font-size: 15px; color: #4a4856; }
.message-text { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message .big { font-size: 26px; font-weight: 700; }
.message-img { display: block; width: 100%; max-width: 260px; height: auto; margin: 8px auto;
  background: radial-gradient(circle at 50% 60%, var(--meadow-cloud) 0 55%, transparent 56%); }
.message-fields { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 14px; margin: 10px 0; }
.message-fields dt { font-weight: 700; }
.message-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-footer { margin: 8px 0 0; font-size: 14px; color: #4a4856; }
.message-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 12px; }
.message-controls .btn-doodle.small { margin-top: 0; font-size: 15px; padding: 3px 12px; }
.message-controls .field { flex: 1 1 100%; margin: 0; }

.sheet-form { display: grid; gap: 10px; }
.sheet-form .btn-doodle { justify-self: start; }
.field { display: grid; gap: 3px; margin: 4px 0; }
.field span { font-weight: 700; }
.field small { font-size: 14px; color: #4a4856; }
.field input, .field select {
  font: inherit; color: var(--meadow-ink); background: var(--meadow-cloud); width: 100%; box-sizing: border-box;
  border: 3px solid var(--meadow-ink); border-radius: 12px 16px 10px 14px; padding: 5px 10px;
}
.sheet-options { margin: 0 0 12px; padding: 6px 10px; border: 2px dashed rgba(43, 42, 51, .45); border-radius: 12px; }
.sheet-options summary { cursor: pointer; font-weight: 700; }
.sheet-options .sheet-form { margin-top: 8px; }

button:disabled { opacity: .6; cursor: wait; }

@media (max-width: 480px) {
  button.habitat { min-height: 110px; }
  .sheet { width: calc(100vw - 16px); max-height: calc(100vh - 24px); }
}
