:root {
  --community-ink: #123c2b;
  --community-ink-soft: #526d61;
  --community-green: #278a56;
  --community-green-dark: #176640;
  --community-mint: #e8f6ec;
  --community-cream: #fbf8ef;
  --community-paper: rgba(255, 255, 252, 0.82);
  --community-line: rgba(27, 100, 63, 0.14);
  --community-shadow: 0 24px 70px rgba(31, 73, 51, 0.12);
  --community-radius-xl: 34px;
  --community-radius-lg: 26px;
  --community-radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.community-page {
  min-height: 100vh;
  margin: 0;
  color: var(--community-ink);
  font-family: "DM Sans", sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(115, 218, 158, 0.24), transparent 27rem),
    radial-gradient(circle at 92% 14%, rgba(246, 216, 154, 0.24), transparent 30rem),
    linear-gradient(135deg, #edf8f0 0%, #fbf8ef 53%, #f1f7ed 100%);
  background-attachment: fixed;
}

body.community-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.45;
  background-image: linear-gradient(rgba(31, 106, 67, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 106, 67, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

.community-page h1,
.community-page h2,
.community-page h3,
.community-page p {
  margin-top: 0;
}

.community-page h1,
.community-page h2,
.community-page h3 {
  font-family: "Inika", serif;
}

.community-page button,
.community-page input,
.community-page select,
.community-page textarea {
  font: inherit;
}

.community-page button,
.community-page a {
  -webkit-tap-highlight-color: transparent;
}

.community-shell {
  width: min(1500px, calc(100% - 40px));
  margin: 28px auto 72px;
  display: grid;
  gap: 24px;
}

.community-profile-hero,
.community-world-card,
.community-collection {
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--community-shadow);
  backdrop-filter: blur(22px) saturate(125%);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
}

.community-profile-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(310px, 0.75fr);
  align-items: center;
  gap: 28px;
  padding: 28px 32px;
  border-radius: var(--community-radius-xl);
  background:
    linear-gradient(112deg, rgba(255, 255, 252, 0.92), rgba(238, 250, 241, 0.78)),
    var(--community-paper);
}

.community-profile-hero::after {
  position: absolute;
  top: -80px;
  right: 18%;
  width: 250px;
  height: 250px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(39, 138, 86, 0.1);
  border-radius: 50%;
}

.community-profile-main,
.community-profile-copy,
.community-hero-actions,
.community-stats-bar {
  position: relative;
  z-index: 1;
}

.community-profile-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.community-identity-avatar {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Inika", serif;
  font-size: 1.35rem;
  font-weight: 700;
  border: 6px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: linear-gradient(145deg, #3aa56a, #155b3a);
  box-shadow: 0 14px 34px rgba(24, 99, 62, 0.22);
}

.community-identity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-eyebrow,
.community-panel-label {
  display: inline-block;
  color: #428060;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.community-profile-copy h1 {
  margin: 5px 0 7px;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.community-profile-copy p {
  max-width: 590px;
  margin-bottom: 0;
  color: var(--community-ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.community-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}

.community-primary-btn,
.community-secondary-btn,
.community-map-manage,
.load-more-btn,
.form-submit-btn,
.form-cancel-btn,
.delete-post-confirm-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.community-primary-btn,
.form-submit-btn {
  color: #fff;
  border: 1px solid #237c50;
  background: linear-gradient(135deg, #1d7348, #3ba768);
  box-shadow: 0 12px 26px rgba(36, 130, 81, 0.2);
}

.community-secondary-btn,
.community-map-manage,
.load-more-btn,
.form-cancel-btn {
  color: var(--community-ink);
  border: 1px solid var(--community-line);
  background: rgba(255, 255, 255, 0.72);
}

.community-primary-btn:hover,
.community-secondary-btn:hover,
.community-map-manage:hover,
.load-more-btn:hover,
.form-submit-btn:hover,
.form-cancel-btn:hover,
.delete-post-confirm-btn:hover {
  transform: translateY(-2px);
}

.community-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--community-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
}

.community-stat {
  min-width: 0;
  padding: 15px 12px;
  text-align: center;
}

.community-stat + .community-stat {
  border-left: 1px solid var(--community-line);
}

.community-stat strong,
.community-stat span {
  display: block;
}

.community-stat strong {
  font-family: "Inika", serif;
  font-size: 1.45rem;
}

.community-stat span {
  margin-top: 2px;
  color: var(--community-ink-soft);
  font-size: 0.72rem;
  line-height: 1.25;
}

.community-world-card {
  overflow: hidden;
  padding: 22px 24px 24px;
  border-radius: var(--community-radius-xl);
  background: rgba(250, 252, 246, 0.82);
}

.community-world-head,
.community-world-title-row,
.community-collection-head,
.community-controls,
.post-card-header,
.post-card-footer,
.post-author-link,
.post-card-owner-actions,
.modal-header,
.modal-actions,
.form-actions,
.country-picker-meta {
  display: flex;
  align-items: center;
}

.community-world-head,
.community-collection-head,
.community-controls,
.modal-header,
.modal-actions,
.form-actions,
.country-picker-meta {
  justify-content: space-between;
}

.community-world-title-row {
  gap: 14px;
  margin-top: 4px;
}

.community-world-title-row h2,
.community-collection-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.community-world-count {
  padding: 8px 12px;
  color: var(--community-green-dark);
  font-size: 0.78rem;
  border: 1px solid rgba(39, 138, 86, 0.16);
  border-radius: 99px;
  background: var(--community-mint);
}

.community-map-manage {
  min-height: 44px;
}

.community-world-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  margin-top: 17px;
}

.community-world-map-frame {
  position: relative;
  height: clamp(270px, 26vw, 390px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(64, 125, 111, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(196, 235, 216, 0.82), transparent 42%),
    radial-gradient(ellipse at 90% 90%, rgba(238, 248, 220, 0.72), transparent 40%),
    linear-gradient(125deg, #c5e4df 0%, #d9ede7 48%, #edf3df 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.community-world-map {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  transition: opacity 450ms ease;
}

.community-world-map.is-ready {
  opacity: 1;
  pointer-events: auto;
}

.community-world-map-frame.is-zoomed {
  box-shadow: inset 0 0 0 1px rgba(40, 130, 79, 0.08);
}

.community-world-map-frame.is-dragging {
  cursor: grabbing;
}

.community-world-list {
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--community-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
}

.community-world-list-label {
  display: block;
  margin-bottom: 14px;
  color: var(--community-ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.community-world-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.community-world-chip {
  padding: 8px 10px;
  color: #185e3d;
  font-size: 0.79rem;
  font-weight: 600;
  border: 1px solid rgba(39, 138, 86, 0.14);
  border-radius: 10px;
  background: rgba(225, 245, 231, 0.86);
}

.community-world-chip--muted {
  color: var(--community-ink-soft);
  background: rgba(255, 255, 255, 0.72);
}

.community-collection {
  padding: 30px;
  border-radius: var(--community-radius-xl);
  background: rgba(255, 255, 252, 0.77);
}

.community-collection-head {
  gap: 24px;
  margin-bottom: 24px;
}

.community-collection-head p {
  max-width: 440px;
  margin-bottom: 0;
  color: var(--community-ink-soft);
  line-height: 1.6;
}

.community-controls {
  gap: 18px;
  margin-bottom: 26px;
  padding: 10px;
  border: 1px solid var(--community-line);
  border-radius: 20px;
  background: rgba(243, 249, 242, 0.8);
}

.category-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 15px;
  color: var(--community-ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
}

.cat-pill:hover,
.cat-pill.active {
  color: #fff;
  background: var(--community-green-dark);
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sort-controls label {
  color: var(--community-ink-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.sort-select {
  min-height: 40px;
  padding: 0 36px 0 13px;
  color: var(--community-ink);
  font-weight: 600;
  border: 1px solid var(--community-line);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.9);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 360px));
  justify-content: center;
  gap: 18px;
}

.post-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(31, 102, 65, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 38px rgba(30, 74, 49, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 137, 84, 0.28);
  box-shadow: 0 22px 48px rgba(30, 74, 49, 0.13);
}

.post-card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e7eee8;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.2,.75,.2,1);
}

.post-card:hover .post-card-image img {
  transform: scale(1.035);
}

.post-card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 46, 29, 0.32), transparent 48%);
}

.post-category-badge,
.post-category-inline {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9px;
  background: rgba(18, 60, 43, 0.84);
}

.post-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  backdrop-filter: blur(8px);
}

.post-photo-nav {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(12, 52, 33, 0.72);
  backdrop-filter: blur(9px);
}

.post-photo-nav-btn {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.post-card-header {
  min-height: 58px;
  gap: 9px;
  padding: 13px 15px 9px;
}

.post-author-link {
  min-width: 0;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.post-author-avatar,
.comment-avatar,
.post-validator-avatar {
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  background: linear-gradient(145deg, #59b77b, #1b6843);
}

.post-author-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.post-author-avatar img,
.comment-avatar img,
.post-validator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-name,
.post-time {
  display: block;
}

.post-author-name {
  max-width: 155px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-time {
  margin-top: 2px;
  color: var(--community-ink-soft);
  font-size: 0.69rem;
}

.post-card-owner-actions {
  margin-left: auto;
  gap: 5px;
}

.post-edit-btn,
.post-delete-btn,
.post-action-btn,
.post-validate-btn,
.view-all-comments-btn,
.comment-send-btn,
.comment-submit-btn,
.modal-close-btn,
.photo-preview-remove {
  cursor: pointer;
}

.post-edit-btn,
.post-delete-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: #416457;
  font-size: 0.69rem;
  font-weight: 700;
  border: 1px solid var(--community-line);
  border-radius: 10px;
  background: rgba(248, 251, 247, 0.92);
}

.post-delete-btn {
  color: #a0483b;
}

.post-card-body {
  flex: 1;
  padding: 4px 15px 13px;
}

.post-location {
  margin: 5px 0 8px;
  overflow: hidden;
  color: #4d7864;
  font-size: 0.76rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-title {
  margin: 0 0 8px;
  font-size: clamp(1.12rem, 1.6vw, 1.38rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.post-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 10px;
  color: var(--community-ink-soft);
  font-size: 0.86rem;
  line-height: 1.62;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  color: #e3a82f;
  font-size: 0.92rem;
}

.post-rating .empty {
  color: #dce5de;
}

.post-trust {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(42, 130, 81, 0.1);
  border-radius: 14px;
  background: #f3f8f3;
}

.post-trust-score strong,
.post-trust-score span,
.post-trust-label {
  display: block;
}

.post-trust-score strong {
  font-family: "Inika", serif;
  font-size: 1rem;
}

.post-trust-score span,
.post-trust-copy p {
  color: var(--community-ink-soft);
  font-size: 0.61rem;
}

.post-trust-label {
  font-size: 0.7rem;
  font-weight: 700;
}

.post-trust-copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 2px 0 0;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.post-trust-validators {
  display: flex;
}

.post-validator-avatar {
  width: 25px;
  height: 25px;
  margin-left: -6px;
  border: 2px solid #fff;
  font-size: 0.58rem;
}

.post-card-footer {
  gap: 6px;
  padding: 10px 15px 13px;
  border-top: 1px solid rgba(25, 94, 59, 0.08);
}

.post-action-btn,
.post-validate-btn {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  color: #315c49;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--community-line);
  border-radius: 11px;
  background: #f8fbf7;
}

.post-action-btn.liked {
  color: #c84d53;
  border-color: rgba(200, 77, 83, 0.2);
  background: #fff4f4;
}

.commentary-icon {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 17px;
  object-fit: contain;
  opacity: 0.72;
}

.comment-toggle-btn .commentary-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.comment-send-btn .commentary-icon,
.comment-submit-btn .commentary-icon {
  filter: invert(1);
  opacity: 1;
}

.commentary-heading-icon {
  width: 23px;
  height: 23px;
  display: inline-block;
  margin-right: 9px;
  vertical-align: -3px;
}

.post-action-spacer {
  flex: 1;
}

.post-validate-btn {
  color: #fff;
  border-color: #287f52;
  background: #287f52;
}

.post-validate-btn.is-disabled {
  color: #7b8e84;
  border-color: var(--community-line);
  background: #eef3ef;
}

.post-comments {
  display: none;
}

.posts-empty {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  text-align: center;
  border: 1px dashed rgba(37, 129, 81, 0.26);
  border-radius: 24px;
  background: rgba(240, 248, 240, 0.65);
}

.posts-empty-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  color: #fff;
  font-family: "Inika", serif;
  border-radius: 17px;
  background: var(--community-green-dark);
}

.posts-empty h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.posts-empty p {
  max-width: 510px;
  margin-bottom: 20px;
  color: var(--community-ink-soft);
}

.posts-skeleton {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 360px));
  justify-content: center;
  gap: 18px;
}

.post-skeleton-card {
  min-height: 390px;
  border-radius: 24px;
  background: linear-gradient(100deg, #edf2ed 20%, #f8faf7 36%, #edf2ed 52%);
  background-size: 200% 100%;
  animation: community-shimmer 1.35s linear infinite;
}

@keyframes community-shimmer {
  to { background-position-x: -200%; }
}

.load-more-wrap {
  padding-top: 26px;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  overflow-y: auto;
  padding: 34px 18px;
  background: rgba(11, 38, 27, 0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.create-post-modal,
.comments-modal,
.delete-post-modal,
.country-picker-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 68px);
  overflow: auto;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  background:
    radial-gradient(circle at 95% 0%, rgba(94, 190, 130, 0.13), transparent 20rem),
    #fbfdf9;
  box-shadow: 0 35px 90px rgba(8, 42, 26, 0.28);
}

.comments-modal,
.delete-post-modal,
.country-picker-modal {
  width: min(650px, 100%);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--community-line);
  background: rgba(251, 253, 249, 0.92);
  backdrop-filter: blur(18px);
}

.modal-header h2 {
  margin: 3px 0 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.1;
}

.modal-close-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  color: #315b49;
  font-size: 1.6rem;
  line-height: 1;
  border: 1px solid var(--community-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
}

.create-post-form {
  padding: 0 28px 28px;
}

.form-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--community-line);
}

.form-section-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.form-section-head > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
  background: var(--community-green-dark);
}

