/* Independent community presentation; authentication styles stay in index.html. */
:root {
  --town-coral: #ff886c;
  --town-ink: #68574e;
}
[hidden] {
  display: none !important;
}
body {
  overflow-x: hidden;
}
button,
a,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 22px;
  padding: 0 16px;
}
.site-nav a,
.more-btn {
  background: white;
  border: 1px solid #f4e2d9;
  border-radius: 30px;
  padding: 10px 19px;
  color: #947568;
  font-weight: 800;
}
.town-strip {
  max-width: 1020px;
  margin: 0 auto 24px;
  height: 142px;
  border: 8px solid white;
  border-radius: 24px;
  background: #e2eed8 url("/town.svg") center 55% / cover;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px #e6a58c14;
}
.town-strip > a {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #fffdf6ee;
  padding: 5px 15px;
  border-radius: 20px;
  color: #826550;
  font-weight: 800;
  font-size: 13px;
}
.stroller {
  position: absolute;
  left: 5%;
  top: 30%;
  animation: stroll 28s linear infinite;
  animation-delay: calc(var(--delay) * -3);
}
.stroller .avatar {
  width: 30px;
  height: 30px;
  font-size: 15px;
  border: 2px solid white;
}
@keyframes stroll {
  to {
    left: 95%;
    transform: translateY(15px);
  }
}
.text-button,
.avatar-button,
.face {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
}
button.chan {
  width: 100%;
  font: inherit;
  text-align: left;
  border: 0;
}
button.face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  max-width: 82px;
}
.face .name {
  max-width: 80px;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.avatar {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  color: #6a5757;
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-button {
  align-self: flex-start;
}
.post .body {
  min-width: 0;
  width: 100%;
}
.post p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.post .meta {
  flex-wrap: wrap;
  gap: 7px;
}
.post .meta .badge {
  font-size: 10px;
}
.post time {
  font-size: 11px;
}
.share-post {
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 18px;
}
.post-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: #958879;
}
.reply-parent {
  display: block;
  font-size: 12px;
  margin: 8px 0;
}
.thread {
  margin-left: 22px;
  border-left: 2px solid #f3dacc;
  padding-left: 12px;
  margin-bottom: 14px;
}
.thread .post {
  margin-bottom: 10px;
}
.hot-channel {
  margin-top: 16px;
  border: 1px solid #ffe0b7;
  border-radius: 18px;
  padding: 14px;
}
.hot-channel > a {
  font-weight: 900;
  color: #fa886f;
  margin-right: 12px;
}
.hot-channel .post {
  padding: 14px 0 0;
  border: 0;
  box-shadow: none;
  background: none;
  margin: 0;
}
.hot-channel .post p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.muted {
  font-size: 13px;
  color: #9b8a7e;
  margin: 8px 0 14px;
}
.empty {
  padding: 24px;
  color: #9b8a7e;
  text-align: center;
}
.country-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 22px;
}
.country-label {
  display: block;
  font-size: 11px;
  color: #9b8a7e;
}
#countryChoice {
  max-width: 100%;
  border: 1px solid #eadfd6;
  border-radius: 12px;
  padding: 5px;
  background: white;
  margin-top: 6px;
  font-size: 12px;
}
.page-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}
.page-view > .card {
  margin: 24px 0;
}
.page-heading {
  text-align: center;
  margin: 24px 0;
}
.page-heading p {
  color: #9b8a7e;
  margin-top: 10px;
}
.prose {
  padding: 36px !important;
  line-height: 1.85;
}
.prose h3 {
  margin: 24px 0 8px;
}
.prose p {
  margin: 12px 0;
}
.town-map {
  position: relative;
  aspect-ratio: 1.5;
  border: 12px solid white;
  border-radius: 28px;
  background: #eff0d9 url("/town.svg") center/cover;
  box-shadow: 0 18px 50px #d69c8220;
}
.building {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  min-height: 65px;
  text-align: center;
  color: #695642;
  z-index: 1;
}
.building > span {
  font-size: 23px;
  background: #fff4cb;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 15px #ffda66;
  padding: 4px;
  transition: transform 0.2s;
}
.building > strong {
  font-size: 12px;
  border-radius: 12px;
  background: #fffaf0ed;
  padding: 3px 8px;
  white-space: nowrap;
}
.building small {
  display: none;
  background: white;
  border-radius: 8px;
  padding: 6px;
  max-width: 145px;
}
.building:hover,
.building:focus {
  z-index: 3;
}
.building:hover > span,
.building:focus > span {
  transform: scale(1.18);
}
.building:hover small,
.building:focus small {
  display: block;
}
.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f1e5df;
  padding: 15px 0;
}
.ledger-row small {
  display: block;
  color: #9b8a7e;
}
.profile-hero {
  text-align: center;
  padding: 20px;
}
.profile-hero > .avatar {
  display: inline-flex;
  width: 96px;
  height: 96px;
  font-size: 38px;
}
.profile-hero h2 {
  margin: 14px 0;
}
.profile-hero p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
dialog {
  border: 1px solid #efdfd4;
  border-radius: 26px;
  max-width: min(700px, calc(100vw - 24px));
  width: 600px;
  max-height: 85vh;
  padding: 30px;
  background: #fffcf8;
  color: #554849;
  margin: auto;
  box-shadow: 0 30px 100px #2e203c33;
}
dialog::backdrop {
  background: #30223880;
  backdrop-filter: blur(4px);
}
.dialog-close {
  position: sticky;
  float: right;
  top: 0;
  border: 0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background: #f3e9e0;
  font-size: 23px;
  z-index: 2;
}
dialog label {
  display: block;
  margin: 16px 0 5px;
  font-size: 13px;
  font-weight: 800;
}
dialog input,
dialog textarea,
dialog select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #e5dbd0;
  border-radius: 12px;
  padding: 10px;
  background: white;
  color: inherit;
}
dialog .jbtn {
  margin-top: 14px;
}
.secondary {
  background: #eee4dc !important;
  color: #665349 !important;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: #514658;
  color: white;
  padding: 12px 24px;
  border-radius: 20px;
  max-width: 90vw;
}
#replyContext {
  padding: 8px;
  border-radius: 12px;
  background: #fff1d9;
  font-size: 12px;
  margin-bottom: 10px;
}
@media (min-width: 800px) {
  header.hero {
    padding: 32px 20px 22px !important;
  }
  .hero .mascot {
    width: 85px;
    height: 85px;
    vertical-align: middle;
  }
  .hero h1.wordmark {
    display: inline-block;
    vertical-align: middle;
    margin-left: 16px;
    font-size: 62px;
  }
  .tagline {
    font-size: 16px !important;
  }
  .town-strip {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 700px) {
  .town-strip {
    margin: 0 20px 20px;
    height: 110px;
  }
  .town-strip > a {
    font-size: 10px;
  }
  .town-map {
    aspect-ratio: 1;
    min-height: 0;
    background-size: 100% 100%;
    border-width: 7px;
  }
  .building {
    min-width: 72px;
  }
  .building > strong {
    font-size: 9px;
    max-width: 85px;
    white-space: normal;
  }
  .building > span {
    font-size: 20px;
  }
  .page-view {
    padding: 0 12px;
  }
  .thread {
    margin-left: 8px;
    padding-left: 6px;
  }
  .post {
    gap: 10px !important;
  }
  .post .avatar {
    width: 38px !important;
    height: 38px !important;
  }
  .site-nav {
    gap: 6px;
  }
  .site-nav a {
    font-size: 12px;
    padding: 8px 12px;
  }
  dialog {
    padding: 20px;
  }
  .prose {
    padding: 22px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stroller {
    animation: none;
  }
  .building > span {
    transition: none;
  }
}
.faces > p {
  grid-column: 1/-1;
  width: 100%;
  min-width: 0;
}
.stroller .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chan {
  overflow-wrap: anywhere;
  gap: 8px;
  font-size: 13px !important;
}
.chan .count {
  flex-shrink: 0;
}
#boardView {
  max-width: 1340px;
}
#boardView .grid > * {
  min-width: 0;
}
.people-sidebar {
  align-self: start;
}
@media (min-width: 821px) {
  #boardView .grid {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .people-sidebar {
    grid-column: 2;
  }
}
@media (min-width: 1180px) {
  #boardView .grid {
    grid-template-columns: 280px minmax(0, 1fr) 260px;
  }
  .people-sidebar {
    grid-column: 3;
    grid-row: 1;
  }
}

