/* Shared, locally saved family creativity; extends the established town artwork. */
.village-home-banner {
  background: linear-gradient(115deg, #eee7f3, #e5eedc 70%, #faefd8);
}
.village-town-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #eee9f2;
  border: 1px solid #e0d7e9;
  border-radius: 16px;
  padding: 12px 18px;
  margin: 12px 0 22px;
  font-size: 12px;
  color: #766985;
}
.village-town-link button {
  background: #fffbf6;
  font-size: 12px;
  min-height: 44px;
}
.family-village {
  --village-purple: #8c78a1;
}
.village-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 22px;
}
.village-heading h2 {
  font: 500 37px Fredoka;
  color: #6e6382;
  margin: 9px 0;
}
.village-heading p {
  color: #7a7d71;
  font-size: 14px;
  margin: 7px 0;
}
.village-refresh {
  background: #ede8f1;
  font-size: 12px;
  white-space: nowrap;
  min-height: 44px;
}
.village-builders {
  display: flex;
  gap: 20px;
  align-items: center;
  background: linear-gradient(110deg, #f2edf5, #f5f1e2);
  border: 1px solid #e4ddec;
  border-radius: 22px;
  padding: 19px 22px;
}
.village-builders > div:first-child {
  min-width: 190px;
}
.village-builders p {
  font-size: 12px;
  color: #7c7784;
  line-height: 1.7;
  margin: 7px 0;
}
.village-builder-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}
.village-builder-buttons button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 3px 9px;
  background: #fffaf3;
  border: 1px solid #e6dfd5;
  border-radius: 16px;
  text-align: left;
  padding: 11px 16px;
  min-height: 65px;
}
.village-builder-buttons button > span {
  grid-row: span 2;
  font-size: 28px;
  align-self: center;
}
.village-builder-buttons button > b {
  font: 500 18px Fredoka;
}
.village-builder-buttons button > small {
  font-size: 11px;
  color: #968452;
}
.village-builder-buttons button[aria-pressed="true"] {
  background: #e9e1f1;
  border: 2px solid #ac9abb;
  padding: 10px 15px;
  box-shadow: 0 3px 0 #dbd0e3;
}
.village-local-note {
  font-size: 11px;
  color: #7a826f;
  line-height: 1.9;
  margin: 15px 4px 24px;
  max-width: 850px;
}
.family-village .town-sign {
  color: #6e6877;
}
.family-village .town-sky {
  background: linear-gradient(#e8e2f0, #eff1de);
}
.family-village .theme-blossom .town-sky {
  background: linear-gradient(#f3e1ed, #f9eedc);
}
.family-village .theme-sunset .town-sky {
  background: linear-gradient(#f4dfc3, #f6eccc);
}
.family-village .town-sky:after {
  background: #c8d2b7;
}
.family-village .town-status {
  background: #f0ebf5;
  border-color: #e5dcee;
  color: #7b688c;
}
.family-village .town-cell.selected {
  border-color: #9e87ae;
  background: #f4e6f1b0;
}
.family-village .town-cell.selected:after {
  background: #9b83ad;
}
.village-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.village-together {
  display: flex;
  gap: 18px;
  align-items: center;
  border-radius: 21px;
  background: linear-gradient(115deg, #eef0df, #f7eddd);
  padding: 20px;
  margin: 20px 0;
}
.village-together > span {
  font-size: 35px;
  min-width: 75px;
  max-width: 100px;
  line-height: 1.5;
  text-align: center;
}
.village-together h3 {
  font: 500 24px Fredoka;
  margin: 0 0 8px;
  color: #788263;
}
.village-together p {
  font-size: 12px;
  line-height: 1.8;
  color: #7e846e;
  margin: 7px 0;
}
.village-together button {
  font-size: 12px;
  background: #fffcf4;
  min-height: 44px;
  margin-top: 5px;
}
.village-story {
  border: 1px solid #e5e1d5;
  border-radius: 20px;
  padding: 22px;
  background: #fffdf6;
  margin: 20px 0;
}
.village-story h3 {
  font: 500 24px Fredoka;
  color: #787269;
  margin: 0 0 16px;
}
.village-story > p {
  font-size: 12px;
  line-height: 1.8;
  color: #8b8778;
}
.village-story ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.village-story li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.7;
  color: #7b7d6c;
}
.village-story li > span {
  font-size: 23px;
}
.village-story small {
  display: block;
  font-size: 9px;
  color: #9b9c8a;
  margin-top: 3px;
}
#villageSettings {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: end;
  margin-top: 15px;
}
#villageSettings label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  flex: 1;
  min-width: 160px;
}
#villageSettings input,
#villageSettings select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #ddd7e1;
  border-radius: 10px;
  background: #fff;
}
.family-village .village-tabs button {
  font-size: 11px;
  min-width: 0;
  padding: 10px 5px;
}
.village-projects {
  display: grid;
  gap: 15px;
  margin-top: 17px;
}
.village-project {
  border: 1px solid #e5dfd1;
  border-radius: 20px;
  background: #fffef8;
  overflow: hidden;
  padding: 0 16px 16px;
}
.village-project-picture {
  position: relative;
  margin: 0 -16px 12px;
  display: flex;
  justify-content: center;
  background: linear-gradient(130deg, #edf0dc, #eee5ee);
  padding: 7px;
  min-height: 110px;
}
.village-project-picture svg {
  display: block;
  width: 115px;
  height: 115px;
}
.village-project-picture > span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: #fbfff1dc;
  border: 1px solid #becda9;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 8px;
  color: #718665;
  letter-spacing: 0.8px;
  rotate: -3deg;
}
.village-project h4 {
  font: 500 22px Fredoka;
  color: #70677a;
  margin: 12px 0 7px;
}
.village-project > p {
  font-size: 11px;
  line-height: 1.8;
  color: #83826f;
  margin: 5px 0 11px;
}
.village-project-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #938257;
  margin: 14px 0 7px;
}
.village-project progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #eee8d9;
}
.village-project progress::-webkit-progress-bar {
  background: #eee8d9;
  border-radius: 20px;
}
.village-project progress::-webkit-progress-value {
  background: linear-gradient(90deg, #b8c49e, #a498b6);
  border-radius: 20px;
}
.village-project progress::-moz-progress-bar {
  background: #a69ab8;
  border-radius: 20px;
}
.village-project .village-contributors {
  font-size: 10px;
  color: #8c8097;
  min-height: 30px;
  margin: 10px 0;
  line-height: 1.7;
}
.village-give-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.village-give-buttons button {
  flex: 1;
  min-height: 44px;
  padding: 10px 6px;
  background: #eee7f3;
  font-size: 11px;
  white-space: nowrap;
}
.village-give-buttons button:disabled {
  opacity: 1;
  color: #9c998a;
  background: #f3efe5;
  cursor: default;
  translate: 0 0;
}
.village-project > small {
  display: block;
  font-size: 9px;
  line-height: 1.7;
  margin-top: 9px;
  color: #99977d;
}
.village-built {
  border-color: #c2d2ac;
}
.village-built .village-project-picture {
  background: linear-gradient(130deg, #edf2d9, #e7ead5);
}
.village-built > button {
  background: #e3edda;
  width: 100%;
  font-size: 12px;
  min-height: 44px;
}
.family-village .town-shop-note {
  background: #f0eaf3;
}
.family-village .town-shop-note b {
  color: #7e6b8c;
}
@media (min-width: 1600px) {
  .village-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
  }
  .village-projects {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .village-project {
    padding: 0 12px 12px;
  }
  .village-project-picture {
    margin: 0 -12px 10px;
  }
  .village-project h4 {
    font-size: 19px;
  }
  .village-give-buttons button {
    font-size: 10px;
    min-width: 42px;
  }
  .village-project-picture > span {
    font-size: 7px;
    right: 4px;
  }
}
@media (max-width: 1100px) {
  .village-projects {
    grid-template-columns: 1fr 1fr;
  }
  .village-heading h2 {
    font-size: 33px;
  }
  .village-builders {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .village-builder-buttons {
    width: 100%;
  }
}
@media (max-width: 650px) {
  .village-heading {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .village-heading h2 {
    font-size: 29px;
    line-height: 1.25;
  }
  .village-heading p {
    font-size: 12px;
  }
  .village-refresh {
    font-size: 11px;
    padding: 10px 13px;
  }
  .village-builders {
    padding: 17px;
  }
  .village-builder-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .village-builder-buttons button {
    padding: 10px;
    grid-template-columns: 26px 1fr;
    gap: 3px 6px;
    min-width: 0;
  }
  .village-builder-buttons button[aria-pressed="true"] {
    padding: 9px;
  }
  .village-builder-buttons button > b {
    font-size: 16px;
    overflow-wrap: anywhere;
  }
  .village-builder-buttons button > span {
    font-size: 24px;
  }
  .village-builder-buttons button > small {
    font-size: 10px;
  }
  .village-local-note {
    font-size: 10px;
  }
  .village-together {
    padding: 17px;
    gap: 12px;
    align-items: flex-start;
  }
  .village-together > span {
    font-size: 24px;
    min-width: 43px;
    max-width: 45px;
  }
  .village-together h3 {
    font-size: 22px;
  }
  .village-together p {
    font-size: 11px;
  }
  .village-story {
    padding: 18px;
  }
  .village-story h3 {
    font-size: 22px;
  }
  .village-story li {
    font-size: 11px;
  }
  .village-projects {
    grid-template-columns: 1fr;
  }
  .village-project-picture svg {
    width: 125px;
    height: 125px;
  }
  .village-project h4 {
    font-size: 24px;
  }
  .village-project > p {
    font-size: 12px;
  }
  .village-give-buttons button {
    font-size: 12px;
  }
  .village-project .village-contributors {
    font-size: 11px;
  }
  .village-project > small {
    font-size: 10px;
  }
  .village-town-link {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }
  .village-town-link button {
    font-size: 11px;
  }
  .family-village .village-tabs button {
    font-size: 10px;
  }
  .family-village .town-village-footer > span {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .family-village * {
    animation: none !important;
  }
}