.form-section-head h3 {
  margin: 0;
  font-size: 1.15rem;
}

.form-section-head p {
  margin: 3px 0 0;
  color: var(--community-ink-soft);
  font-size: 0.78rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cat-option {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--community-line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.cat-option:hover,
.cat-option.selected {
  transform: translateY(-2px);
  border-color: rgba(34, 140, 83, 0.44);
  background: #edf9f0;
}

.cat-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-option-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--community-mint);
}

.cat-option-label,
.cat-option-hint {
  display: block;
}

.cat-option-label {
  font-size: 0.79rem;
  font-weight: 700;
}

.cat-option-hint {
  margin-top: 2px;
  overflow: hidden;
  color: var(--community-ink-soft);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  position: relative;
  margin-bottom: 15px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label,
.form-label,
.country-picker-search > span {
  display: block;
  margin-bottom: 7px;
  color: #2d5b46;
  font-size: 0.76rem;
  font-weight: 700;
}

.form-optional {
  color: #7d9188;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea,
.country-picker-search input,
#comment-textarea {
  width: 100%;
  color: var(--community-ink);
  border: 1px solid rgba(32, 104, 66, 0.17);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.93);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-field input,
.form-field select,
.country-picker-search input {
  min-height: 50px;
  padding: 0 14px;
}

.form-field textarea,
#comment-textarea {
  min-height: 130px;
  padding: 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.country-picker-search input:focus,
#comment-textarea:focus {
  border-color: rgba(37, 139, 84, 0.62);
  box-shadow: 0 0 0 4px rgba(48, 161, 96, 0.11);
}