.channels .site-nav {
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.channels .site-nav a {
  padding: 8px 12px;
  font-size: 14px;
}
.channels .site-nav a[href="/"] {
  display: none;
}

/* Compact live activity stays below the content without covering its last row. */
body {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
.pulse-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: #fffcf9;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px #3d3a4b08;
}
.pulse-title {
  font-weight: 900;
  white-space: nowrap;
}
.pulse-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.pulse-track {
  display: flex;
  width: max-content;
  animation: none;
}
.pulse-items {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
}
.pulse-items p {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.pulse-items .country-flags {
  margin: 0;
  flex-wrap: nowrap;
  font-size: 17px;
}
.country-flags:empty {
  display: none;
}
.pulse-pause {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink-soft);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.pulse-country {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pulse-country #countryChoice {
  margin: 0;
  max-width: 130px;
}
.pulse-bar:hover .pulse-track,
.pulse-bar:focus-within .pulse-track,
.pulse-bar.is-paused .pulse-track {
  animation-play-state: paused;
}
.pulse-bar.is-paused .pulse-window {
  overflow-x: auto;
}
@keyframes pulse-scroll {
  to {
    transform: translateX(-50%);
  }
}
@media (max-width: 600px) {
  .pulse-bar {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .pulse-country {
    flex-direction: column;
    gap: 2px;
  }
  .pulse-country #countryChoice {
    max-width: 112px;
  }
  .pulse-title {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-track {
    animation: none;
  }
  .pulse-copy,
  .pulse-pause {
    display: none;
  }
  .pulse-window {
    overflow-x: auto;
  }
}

.people-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--accent-soft);
}
.people-tabs button {
  flex: 1;
  padding: 9px 5px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.people-tabs button[aria-selected="true"] {
  background: white;
  color: var(--accent);
  box-shadow: 0 2px 8px #3d3a4b0d;
}
.people-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.community-people .muted {
  font-size: 13px;
  margin-bottom: 12px;
}

.pulse-bar:not(.needs-scroll) .pulse-copy,
.pulse-bar:not(.needs-scroll) .pulse-pause {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-bar.needs-scroll .pulse-track {
    animation-name: pulse-scroll;
    animation-duration: 36s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
}

/* A small radar-style shortcut to the full community map. */
.town-strip {
  position: fixed;
  right: 20px;
  bottom: calc(var(--pulse-height, 68px) + 16px);
  z-index: 15;
  width: 150px;
  height: 150px;
  margin: 0;
  border: 5px solid #fffdf8;
  border-radius: 50%;
  background-position: center;
  background-size: 100% 100%;
  box-shadow:
    0 0 0 1px #a9b89b,
    0 6px 24px #3d3a4b26;
}
.town-strip > a {
  inset: 0;
  transform: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 14px;
  background: transparent;
  border-radius: 50%;
  font-size: 12px;
}
.town-strip > a span {
  background: #fffdf6ee;
  border-radius: 12px;
  padding: 3px 10px;
}
.town-strip:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.minimap-north {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 900;
  color: #52694c;
}
.minimap-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid white;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 4px #0003;
}
@media (max-width: 700px) {
  .town-strip {
    width: 100px;
    height: 100px;
    right: 12px;
    bottom: calc(var(--pulse-height, 68px) + 12px);
    border-width: 4px;
  }
  .town-strip > a {
    font-size: 10px;
    padding-bottom: 8px;
  }
  .minimap-north {
    top: 3px;
    font-size: 9px;
  }
}

.post-composer #jText {
  min-height: 100px;
  background: transparent;
  font-size: 16px;
}
.post-composer .jrow {
  justify-content: space-between;
}
.post-composer #jPost {
  width: auto;
  min-width: 110px;
}
.post-composer .jcount {
  margin-top: 8px;
}

