/* V0.9: screen tasks, one content scroller, anchored dialog actions. */
#main {
  padding-top: clamp(12px, 2vh, 22px);
}
.heading {
  margin-bottom: 14px;
}
.heading h1 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 5px 0;
  line-height: 1.3;
}
.heading .eyebrow {
  font-size: 11px;
}
#notice .notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  position: relative;
}
#notice .notice .notice-dismiss {
  margin-left: auto;
  flex: 0 0 32px;
  min-height: 32px;
  width: 32px;
  padding: 0;
  box-shadow: none;
}
#notice .notice.syncing {
  font-size: 11px;
  min-height: 24px;
  color: #647b6c;
}
body[data-route='camp'] #main {
  display: flex;
  align-items: flex-start;
}
.camp-dashboard {
  width: 100%;
  display: grid;
  gap: 14px;
}
.camp-dashboard .home-hero {
  grid-template-columns: minmax(0, 1fr) 190px;
  min-height: 0;
  padding: 20px 24px 0;
  gap: 8px 22px;
  align-items: center;
}
.camp-dashboard .home-hero h1 {
  font-size: clamp(23px, 3vw, 33px);
  margin: 6px 0;
}
.camp-dashboard .home-hero p {
  margin: 4px 0 9px;
  line-height: 1.5;
  font-size: 13px;
}
.camp-dashboard .home-character {
  height: 165px;
  align-self: center;
}
.camp-intro .xp-track {
  margin: 8px 0 0;
  max-width: 420px;
  height: 8px;
}
.camp-intro .xp-caption {
  color: #edf3d9;
  font-size: 11px;
}
.camp-grade button {
  background: #ffffffdf;
  color: #28523e;
  border: 0;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 11px;
  margin-top: 7px;
}
.camp-quest {
  display: flex;
  grid-column: 1/-1;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fbfff3ed;
  margin: 5px -24px 0;
  padding: 12px 24px;
}
.camp-quest div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.camp-quest small {
  font-size: 10px;
  color: #71856b;
}
.camp-quest b {
  font-size: 16px;
}
.camp-quest button {
  min-height: 45px;
  padding: 10px 18px;
  font-size: 14px;
  white-space: nowrap;
}
.camp-dashboard .home-paths {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.camp-dashboard .home-path {
  min-height: 100px;
  padding: 12px;
  gap: 10px;
  border-radius: 18px;
}
.camp-dashboard .home-path > span {
  flex-basis: 48px;
  height: 56px;
}
.camp-dashboard .home-path b {
  font-size: 14px;
  margin-bottom: 4px;
}
.camp-dashboard .home-path small {
  font-size: 11px;
  line-height: 1.4;
}
.camp-book {
  font-size: 38px;
  color: #c39a44;
}
.camp-bottom {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.camp-bottom button {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 12px;
}
/* A lobby is a lobby: the map has its own destination, not an embedded full screen. */
.party-entry {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.party-entry > .card,
.party-camp {
  padding: 18px;
}
.party-entry h2 {
  font-size: 22px;
  margin: 8px 0;
}
.party-entry .gather-portraits {
  height: 130px;
}
.party-entry .party-start p {
  margin: 8px 0 14px;
}
.party-entry .party-start button {
  min-height: 46px;
}
.party-entry .form {
  gap: 8px;
}
.party-entry .form input {
  min-height: 44px;
}
.party-entry .gap {
  margin-top: 12px;
}
.party-entry .room-card {
  margin-bottom: 5px;
}
.party-camp .slots {
  margin: 12px 0;
  gap: 8px;
}
.party-camp .slot {
  min-height: 140px;
  padding: 8px;
}
.party-camp .party-portrait {
  height: 78px;
}
.party-camp .party-ready-actions {
  margin: 12px 0;
  padding: 12px 14px;
}
.party-camp .ai-companion-picker {
  padding: 10px 0;
}
.party-camp .ai-companion-picker h3 {
  margin: 4px 0;
  font-size: 16px;
}
.party-camp .party-roles {
  margin: 8px 0;
}
.party-camp .party-roles p {
  margin: 6px 0;
}
.party-learning summary {
  cursor: pointer;
  min-height: 36px;
  padding: 8px 0;
  font-size: 12px;
}
.party-destination {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.destination-art {
  height: 120px;
}
.destination-art > * {
  width: 100%;
  height: 100%;
}
.party-destination h2 {
  font-size: 22px;
  margin: 5px 0;
}
.party-destination p {
  font-size: 13px;
  margin: 6px 0;
}
.party-launch {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 12px 0;
}
.party-roster-details {
  margin-top: 10px;
  padding-top: 4px;
}
/* Disabled entries remain legible, while playable entries carry the accent. */
.journey-stop.locked,
.dungeon-door.locked {
  filter: grayscale(1);
  opacity: 0.48 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}
.journey-stop.locked:hover,
.dungeon-door.locked:hover {
  transform: none !important;
}
.chapter-marker.locked {
  filter: grayscale(0.95);
  opacity: 0.65;
}
.chapter-marker.locked.selected {
  opacity: 0.85;
}
/* The skill art remains colorful; the panel has no map texture or crossing lines. */
.talent-panel {
  background: #173c36;
  border: 1px solid #507564;
  box-shadow: none;
}
.talent-tree {
  background: none;
  gap: 16px 8px;
  padding-top: 16px;
}
.talent-edges,
.talent-connection {
  display: none;
}
.talent-node {
  min-height: 145px;
  background: #ffffff06;
  border-radius: 14px;
  padding: 10px 4px;
}
.talent-node.available {
  background: #d7efc710;
}
.talent-node small {
  max-width: 100%;
}
.talent-legend {
  gap: 8px;
  font-size: 10px;
}
.talent-path-headings {
  margin-top: 12px;
}
/* Every modal has one scrollable body and always-visible close / primary actions. */
.modal-backdrop {
  padding: 12px;
}
.game-modal.card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  max-height: calc(var(--app-height, 100dvh) - 24px);
  width: min(620px, 100%);
  max-width: 620px;
}
.game-modal.modal-map {
  width: min(860px, 100%);
  max-width: 860px;
}
.dialog-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid #dae3ce;
  background: #f4f7eb;
  gap: 12px;
}
.dialog-header > span {
  font-size: 12px;
  color: #61775f;
}
.game-modal .dialog-header .modal-close {
  position: static;
  margin: 0;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}
.dialog-body {
  padding: 18px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scroll-padding: 12px;
}
.dialog-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid #d5e0cb;
  background: #f8faef;
  justify-content: flex-end;
}
.dialog-actions button {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 14px;
}
.dialog-actions .talent-investment-actions {
  margin: 0;
  width: 100%;
}
.dialog-actions .talent-investment-actions button {
  flex: 1;
}
.encounter-summary {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.encounter-summary .dungeon-inspect-art {
  width: 160px;
  height: 160px;
  margin: 0;
}
.encounter-summary .dungeon-inspect-art > * {
  width: 100%;
  height: 100%;
}
.encounter-summary h2 {
  margin: 6px 0;
  font-size: 24px;
}
.encounter-summary p {
  margin: 7px 0;
  font-size: 13px;
  line-height: 1.6;
}
.encounter-summary strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}
.encounter-gate {
  display: block;
  color: #738365;
  margin-top: 7px;
  font-size: 11px;
}
.encounter-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0 12px;
  border-top: 1px solid #dce3cf;
  padding-top: 12px;
}
.encounter-tabs button {
  min-height: 38px;
  padding: 7px 18px;
  font-size: 12px;
}
.encounter-weakness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #58704e;
  margin-bottom: 8px;
}
.encounter-weakness span {
  font-size: 11px;
}
.encounter-skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.encounter-skills article {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  gap: 9px;
  background: #eef3e6;
  border-radius: 12px;
}
.enemy-skill-icon {
  display: grid;
  flex: 0 0 32px;
  height: 32px;
  place-items: center;
  background: #fffaf0;
  border: 1px solid #d4debf;
  border-radius: 9px;
}
.encounter-skills b {
  display: block;
  font-size: 13px;
}
.encounter-skills small {
  font-size: 10px;
  display: block;
  color: #728369;
  margin-top: 2px;
}
.encounter-skills p,
.game-modal .encounter-tip {
  font-size: 12px;
  line-height: 1.55;
  margin: 5px 0 0;
}
.game-modal .encounter-tip {
  color: #758169;
  padding: 9px 0 0;
}
.loot-probabilities {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
/* Reduce ornamental space before controls on secondary routes. */
body[data-route='pet'] .empty-panel {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  text-align: left;
  gap: 8px 22px;
  align-items: center;
  padding: 20px;
}
body[data-route='pet'] .empty-panel > .rpg-art,
body[data-route='pet'] .empty-panel > .deer-art {
  grid-row: 1/5;
  width: 180px;
  height: 200px;
  margin: 0;
}
body[data-route='pet'] .empty-panel h2 {
  margin: 6px 0;
}
.character-card {
  padding: 16px;
}
.character-card .collection-art {
  height: 140px;
}
.parent-character-row {
  flex-wrap: wrap;
  gap: 10px;
}
.parent-character-row > div {
  flex: 1;
  min-width: 160px;
}
@media (min-width: 700px) and (min-height: 660px) {
  body[data-route='camp'] #main {
    align-items: center;
  }
}
@media (max-width: 900px) {
  .camp-dashboard .home-paths {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .camp-dashboard .home-path {
    min-height: 85px;
  }
}
@media (max-width: 699px) {
  #main {
    padding: 12px 12px 16px;
  }
  .camp-dashboard {
    gap: 10px;
  }
  .camp-dashboard .home-hero {
    grid-template-columns: minmax(0, 1fr) 100px;
    padding: 16px 16px 0;
    gap: 6px;
    border-radius: 20px;
  }
  .camp-dashboard .home-hero h1 {
    font-size: 22px;
    max-width: 210px;
  }
  .camp-dashboard .home-hero p {
    font-size: 11px;
  }
  .camp-dashboard .home-character {
    height: 128px;
  }
  .camp-intro .eyebrow {
    font-size: 10px;
  }
  .camp-quest {
    margin: 5px -16px 0;
    padding: 10px 12px;
    gap: 8px;
  }
  .camp-quest b {
    font-size: 13px;
  }
  .camp-quest button {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .camp-dashboard .home-path {
    padding: 10px;
    gap: 8px;
    min-height: 82px;
    border-radius: 16px;
  }
  .camp-dashboard .home-path > span {
    flex-basis: 34px;
    height: 46px;
  }
  .camp-dashboard .home-path b {
    font-size: 12px;
  }
  .camp-dashboard .home-path small {
    font-size: 10px;
  }
  .camp-bottom {
    gap: 8px;
  }
  .camp-bottom button {
    font-size: 11px;
    padding: 8px 10px;
  }
  .party-entry {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .party-entry .gather-portraits {
    height: 100px;
    float: left;
    width: 100px;
    margin-right: 12px;
  }
  .party-entry .party-start {
    text-align: left;
  }
  .party-entry .party-start h2 {
    font-size: 19px;
  }
  .party-entry .party-start p {
    font-size: 12px;
  }
  .party-entry .party-start > button {
    width: 100%;
  }
  .party-entry > .card {
    padding: 15px;
  }
  .party-entry h2 {
    font-size: 19px;
  }
  .party-camp {
    padding: 12px;
  }
  .party-camp .slot {
    min-height: 105px;
    padding: 5px;
  }
  .party-camp .party-portrait {
    height: 55px;
  }
  .party-camp .slots {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .party-camp .slot b {
    font-size: 10px;
  }
  .party-camp .slot small {
    font-size: 9px;
  }
  .party-camp .slot.empty b {
    font-size: 20px;
  }
  .party-camp .slot.empty small {
    font-size: 9px;
  }
  .party-camp .ai-badge {
    font-size: 8px;
    padding: 3px;
  }
  .party-camp .status-bubble {
    font-size: 8px;
    padding: 3px;
  }
  .party-room-meta summary {
    font-size: 11px;
  }
  .party-ready-actions p {
    font-size: 11px;
  }
  .party-destination {
    grid-template-columns: 75px minmax(0, 1fr);
    gap: 10px;
  }
  .destination-art {
    height: 90px;
  }
  .party-destination h2 {
    font-size: 17px;
  }
  .party-launch {
    justify-content: stretch;
  }
  .party-launch button {
    width: 100%;
  }
  .dialog-header,
  .dialog-actions {
    padding: 10px 12px;
  }
  .dialog-body {
    padding: 12px;
  }
  .dialog-actions button {
    flex: 1;
    padding: 9px 8px;
    font-size: 12px;
  }
  .encounter-summary {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
  }
  .encounter-summary .dungeon-inspect-art {
    width: 90px;
    height: 110px;
  }
  .encounter-summary h2 {
    font-size: 20px;
  }
  .encounter-summary p {
    font-size: 11px;
  }
  .encounter-summary strong {
    font-size: 12px;
  }
  .encounter-skills {
    grid-template-columns: 1fr;
  }
  .encounter-skills article {
    padding: 8px;
  }
  .encounter-skills p {
    font-size: 11px;
  }
  .encounter-tabs {
    margin: 10px 0;
    padding-top: 10px;
  }
  .encounter-weakness {
    align-items: flex-start;
  }
  body[data-route='pet'] .empty-panel {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 16px;
  }
  body[data-route='pet'] .empty-panel > .rpg-art,
  body[data-route='pet'] .empty-panel > .deer-art {
    width: 100px;
    height: 140px;
  }
  body[data-route='pet'] .empty-panel h2 {
    font-size: 18px;
  }
}
@media (max-height: 550px) and (min-width: 700px) {
  .camp-dashboard .home-hero {
    grid-template-columns: minmax(0, 1fr) 120px;
    padding-top: 12px;
  }
  .camp-dashboard .home-character {
    height: 100px;
  }
  .camp-dashboard .home-hero h1 {
    font-size: 22px;
  }
  .camp-intro .xp-track,
  .camp-intro .xp-caption {
    display: none;
  }
  .camp-dashboard .home-paths {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .camp-dashboard .home-path {
    min-height: 65px;
  }
  .camp-dashboard .home-path > span {
    height: 38px;
    flex-basis: 34px;
  }
  .camp-bottom {
    display: none;
  }
  .encounter-summary .dungeon-inspect-art {
    width: 100px;
    height: 100px;
  }
  .encounter-summary {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}
@media (max-width: 699px) {
  .party-entry p {
    font-size: 12px;
    line-height: 1.5;
    margin: 7px 0;
  }
  .party-entry .form label {
    font-size: 12px;
  }
  .party-entry .form button {
    min-height: 43px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .party-entry > .card > .row.gap {
    display: inline-flex;
    margin-right: 6px;
  }
  .party-entry > .card > .row.gap button,
  .party-entry > .card > button.secondary {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11px;
  }
}
.bag-set-library {
  margin-top: 14px;
  padding: 14px 18px;
}
.bag-set-library > summary {
  cursor: pointer;
  font-weight: 700;
  padding: 5px 0;
}
.bag-set-library .set-collection {
  margin-top: 12px;
}
.parent-action {
  padding: 18px;
}
.parent-action h2 {
  margin: 7px 0;
  font-size: 22px;
}
.parent-action p {
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 12px;
}
.parent-action button {
  min-height: 42px;
  padding: 9px 14px;
  font-size: 13px;
}
.parent-characters {
  padding: 18px;
}
.parent-characters h2 {
  margin: 0 0 10px;
  font-size: 22px;
}
.creation-form {
  padding: 18px;
}
.creation-form h2 {
  font-size: 22px;
  margin: 7px 0 12px;
}
.friend-banner {
  padding: 16px;
  margin-bottom: 14px;
}
.friends-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.friends-empty > *:first-child {
  width: 90px;
  height: 100px;
  flex-shrink: 0;
}
body[data-route='friends'] #main > .grid > .card {
  padding: 18px;
}
body[data-route='friends'] .card h2,
body[data-route='friends'] .card h3 {
  font-size: 19px;
  margin: 10px 0;
}
@media (max-width: 699px) {
  .training-control {
    padding: 14px;
  }
  .training-control h1 {
    font-size: 21px;
    margin-bottom: 8px;
  }
  .training-control .topic-cards {
    gap: 8px;
    margin: 10px 0;
  }
  .training-control .topic-card {
    min-height: 74px;
    padding: 8px;
    gap: 6px;
  }
  .training-control .topic-card b {
    font-size: 12px;
  }
  .training-control .topic-card small {
    font-size: 10px;
    line-height: 1.4;
  }
  .training-control .topic-glyph {
    display: none;
  }
  .training-control .subject-tabs {
    margin: 10px 0;
  }
  .training-control .subject-tabs button {
    min-height: 40px;
    padding: 8px 12px;
  }
  .practice-ready {
    padding: 12px;
    margin-top: 10px;
  }
  .practice-ready h3 {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .practice-ready > p {
    display: none;
  }
  .practice-ready .practice-bottom {
    margin-top: 10px;
    gap: 8px;
  }
  .practice-ready .form label {
    font-size: 11px;
  }
  .practice-ready .form select {
    min-height: 40px;
    padding: 8px;
    font-size: 12px;
  }
  .practice-ready .practice-bottom > button {
    min-height: 44px;
    font-size: 14px;
    padding: 10px;
  }
  .learning-footnote {
    display: none;
  }
  .creation-preview {
    display: none;
  }
  .class-roster {
    gap: 8px;
    margin: 0 0 12px;
  }
  .class-choice {
    min-height: 145px;
    padding: 8px;
  }
  .class-choice .class-portrait {
    height: 84px;
  }
  .class-choice b {
    font-size: 14px;
  }
  .class-choice small,
  .class-choice .class-selected {
    font-size: 10px;
  }
  .creation-form {
    display: block;
    padding: 14px;
  }
  .creation-form h2 {
    font-size: 17px;
    margin: 5px 0 10px;
  }
  .creation-form .grid.two {
    grid-template-columns: 1.1fr 1fr;
    gap: 10px;
  }
  .creation-form .form label {
    font-size: 12px;
  }
  .creation-form .form input,
  .creation-form .form select {
    min-height: 43px;
    padding: 8px;
  }
  .creation-form .form button {
    min-height: 43px;
    font-size: 13px;
    padding: 10px;
  }
  .parent-action {
    padding: 14px;
  }
  .parent-action h2 {
    font-size: 19px;
  }
  .parent-action p {
    font-size: 12px;
  }
  .parent-characters {
    padding: 14px;
  }
  .parent-characters h2 {
    font-size: 19px;
  }
  .parent-character-row {
    padding: 10px 0;
    gap: 6px;
  }
  .parent-character-row > div {
    min-width: 140px;
  }
  .parent-character-row button {
    min-height: 36px;
    padding: 7px;
    font-size: 11px;
  }
  .account-tools {
    margin-top: 12px;
    padding: 12px 14px;
  }
}
.training-control .subject-tabs {
  margin: 10px 0;
}
.training-control .topic-cards {
  margin: 10px 0;
  gap: 10px;
}
.training-control .row.spread h1 {
  font-size: 24px;
  margin: 4px 0 8px;
}
.practice-ready {
  padding: 14px;
  margin-top: 12px;
}
.practice-ready > p,
.learning-footnote {
  display: none;
}
.practice-ready .practice-bottom {
  margin-top: 10px;
}
.bag-empty {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 6px 16px;
  text-align: left;
  align-items: center;
  padding: 18px;
  min-height: 0;
}
.bag-empty > .guardian-art {
  width: 100px;
  height: 120px;
  grid-row: 1/4;
  margin: 0;
}
.bag-empty h3 {
  margin: 4px 0;
  font-size: 17px;
}
.bag-empty p {
  margin: 4px 0;
  font-size: 12px;
}
.bag-empty button {
  grid-column: 2;
  width: fit-content;
  min-height: 40px;
  font-size: 12px;
  padding: 8px 12px;
}
.creation-preview {
  display: none;
}
.creation-form {
  display: block;
}
.class-choice .class-portrait {
  height: 125px;
}
.class-choice {
  min-height: 190px;
}
@media (max-width: 699px) {
  .training-control .row.spread h1 {
    font-size: 20px;
  }
  .class-choice .class-portrait {
    height: 84px;
  }
  .class-choice {
    min-height: 145px;
  }
  .bag-empty {
    grid-template-columns: 65px minmax(0, 1fr);
    padding: 12px;
    gap: 6px 10px;
  }
  .bag-empty > .guardian-art {
    width: 65px;
    height: 100px;
  }
  .bag-empty h3 {
    font-size: 14px;
  }
}
.class-roster {
  margin: 12px 0;
}
.class-choice {
  padding: 10px;
  gap: 4px;
}
.class-choice b,
.class-choice small {
  margin: 0;
}
.creation-form h2 {
  font-size: 20px;
  margin: 5px 0 10px;
}
@media (max-height: 550px) {
  body[data-route='map'] #main {
    overflow: auto;
  }
}
/* One guard has one skill: use a compact dossier, not a half-empty two-column grid. */
.game-modal.modal-map:has(.encounter-skills article:only-child) {
  width: min(680px, 100%);
  max-width: 680px;
}
.encounter-skills:has(article:only-child) {
  grid-template-columns: 1fr;
}
/* One scroll container and visible exits for every lobby size. */
body[data-route='party'][data-mode='play'] #main,
body[data-route='friends'][data-mode='play'] #main {
  overflow: auto;
  touch-action: pan-y;
}
.party-camp {
  height: auto;
  max-height: none;
  overflow: visible;
  min-width: 0;
}
.party-room-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid #d8e2cf;
}
.party-room-meta > span {
  font-size: 12px;
  color: #61775f;
}
.party-room-meta .row {
  display: flex;
  gap: 8px;
}
.friends-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.friends-workspace .card {
  min-width: 0;
  padding: 18px;
}
.friend-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.friend-banner > div {
  flex: 1;
  min-width: 180px;
}
.friend-banner strong {
  display: block;
  font-size: 22px;
  color: #285d46;
  overflow-wrap: anywhere;
}
.friend-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 14px;
}
.friend-search-row label {
  grid-column: 1/-1;
}
.friend-search-row input {
  min-width: 0;
}
.friend-unavailable {
  font-size: 12px;
  color: #6d7e6d;
}
.peer-card b {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .friends-workspace {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .friends-workspace .card {
    padding: 12px;
  }
  .party-room-meta .row {
    width: 100%;
  }
  .party-room-meta button {
    flex: 1;
    min-height: 44px;
  }
  .friend-banner {
    padding: 12px;
  }
  .peer-card {
    gap: 8px;
  }
  .peer-actions button {
    min-height: 44px;
    font-size: 12px;
  }
  .friend-search-row input,
  .friend-search-row button {
    min-height: 44px;
  }
}
.party-room-meta button {
  min-height: 44px;
  font-size: 13px;
  padding: 8px 12px;
}
.friends-workspace .peer-actions button,
.friend-banner button {
  min-height: 44px;
}

/* A reserved social row keeps notifications outside the page scroller and nav. */
body {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}
body #main {
  grid-row: 4;
}
body #nav {
  grid-row: 5;
}
#socialAlerts {
  grid-row: 3;
  min-width: 0;
  z-index: 41;
}
#socialAlerts:empty {
  display: none;
}
.social-alerts {
  padding: 8px max(12px, calc((100% - 1180px) / 2));
  background: #f6f9ec;
}
.social-notice-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px;
  border: 2px solid #cba754;
  border-radius: 18px;
  background: #fff8db;
  box-shadow: 0 4px 15px #304d3120;
}
.social-notice-copy {
  display: grid;
  gap: 3px;
  flex: 1 1 240px;
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.social-notice-copy strong {
  color: #73541b;
  font-size: 15px;
}
.social-notice-copy b {
  margin-right: 3px;
}
.social-notice-copy small {
  color: #7c5641;
}
.social-notice-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.social-notice-actions button,
.social-notice-result button,
.social-notice-paging button {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.social-notice-paging {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #75653c;
}
.site-header #account .social-bell {
  min-height: 44px;
  min-width: 76px;
  padding: 6px 10px;
  border: 1px solid #aec8a7;
  border-radius: 14px;
  background: #e8f0db;
  color: #28563f;
  display: grid;
  place-items: center;
  gap: 1px;
  line-height: 1.2;
  box-shadow: none;
}
.social-bell small {
  font-size: 10px;
  font-weight: 500;
}
.social-bell b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #b54230;
  color: white;
  font-size: 12px;
}
.site-header #account .social-bell.has-unread {
  background: #ffefb1;
  border: 2px solid #c38a36;
  color: #714514;
}
.social-notice-result {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: #28563f;
  font-size: 14px;
}
#socialAlerts.is-overlay {
  position: fixed;
  top: calc(var(--inbox-top, 64px) + 4px);
  left: 8px;
  right: 8px;
  padding: 6px;
  border-radius: 18px;
  max-height: calc(var(--app-height, 100dvh) - var(--inbox-top, 64px) - 24px);
  overflow-y: auto;
  box-shadow: 0 8px 30px #173b3a38;
}
@media (max-width: 700px) {
  .site-header #account .row {
    gap: 5px;
  }
  .social-alerts {
    padding: 5px 10px;
  }
  .social-notice-card {
    padding: 9px 12px;
    gap: 6px;
    border-radius: 14px;
  }
  .social-notice-copy {
    flex-basis: 100%;
    font-size: 13px;
  }
  .social-notice-copy strong {
    font-size: 14px;
  }
  .social-notice-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    width: 100%;
    gap: 6px;
  }
  .social-notice-actions button {
    padding: 8px;
  }
  .site-header #account .social-bell {
    min-width: 72px;
    padding: 5px 7px;
    font-size: 12px;
  }
}