.form-field select:disabled {
  opacity: 0.6;
}

.char-counter {
  position: absolute;
  right: 11px;
  bottom: 8px;
  color: #819188;
  font-size: 0.64rem;
}

.form-rating-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 16px;
  border: 1px solid var(--community-line);
  border-radius: 15px;
  background: rgba(247, 250, 246, 0.86);
}

.form-rating-section .form-label {
  margin: 0;
}

.star-rating {
  display: flex;
  gap: 3px;
}

.star-btn {
  padding: 2px;
  color: #d9e1db;
  font-size: 1.55rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.star-btn:hover,
.star-btn.active {
  color: #dfaa39;
}

.photo-upload-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 15px;
  border: 1px dashed rgba(34, 126, 75, 0.38);
  border-radius: 18px;
  background: rgba(235, 248, 239, 0.66);
  cursor: pointer;
}

.photo-upload-zone.dragover {
  border-color: var(--community-green);
  background: #e4f6e9;
}

.photo-upload-symbol {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  border-radius: 14px;
  background: var(--community-green-dark);
}

.photo-upload-copy strong,
.photo-upload-copy small {
  display: block;
}

.photo-upload-copy small {
  margin-top: 3px;
  color: var(--community-ink-soft);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.photo-preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 13px;
  background: #edf1ed;
}

.photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  border: 0;
  border-radius: 9px;
  background: rgba(24, 50, 38, 0.82);
}

.photo-preview-existing-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 4px 6px;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(21, 91, 57, 0.82);
}

.photo-edit-hint {
  margin: 10px 0 0;
  color: var(--community-ink-soft);
  font-size: 0.72rem;
}

.form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  color: #983b31;
  font-size: 0.78rem;
  border: 1px solid rgba(190, 63, 49, 0.18);
  border-radius: 13px;
  background: #fff1ed;
}

.form-actions,
.modal-actions {
  gap: 10px;
}

.form-actions {
  padding-top: 24px;
}

.modal-actions {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--community-line);
}

.form-cancel-btn,
.form-submit-btn,
.delete-post-confirm-btn {
  min-width: 130px;
  border-style: solid;
}

.delete-post-confirm-btn {
  color: #fff;
  border: 1px solid #a83d35;
  background: #a83d35;
}

.country-picker-body,
.delete-post-modal-body {
  padding: 24px 28px;
}

.country-picker-body > p,
.delete-post-modal-body > p {
  color: var(--community-ink-soft);
  line-height: 1.6;
}

.country-picker-search {
  display: block;
  margin-top: 20px;
}

.country-picker-meta {
  gap: 14px;
  margin: 16px 0 12px;
  color: var(--community-ink-soft);
  font-size: 0.7rem;
}

