/* Content screens share the home screen's violet surfaces and quieter typography. */
:root {
  --detail-ink: #292638;
  --detail-muted: #635f72;
  --detail-line: #e8e6ef;
  --detail-accent: #6541ce;
  --detail-tint: #f1edff;
  --detail-shadow: 0 4px 16px rgba(43, 30, 87, .035);
}
.page-head {
  padding: 23px 0 25px;
  color: var(--detail-ink);
}
.page-head h1 {
  margin: 12px 0 0;
  font-family: inherit;
  font-size: clamp(29px, 3vw, 40px);
  font-weight: 750;
  line-height: 1.24;
  letter-spacing: -.045em;
}
.page-head p {margin: 9px 0 0; color: var(--detail-muted); font-size: 14px; line-height: 1.6;}
.back-btn {
  min-height: 34px;
  padding: 3px 10px 3px 5px;
  gap: 6px;
  font-size: 13px;
  color: var(--detail-muted);
  border-radius: 9px;
}
.back-btn:hover {background: #eeebf4; color: var(--detail-accent);}
main:not(.view-home) .section-heading {margin-bottom: 15px;}
main:not(.view-home) .section-heading h2 {
  font-family: inherit;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.035em;
}
main:not(.view-home) .section-heading h2 i {display: none;}
main:not(.view-home) .section-heading a {color: var(--detail-muted);}
main:not(.view-home) .section-heading a:hover {color: var(--detail-accent);}
.btn, .primary-btn {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid #d9d6e5;
  background: white;
  color: var(--detail-ink);
  font-size: 14px;
  font-weight: 650;
}
.btn.primary, .primary-btn {background: var(--detail-accent); color: white; border-color: transparent;}
.btn.primary:hover, .primary-btn:hover {background: #5433b2;}
main:not(.view-home) .little-tag {
  color: #63449a;
  background: #f0ebfa;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 8px;
}
main:not(.view-home) :where(a,button,input,textarea,select,summary):focus-visible,
.sheet-panel :where(a,button,input,textarea,select):focus-visible {
  outline: 3px solid #8764df;
  outline-offset: 2px;
}

/* Search and service categories */
.view-services .search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: none;
  padding: 0 18px;
  min-height: 54px;
  color: #75668b;
  background: white;
  border: 1px solid #dbd6e8;
  border-radius: 15px;
  box-shadow: var(--detail-shadow);
}
.view-services .search-box:focus-within {border-color: #926fe7; box-shadow: 0 0 0 3px #efe9fb;}
.view-services .search-box input {width: 100%; height: 52px; border: 0; color: var(--detail-ink); outline: 0; font-size: 15px;}
.view-services .search-box input::placeholder {color: #777286;}
#service-results {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
#service-results .home-section {
  grid-column: span 3;
  min-width: 0;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--detail-line);
  border-radius: 19px;
  background: white;
  box-shadow: var(--detail-shadow);
}
#service-results .home-section:nth-child(n + 3) {grid-column: span 2;}
#service-results .home-section:only-child {grid-column: 1/-1;}
#service-results .section-heading {margin-bottom: 12px;}
#service-results .section-heading h2 {font-size: 18px;}
#service-results .section-heading h2, .view-me .section-heading h2 {color: var(--detail-ink);}
#service-results .service-grid {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;}
#service-results .service-tile {
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 11px 3px;
  min-height: 84px;
  text-align: center;
}
#service-results .service-tile:hover {transform: none; border-color: #ebe6f8; background: #f9f7fc;}
#service-results .service-icon {width: 42px; height: 42px; border-radius: 14px;}
#service-results .service-icon.mint {color: #6752aa; background: #eee9fb;}
#service-results .service-icon.peach {color: #a45030; background: #fbe9e1;}
#service-results .service-icon.blue {color: #4466ab; background: #e9effc;}
#service-results .service-icon.lilac {color: #935488; background: #f4eaf3;}
#service-results .service-icon.yellow {color: #92651c; background: #fcf0d8;}
#service-results .service-icon.aqua {color: #34786e; background: #e1f3ed;}
#service-results .service-tile strong {font-size: 14px; color: var(--detail-ink); letter-spacing: 0; white-space: normal;}
#service-results .service-tile small {display: none;}
.view-services .empty {grid-column: 1/-1; border-radius: 15px; border: 1px dashed #d7d0e6; background: white; color: var(--detail-muted);}

/* Resident identity card and account shortcuts */
.view-me {display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 18px; align-content: start;}
.view-me .page-head, .view-me .home-columns, .view-me .local-note {grid-column: 1/-1;}
.profile-card {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  gap: 16px;
  min-height: 147px;
  padding: 27px;
  background: #514094;
  background-image: linear-gradient(115deg,#4b397f 0%,#6752a6 65%,#8975c2 100%);
  color: white;
  border: 0;
  border-radius: 19px;
  box-shadow: 0 7px 20px #4e367d1c;
}
.profile-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  right: -62px;
  bottom: -151px;
  width: 240px;
  height: 260px;
  border: 18px solid #ffffff16;
  outline: 1px solid #ffffff20;
  outline-offset: 17px;
  border-radius: 50%;
  transform: rotate(32deg);
}
.profile-card .avatar.big {
  background: #eee4fe;
  color: #59348b;
  width: 62px;
  height: 62px;
  border: 3px solid #ffffff5c;
  border-radius: 20px;
  font: 700 27px/1 sans-serif;
  flex: none;
}
.profile-card h2 {font: inherit; font-size: 24px; font-weight: 730; color: white;}
.profile-card p {color: #f1eafb; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere;}
.profile-card > a {display: inline-flex; gap: 4px; padding: 9px; align-items: center; white-space: nowrap; color: white; font-weight: 600; font-size: 12px; border-radius: 10px; background: #ffffff19;}
.profile-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #fff;
  border: 1px solid var(--detail-line);
  border-radius: 19px;
  box-shadow: var(--detail-shadow);
}
.profile-stats a {padding: 10px 4px; min-width: 0;}
.profile-stats a + a {border-color: var(--detail-line);}
.profile-stats strong {font: 720 30px/1.1 "Inter","Segoe UI",sans-serif; color: #413165; font-variant-numeric: tabular-nums;}
.profile-stats span {color: var(--detail-muted); font-size: 13px; margin-top: 7px;}
.view-me .home-columns {gap: 18px; margin-top: 26px; align-items: start;}
.menu-list {border: 1px solid var(--detail-line); background: white; border-radius: 17px; padding: 0 17px; box-shadow: var(--detail-shadow);}
.menu-list a {min-height: 54px; color: var(--detail-ink); padding: 12px 0; gap: 12px;}
.menu-list a + a {border-color: var(--detail-line);}
.menu-list a strong {font-weight: 600;}
.menu-list a > .ui-icon:first-child {box-sizing: content-box; width: 18px; height: 18px; padding: 7px; border-radius: 10px; background: #f0ecfb; color: #6e52b4;}
.menu-list a .ui-icon:last-child {color: #888296;}
.menu-list a:hover {color: var(--detail-accent);}
.local-note {font-size: 12px; color: var(--detail-muted); line-height: 1.6;}

/* Neighbour posts and events */
.neighbor-intro {display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;}
.neighbor-intro #new-post {margin-bottom: 25px; flex-shrink: 0;}
.view-neighbors .filter-chips {
  display: flex; flex-wrap: nowrap; padding: 3px 2px 6px;
  gap: 6px; overflow-x: auto; margin: 0 0 15px;
  scrollbar-width: thin;
}
.filter-chips a {
  flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 7px 13px;
  border-radius: 999px; background: white; border: 1px solid var(--detail-line); color: #5e586d;
  font-size: 13px;
}
.filter-chips a.sel {background: #ede8fb; color: #5930ae; border-color: #dcd1f6; font-weight: 690;}
.social-layout {grid-template-columns: minmax(0,1.8fr) minmax(240px,.78fr); gap: 22px; align-items: start;}
.feed-list {gap: 14px;}
.feed-card,.reply-box,.event-card,.event-detail,.op-list,.op-stat {
  border: 1px solid var(--detail-line);
  border-radius: 18px;
  background: white;
  box-shadow: var(--detail-shadow);
}
.feed-card {padding: 21px 23px 12px;}
.feed-meta .post-avatar {
  border-radius: 50%; border: 0; background: #e9e2fb; color: #6946a2;
  font: 700 16px/1 sans-serif; width: 38px; height: 38px;
}
.feed-card:nth-child(3n + 2) .post-avatar {color: #925332; background: #f7e6df;}
.feed-card:nth-child(3n) .post-avatar {color: #286973; background: #e2f0ef;}
.feed-meta strong {font-size: 14px; line-height: 1.4; color: var(--detail-ink);}
.feed-meta small {font-size: 12px; color: var(--detail-muted);}
.post-copy {margin-top: 15px;}
.post-copy h2 {font-weight: 710; font-size: 20px; color: var(--detail-ink); letter-spacing: -.025em;}
.post-copy p, .reply-list p, .op-case > p, .op-case details p {font-size: 14px; line-height: 1.78; color: #595365;}
.post-copy .post-thumb {margin-top: 13px; border-radius: 13px; object-fit: cover;}
.feed-actions {border-top: 1px solid #efedf4; margin-top: 16px; padding-top: 4px; gap: 17px;}
.feed-actions :is(a,button) {min-height: 38px; padding: 4px; font-size: 13px; color: var(--detail-muted);}
.feed-actions .liked {color: #ac4269;}
.feed-actions .liked svg {fill: #fce2ec;}
.event-card {transition: box-shadow .18s ease-out;}
.event-card:hover {box-shadow: 0 7px 22px #3e2c6412;}
.event-card .event-cover {position: relative; padding: 0; overflow: hidden;}
.event-cover img {width: 100%; height: clamp(170px,19vw,235px); object-fit: cover;}
.event-calendar {
  position: absolute; top: 13px; left: 13px; display: grid; place-items: center; gap: 1px;
  width: 47px; min-height: 53px; padding: 6px 3px; background: #fff; color: var(--detail-ink);
  border-radius: 11px; box-shadow: 0 2px 12px #2820311a;
}
.event-calendar small {color: #73579b; font-size: 11px; font-weight: 650;}
.event-calendar strong {font: 730 22px/1 "Inter","Segoe UI",sans-serif;}
.event-card .event-card-info {padding: 17px 20px 19px;}
.event-card h2,.event-info h2 {font-family: inherit; letter-spacing: -.025em; font-size: 22px; font-weight: 710; color: var(--detail-ink);}
.event-card p,.event-info p {color: var(--detail-muted); font-size: 13px; gap: 8px;}
.event-card p:last-child {margin-bottom: 0;}
.event-desc {color: #585264; border-color: var(--detail-line);}
.event-info .joined {color: #276f59;}
.reply-box {padding: 21px;}
.reply-list > div {border-color: var(--detail-line);}
.inline-form {align-items: stretch;}
.inline-form input,.op-toolbar select {min-height: 42px; color: var(--detail-ink); background: #faf9fc; border-color: #dbd7e4; border-radius: 11px;}

/* Operator screens */
.op-layout {gap: 20px;}
.op-stats {gap: 10px;}
.op-stat {padding: 20px; min-width: 0;}
.op-stat strong {font: 700 clamp(20px,2.1vw,32px)/1.2 "Inter","Segoe UI",sans-serif; color: #453765; font-variant-numeric: tabular-nums;}
.op-stat span {color: var(--detail-muted); font-size: 12px;}
.op-row, .op-case {line-height: 1.55;}
.op-row > div {min-width: 0;}
.op-list > * + * {border-color: var(--detail-line);}
.op-log,.op-row p,.op-case details,.op-settlement {color: var(--detail-muted);}
.op-case details > summary {color: var(--detail-accent); padding: 6px 0;}

/* Dialog and shared form controls */
.sheet-scrim {background: #1f173449; backdrop-filter: blur(4px);}
.sheet-panel {
  background: #fff; color: var(--detail-ink); border-radius: 22px;
  overscroll-behavior: contain; box-shadow: 0 28px 80px #24143833;
}
.sheet-head {padding: 22px 23px 17px; border-bottom: 1px solid var(--detail-line);}
.sheet-head h2 {font-family: inherit; font-weight: 720; font-size: 21px; letter-spacing: -.025em;}
.sheet-head .round-btn {height: 38px; width: 38px; color: #60586e; background: #f1eff5; border-radius: 50%;}
.sheet-content {padding: 19px 23px 24px;}
.sheet-content > p {color: #595365;}
.sheet-content .area-card {
  padding: 18px; background: #f1edfb; border: 1px solid #e3daef; border-radius: 14px; color: #4e3678;
}
.sheet-content .area-card p,.sheet-content .form-note {color: var(--detail-muted);}
.field {color: #423b50; gap: 7px; margin-bottom: 16px;}
.field input,.field select,.field textarea {
  min-height: 44px; border: 1px solid #d9d5e1; border-radius: 11px;
  background: white; color: var(--detail-ink); padding: 10px 12px;
}
.field input[type=file] {font-size: 13px; padding: 7px;}
.field input::file-selector-button {border: 0; background: #f0ebfa; color: #5e4388; border-radius: 7px; padding: 7px 10px; margin-right: 8px;}
.form-note {color: var(--detail-muted);}
#toast {background: #30273e; color: white; border-radius: 14px; box-shadow: 0 6px 20px #24153824;}

@media (min-width: 980px) {
  .feed-list .post-copy:has(.post-thumb) {
    display: grid; grid-template-columns: minmax(0,1.45fr) minmax(165px,.82fr);
    grid-template-rows: auto 1fr; column-gap: 21px; align-items: start;
  }
  .feed-list .post-copy:has(.post-thumb) .post-thumb {grid-column: 2; grid-row: 1/3; margin: 0; height: 152px;}
  .feed-list .post-copy:has(.post-thumb) p {margin-top: 9px;}
}
@media (min-width: 1140px) {
  #service-results .home-section:nth-child(-n + 2) .service-tile {
    flex-direction: row; justify-content: flex-start; align-items: center; text-align: left; gap: 9px;
  }
  #service-results .home-section:nth-child(-n + 2) .service-tile small {
    display: block; color: var(--detail-muted); font-size: 12px; margin-top: 3px;
  }
}
@media (max-width: 960px) {
  #service-results {grid-template-columns: repeat(2,minmax(0,1fr));}
  #service-results .home-section, #service-results .home-section:nth-child(n + 3) {grid-column: span 1;}
  #service-results .home-section:only-child {grid-column: 1/-1;}
  .view-me {grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);gap: 0 12px;}
  .profile-card {padding: 20px; gap: 11px;}
}
@media (max-width: 700px) {
  .page-head {padding: 13px 0 19px;}
  .page-head h1 {font-size: 29px; margin-top: 6px;}
  .page-head p {font-size: 13px; margin-top: 6px;}
  .back-btn {min-height: 35px;}
  .view-services .search-box {min-height: 47px; border-radius: 13px;}
  .view-services .search-box input {height: 45px; font-size: 16px;}
  #service-results {grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 14px;}
  #service-results .home-section {padding: 16px; border-radius: 16px;}
  #service-results .section-heading {margin-bottom: 5px;}
  #service-results .section-heading h2 {font-size: 17px;}
  #service-results .service-grid {gap: 3px;}
  #service-results .service-tile {padding: 9px 2px; min-height: 77px; gap: 7px;}
  #service-results .service-icon {width: 37px; height: 37px; border-radius: 12px;}
  #service-results .service-tile strong {font-size: 13px;}
  .view-me {display: block;}
  .profile-card {min-height: 116px; padding: 17px; border-radius: 16px;}
  .profile-card .avatar.big {width: 47px; height: 47px; border-radius: 15px; font-size: 22px;}
  .profile-card h2 {font-size: 21px;}
  .profile-card p {font-size: 12px;}
  .profile-card > a {font-size: 11px; padding: 9px 5px;}
  .profile-stats {border-radius: 16px; margin-top: 10px; padding: 7px 0;}
  .profile-stats strong {font-size: 25px;}
  .profile-stats span {font-size: 12px;}
  .view-me .home-columns {gap: 19px; margin-top: 21px;}
  .menu-list {padding: 0 14px;}
  .menu-list a {min-height: 52px;}
  .neighbor-intro #new-post {margin-bottom: 19px; min-height: 38px; padding: 8px 11px; font-size: 13px;}
  .view-neighbors .filter-chips {margin-bottom: 11px; gap: 5px;}
  .filter-chips a {font-size: 12px; min-height: 35px; padding: 6px 10px;}
  .social-layout {grid-template-columns: 1fr; gap: 20px;}
  .feed-list {gap: 11px;}
  .feed-card {padding: 16px 15px 6px;}
  .feed-meta .post-avatar {width: 35px; height: 35px;}
  .post-copy h2 {font-size: 18px;}
  .post-copy p {font-size: 14px;}
  .post-copy .post-thumb {max-height: 210px;}
  .feed-actions {margin-top: 11px;}
  .event-cover img {height: 170px;}
  .event-card .event-card-info,.event-info,.reply-box {padding: 16px;}
  .event-card h2,.event-info h2 {font-size: 20px;}
  .op-layout {grid-template-columns: 1fr; gap: 18px;}
  .op-stats {gap: 6px;}
  .op-stat {padding: 14px 9px; border-radius: 12px;}
  .op-stat strong {font-size: clamp(16px,4.25vw,22px);}
  .op-stat span {font-size: 11px;}
  .op-row {gap: 8px;}
  .sheet-scrim {padding: 0; align-items: end;}
  .sheet-panel {max-width: none; max-height: 90dvh; border-radius: 22px 22px 0 0;}
  .sheet-head {padding: 16px 18px 13px;}
  .sheet-head h2 {font-size: 20px;}
  .sheet-content {padding: 16px 18px 20px;}
  .field input,.field select,.field textarea,.inline-form input {font-size: 16px;}
}
@media (max-width: 345px) {
  .profile-card {display: grid; grid-template-columns: auto 1fr; gap: 9px;}
  .profile-card > a {grid-column: 2; justify-self: start; margin: 0;}
}