.account-sidebar {
  align-self: start;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: flex-start;
}
.account-actions .jlink {
  padding-left: 0;
  text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
  .town-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
      from 0deg,
      transparent 0deg 285deg,
      #7c5cff08 310deg,
      #7c5cff38 359deg,
      transparent 360deg
    );
    pointer-events: none;
    animation: minimap-sweep 9s linear infinite;
  }
  .minimap-dot {
    animation: minimap-pulse 3s ease-in-out infinite;
  }
  .minimap-dot:nth-child(2n) {
    animation-delay: -1s;
  }
  .minimap-dot:nth-child(3n) {
    animation-delay: -2s;
  }
  .town-strip:hover::before,
  .town-strip:hover .minimap-dot,
  .town-strip:focus-within::before,
  .town-strip:focus-within .minimap-dot {
    animation-play-state: paused;
  }
}
@keyframes minimap-sweep {
  to {
    transform: rotate(360deg);
  }
}
@keyframes minimap-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 #7c5cff35;
  }
  50% {
    box-shadow: 0 0 0 5px #7c5cff00;
  }
}

.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fbfaff;
  color: var(--ink-soft);
  font-size: 12px;
}
.reaction-button:hover,
.reaction-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.reaction-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.demo-label {
  display: block;
  font-size: 10px;
  color: #8a6a35;
  line-height: 1.3;
}
.demo-badge {
  background: #fff4d9;
  color: #8a6a35;
}