.country-picker-meta strong {
  color: var(--community-ink);
  font-size: 0.8rem;
}

.country-picker-list {
  max-height: 350px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-right: 4px;
}

.country-picker-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 9px 11px;
  border: 1px solid var(--community-line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
}

.country-picker-option input {
  position: absolute;
  opacity: 0;
}

.country-picker-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(39, 117, 73, 0.25);
  border-radius: 7px;
  background: #f4f8f4;
}

.country-picker-option input:checked + .country-picker-check {
  border-color: var(--community-green);
  background: var(--community-green);
}

.country-picker-option input:checked + .country-picker-check::after {
  content: "✓";
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.country-picker-name {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-picker-code,
.country-picker-source {
  color: #829188;
  font-size: 0.62rem;
  font-weight: 700;
}

.country-picker-source {
  padding: 4px 6px;
  color: #28784f;
  border-radius: 7px;
  background: #e7f6eb;
}

.country-picker-option.is-automatic {
  cursor: default;
  background: #f3f8f3;
}

.country-picker-empty {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--community-line);
  border-radius: 14px;
}

.comments-list {
  max-height: 55vh;
  overflow-y: auto;
  padding: 20px 28px;
}

.comment-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 13px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
}

.comment-bubble {
  padding: 11px 13px;
  border-radius: 4px 15px 15px;
  background: #f0f6f1;
}

.comment-author,
.comment-meta {
  display: block;
  font-size: 0.68rem;
}

.comment-author {
  font-weight: 700;
}

.comment-text {
  margin: 4px 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.comment-meta {
  color: var(--community-ink-soft);
}

.comment-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--community-line);
}

#comment-textarea {
  min-height: 58px;
}

.comment-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  color: #fff;
  font-weight: 700;
  border: 0;
  border-radius: 14px;
  background: var(--community-green-dark);
}

.comment-login-prompt {
  padding: 20px 28px;
  text-align: center;
  border-top: 1px solid var(--community-line);
}

.delete-post-target {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(169, 61, 53, 0.12);
  border-radius: 14px;
  background: #fff6f3;
}

.delete-post-target span {
  color: #8a5e57;
  font-size: 0.67rem;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 1120px) {
  .community-profile-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .community-stats-bar {
    grid-column: 1 / -1;
  }

  .posts-grid,
  .posts-skeleton {
    grid-template-columns: repeat(2, minmax(260px, 360px));
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .community-shell {
    width: min(100% - 24px, 720px);
    margin-top: 18px;
  }

  .community-profile-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .community-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-world-card,
  .community-collection {
    padding: 24px;
  }

  .community-world-layout {
    grid-template-columns: 1fr;
  }

  .community-world-list {
    min-height: 0;
  }

  .community-world-map-frame {
    height: 300px;
  }

  .community-collection-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .community-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-controls {
    justify-content: space-between;
  }

  .sort-select {
    flex: 1;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .community-shell {
    width: min(100% - 16px, 520px);
    gap: 14px;
    margin: 10px auto 45px;
  }

  .community-profile-hero,
  .community-world-card,
  .community-collection {
    border-radius: 24px;
  }

  .community-profile-hero,
  .community-world-card,
  .community-collection {
    padding: 18px;
  }

  .community-profile-main {
    align-items: flex-start;
    gap: 13px;
  }

  .community-identity-avatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-width: 4px;
    border-radius: 20px;
  }

  .community-profile-copy h1 {
    font-size: 1.85rem;
  }

  .community-profile-copy p {
    font-size: 0.84rem;
    line-height: 1.5;
  }

  .community-hero-actions {
    grid-template-columns: 1fr;
  }

  .community-stats-bar {
    border-radius: 16px;
  }

  .community-stat {
    padding: 12px 7px;
  }

  .community-stat strong {
    font-size: 1.2rem;
  }

  .community-stat span {
    font-size: 0.61rem;
  }

  .community-world-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .community-world-title-row {
    flex-wrap: wrap;
  }

  .community-world-title-row h2,
  .community-collection-head h2 {
    font-size: 2rem;
  }

  .community-map-manage {
    width: 100%;
  }

  .community-world-layout {
    margin-top: 16px;
  }

  .community-world-map-frame {
    height: 215px;
    border-radius: 18px;
  }

  .community-world-list {
    padding: 15px;
    border-radius: 18px;
  }

  .posts-grid,
  .posts-skeleton {
    grid-template-columns: minmax(0, 430px);
    justify-content: center;
  }

  .post-card {
    border-radius: 20px;
  }

  .post-card-owner-actions .post-action-text,
  .post-edit-btn > span:last-child {
    display: none;
  }

  .post-edit-btn,
  .post-delete-btn {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .create-post-modal,
  .comments-modal,
  .delete-post-modal,
  .country-picker-modal {
    max-height: calc(100vh - 16px);
    border-radius: 22px;
  }

  .modal-header,
  .create-post-form,
  .country-picker-body,
  .delete-post-modal-body,
  .comments-list,
  .comment-input-wrap,
  .modal-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .category-grid,
  .form-location-grid,
  .country-picker-list {
    grid-template-columns: 1fr;
  }

  .photo-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .country-picker-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .form-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .form-cancel-btn,
  .form-submit-btn,
  .delete-post-confirm-btn {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-skeleton-card {
    animation: none;
  }

  .post-card,
  .post-card-image img,
  .community-primary-btn,
  .community-secondary-btn {
    transition: none;
  }
}
