:root {
  color-scheme: light;
  --page: #eef1f4;
  --app-bg: #f6f6f6;
  --card: #ffffff;
  --ink: #20272b;
  --muted: #6f777e;
  --line: #e4e6e8;
  --orange: #ff7d4d;
  --orange-2: #ff9a75;
  --blue: #2686d9;
  --green: #11886f;
  --danger: #c64036;
  --shadow: 0 5px 16px rgba(31, 36, 40, 0.12);
  --soft-shadow: 0 2px 10px rgba(31, 36, 40, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: radial-gradient(circle at top, #ffffff 0, var(--page) 52%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.phone-app {
  position: relative;
  width: min(100vw, 390px);
  height: min(920px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid #d9dde0;
  border-radius: 26px;
  background: var(--app-bg);
  box-shadow: 0 28px 80px rgba(23, 31, 38, 0.18);
}

.resident-header {
  min-height: 180px;
  padding: 20px 14px 88px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #ff9e7f 0%, #ff7554 55%, #ff6c61 100%);
}

.profile-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 11px;
}

.avatar-button,
.bell-button {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #667482;
  box-shadow: var(--soft-shadow);
}

.avatar-button {
  width: 58px;
  height: 58px;
  background: #9bb1c8;
  color: #ffffff;
  font-size: 24px;
}

.bell-button {
  position: relative;
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.bell-button b {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: #ff7a1c;
  color: #ffffff;
  font-size: 10px;
}

.resident-name {
  min-width: 0;
}

.resident-name span,
.resident-name strong,
.resident-address {
  display: block;
}

.resident-name span {
  margin-bottom: 2px;
  color: #4e4f54;
  font-size: 16px;
}

.resident-name strong {
  color: #1f2529;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.quick-panel {
  position: absolute;
  z-index: 3;
  top: 100px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 110px;
  border-radius: 8px;
  background: var(--card);
  padding: 14px 8px 10px;
  box-shadow: var(--shadow);
}

.quick-item,
.module-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-width: 0;
  color: #4d545a;
  background: transparent;
  text-align: center;
  font-size: 13px;
}

.quick-icon,
.module-icon,
.action-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: #f3f4f5;
  color: #ff7d31;
  font-size: 22px;
  font-weight: 800;
}

.quick-item span:last-child,
.module-tile span:last-child {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-scroll {
  position: absolute;
  inset: 180px 0 72px;
  overflow-y: auto;
  padding: 14px 14px 24px;
  scroll-behavior: smooth;
}

.app-scroll::-webkit-scrollbar,
.screen-body::-webkit-scrollbar {
  width: 0;
}

.location-card,
.ai-search-card,
.home-section,
.feed-card,
.nearby-card,
.screen-card,
.post-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
}

.location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 13px 15px;
}

.location-card > div {
  min-width: 0;
}

.location-card strong,
.location-card span {
  display: block;
}

.location-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.location-card span,
.feed-meta,
.nearby-card span,
.screen-card small,
.comment-row span {
  color: var(--muted);
  font-size: 13px;
}

.accent-pill,
.primary-button,
.secondary-button,
.search-row button,
.comment-form button {
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  background: var(--orange);
  font-weight: 800;
  white-space: nowrap;
}

.location-card .accent-pill {
  flex: 0 0 auto;
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-search-card {
  margin-top: 12px;
  padding: 11px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
}

.search-row button {
  width: 48px;
  padding: 0;
}

.search-row input,
.post-form input,
.post-form textarea,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.ai-result {
  display: none;
  margin-top: 10px;
  border-radius: 8px;
  background: #f2fbf8;
  color: #285b51;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.ai-result.active {
  display: block;
}

.banner-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 10px;
  overflow-x: auto;
  margin: 13px -14px 0;
  padding: 0 14px 3px;
}

.banner-card {
  min-height: 86px;
  border-radius: 8px;
  padding: 15px;
  color: #ffffff;
  box-shadow: var(--soft-shadow);
}

.blue-banner {
  background: linear-gradient(135deg, #1c85df, #77c6ff);
}

.green-banner {
  background: linear-gradient(135deg, #0d876d, #63c0a6);
}

.banner-card span,
.banner-card strong,
.banner-card small {
  display: block;
}

.banner-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.banner-card strong {
  margin-top: 7px;
  font-size: 18px;
  line-height: 1.15;
}

.banner-card small {
  margin-top: 8px;
  opacity: 0.9;
}

.home-section {
  margin-top: 15px;
  padding: 14px 10px 12px;
}

.section-head,
.card-head,
.worker-head,
.booking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-head {
  padding: 0 5px 12px;
}

.section-head h2,
.screen-top strong {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.section-head h2 {
  min-width: 0;
}

.section-head button,
.text-button {
  flex: 0 0 auto;
  color: var(--orange);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 4px;
}

.module-tile[disabled] {
  opacity: 0.58;
}

.nearby-list,
.feed-list,
.worker-list,
.booking-list,
.comment-list {
  display: grid;
  gap: 10px;
}

.nearby-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.nearby-card strong,
.nearby-card span {
  display: block;
}

.nearby-card strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.action-icon {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.feed-card {
  padding: 12px;
}

.card-head {
  align-items: flex-start;
}

.feed-author {
  display: flex;
  gap: 9px;
  min-width: 0;
}

.feed-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #9bb1c8;
  font-size: 13px;
  font-weight: 800;
}

.feed-author strong,
.feed-author span {
  display: block;
}

.feed-author strong {
  font-size: 14px;
}

.feed-content {
  margin: 11px 0 10px;
  color: #31383d;
  font-size: 14px;
  line-height: 1.45;
}

.feed-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.feed-actions button {
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.comment-list {
  margin-top: 10px;
}

.comment-row {
  border-radius: 8px;
  background: #f7f8f9;
  padding: 8px 9px;
  font-size: 13px;
}

.comment-row strong {
  display: block;
  margin-bottom: 3px;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
  margin-top: 9px;
}

.screen-panel {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--app-bg);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}

.screen-panel.active {
  transform: translateX(0);
}

.screen-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 74px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.back-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #f1f2f3;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.screen-top span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.screen-body {
  overflow-y: auto;
  padding: 14px 14px 92px;
}

.screen-card,
.post-card {
  margin-bottom: 12px;
  padding: 13px;
}

.screen-card h3,
.post-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.screen-card p,
.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.service-form,
.post-form {
  display: grid;
  gap: 10px;
}

.service-form textarea,
.post-form textarea {
  min-height: 92px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.primary-button,
.secondary-button {
  width: 100%;
  border-radius: 8px;
}

.secondary-button {
  color: var(--green);
  border: 1px solid #cfe4df;
  background: #eef9f5;
}

.worker-card,
.booking-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.worker-head,
.booking-head {
  align-items: flex-start;
}

.worker-head strong,
.booking-head strong,
.worker-head span,
.booking-head span {
  display: block;
}

.worker-head span,
.booking-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #f1f5f4;
  color: #3f5c56;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.score-pill {
  color: #8a4a00;
  background: #fff0dc;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

.bottom-nav {
  position: absolute;
  z-index: 10;
  left: 0;
  right: 14px;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 70px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding-right: 14px;
}

.bottom-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: #7e8790;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.bottom-item span {
  font-size: 22px;
  line-height: 1;
}

.bottom-item.active {
  color: #20272b;
}

.post-fab span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--orange);
}

@media (max-width: 560px) {
  .app-stage {
    display: block;
    padding: 0;
    background: var(--app-bg);
  }

  .phone-app {
    width: min(100vw, 390px);
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .module-grid,
  .quick-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-panel {
    min-height: 150px;
  }

  .app-scroll {
    inset-block-start: 220px;
  }
}






/* Phase 2 resident features */
.zone-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.zone-tabs button {
  min-height: 36px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--orange);
  border: 1px solid var(--line);
  font-weight: 800;
}

.group-card .primary-button,
.group-card .secondary-button {
  margin-top: 12px;
}

.mini-map {
  position: relative;
  height: 240px;
  margin-bottom: 12px;
  border: 1px solid #d9e4e8;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.54) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(255,255,255,.54) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(135deg, #dff4ef, #eff8ff 52%, #fff7e8);
  box-shadow: var(--soft-shadow);
}

.home-pin,
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: var(--soft-shadow);
  font-size: 12px;
  font-weight: 900;
}

.home-pin {
  background: #20272b;
  color: #ffffff;
  padding: 0 7px;
}

.map-pin {
  background: var(--orange);
  color: #ffffff;
}

.map-service-list {
  margin-top: 10px;
}

.account-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: var(--soft-shadow);
}

.account-card h3,
.account-card p {
  margin: 0;
}

.account-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #9bb1c8;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--orange);
  color: #ffffff;
  padding: 8px 12px;
  font-weight: 800;
  text-decoration: none;
}

/* Phase 3 commerce features */
.voucher-card,
.payment-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
  box-shadow: var(--soft-shadow);
}

.voucher-card strong,
.voucher-card span,
.voucher-card code,
.payment-card strong,
.payment-card span,
.payment-card em {
  display: block;
}

.voucher-card span,
.payment-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.voucher-card code {
  width: fit-content;
  border-radius: 8px;
  background: #fff3e8;
  color: #b34f13;
  padding: 7px 9px;
  font-weight: 900;
}

.payment-card em {
  width: fit-content;
  border-radius: 999px;
  background: #edf7f3;
  color: var(--green);
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.screen-card.is-read {
  opacity: .72;
}





/* Reference-inspired mobile redesign */
:root {
  --app-bg: #f7f8fb;
  --card: #ffffff;
  --ink: #151b25;
  --muted: #647081;
  --line: #edf0f5;
  --orange: #ff7a12;
  --orange-2: #ff9d18;
  --blue: #1597f4;
  --green: #10a36f;
  --purple: #7d2cff;
  --shadow: 0 12px 28px rgba(25, 38, 56, .14);
  --soft-shadow: 0 6px 18px rgba(25, 38, 56, .10);
}

body {
  background: #eef1f6;
}

.phone-app {
  width: min(100%, 430px);
  max-width: 430px;
  border: 0;
  border-radius: 28px;
  background: var(--app-bg);
  box-shadow: 0 28px 88px rgba(12, 25, 38, .2);
}

.resident-header {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 18px 18px 92px;
  background:
    linear-gradient(180deg, rgba(255, 196, 91, .78), rgba(255, 112, 68, .18) 48%, rgba(12, 151, 190, .55) 78%, rgba(0, 116, 169, .85)),
    linear-gradient(135deg, #ffe28a 0%, #ff935d 45%, #2cb8d8 100%);
}

.resident-header::before {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 118px;
  background:
    radial-gradient(ellipse at 24% 58%, #fff4bf 0 10px, transparent 11px),
    linear-gradient(90deg, transparent 0 9%, #ffffff 9% 10%, transparent 10% 15%, #e8402d 15% 18%, transparent 18% 28%, #f6df85 28% 36%, transparent 36% 48%, #0ea47d 48% 52%, transparent 52% 62%, #2484d5 62% 74%, transparent 74%),
    linear-gradient(180deg, transparent 0 46%, #236c74 47% 54%, #0a8fb8 55% 100%);
  opacity: .72;
  clip-path: polygon(0 54%, 10% 42%, 18% 45%, 24% 34%, 34% 45%, 44% 30%, 54% 44%, 66% 35%, 80% 45%, 100% 31%, 100% 100%, 0 100%);
}

.resident-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(3, 129, 173, .2), rgba(0, 104, 156, .74));
}

.profile-row {
  position: relative;
  z-index: 2;
  grid-template-columns: 58px minmax(0, 1fr) 52px;
}

.avatar-button,
.bell-button {
  border: 2px solid rgba(255, 255, 255, .92);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 14px rgba(13, 38, 66, .18);
}

.avatar-button {
  color: #2f4052;
  background: linear-gradient(180deg, #eaf5ff, #8fb2cf);
}

.bell-button {
  color: #ff8a00;
}

.bell-button b {
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(180deg, #ff4f24, #ff8a00);
}

.resident-name span {
  color: rgba(27, 39, 50, .8);
  font-size: 14px;
}

.resident-name strong {
  color: #132033;
  font-size: 21px;
  font-weight: 900;
}

.resident-address {
  margin-top: 4px;
  color: rgba(25, 38, 54, .62);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel {
  top: 128px;
  left: 16px;
  right: 16px;
  min-height: 105px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 20px 20px 8px 8px;
  background: rgba(255, 255, 255, .96);
  padding: 13px 8px 9px;
  box-shadow: 0 10px 24px rgba(23, 41, 62, .16);
}

.quick-item,
.module-tile {
  gap: 7px;
  color: #2f3742;
  font-size: 12px;
  font-weight: 750;
}

.quick-icon,
.module-icon {
  width: 52px;
  height: 52px;
  border: 1px solid #f2f4f7;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f6fb);
  color: #ff6900;
  box-shadow: 0 5px 12px rgba(45, 67, 90, .16), inset 0 1px 0 #fff;
  font-size: 25px;
}

.quick-lightning { color: #ffbf00; }
.quick-building { color: #ff6e00; }
.quick-diamond { color: #6138ff; }
.quick-dots { color: #27be24; }

.app-scroll {
  inset: 222px 0 70px;
  padding: 0 16px 28px;
}

.location-card,
.ai-search-card,
.home-section,
.feed-card,
.nearby-card,
.screen-card,
.post-card,
.worker-card,
.booking-card,
.voucher-card,
.payment-card {
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 7px 18px rgba(25, 38, 56, .10);
}

.location-card {
  min-height: 68px;
  border-radius: 0 0 20px 20px;
  padding: 12px 14px;
  transform: translateY(-1px);
}

.location-card strong {
  color: #182231;
  font-size: 19px;
  font-weight: 900;
}

.location-card span {
  color: #677589;
  font-size: 12px;
}

.accent-pill,
.primary-button,
.search-row button,
.comment-form button {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  box-shadow: 0 5px 12px rgba(255, 111, 17, .26), inset 0 1px 0 rgba(255,255,255,.45);
}

.location-card .accent-pill {
  min-width: 104px;
  max-width: 112px;
  min-height: 42px;
  border-radius: 18px;
  font-size: 15px;
}

.ai-search-card {
  margin-top: 12px;
  border-radius: 18px;
  padding: 10px;
}

.search-row {
  grid-template-columns: minmax(0, 1fr) 62px;
}

.search-row input,
.post-form input,
.post-form textarea,
.service-form input,
.service-form select,
.service-form textarea,
.comment-form input {
  border-radius: 10px;
  background: #fbfcff;
  border-color: #e6ebf3;
  color: #1e2735;
}

.search-row button {
  width: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, #d944ff, #2f70ff);
  font-size: 0;
}

.search-row button::before {
  content: "AI✦";
  font-size: 18px;
}

.banner-rail {
  display: block;
  margin: 12px 0 0;
  padding: 0 0 8px;
}

.banner-carousel {
  display: grid;
  gap: 8px;
}

.banner-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 3 / 1;
  min-height: 126px;
  overflow: hidden;
  border-radius: 16px;
  padding: 16px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(18, 71, 127, .2);
}

.banner-card::after {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 52px;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.2));
}

.banner-card.has-image {
  background-size: cover;
  background-position: center;
}

.banner-card.has-image::after { content: ""; }

.blue-banner {
  background:
    linear-gradient(135deg, rgba(0,96,210,.95), rgba(65,182,255,.84)),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.45), transparent 34%);
}

.blue-banner::after { content: "🚙"; }

.green-banner {
  background: linear-gradient(135deg, #008f5d, #0bc982);
}

.green-banner::after { content: "🎁"; }

.banner-card span,
.banner-card strong,
.banner-card small {
  position: relative;
  z-index: 1;
  display: block;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.banner-card strong {
  max-width: 76%;
  font-size: 18px;
  line-height: 1.12;
  font-weight: 900;
}

.banner-card small {
  max-width: 78%;
  font-size: 12px;
  line-height: 1.35;
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 12px;
}

.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd6df;
  padding: 0;
}

.banner-dot.active {
  width: 18px;
  background: linear-gradient(90deg, #ff9a18, #ff5f18);
}

.home-section {
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px 11px 13px;
}

.section-head {
  padding: 0 4px 12px;
}

.section-head h2,
.screen-top strong {
  color: #172232;
  font-size: 19px;
  font-weight: 900;
}

.section-head button,
.text-button {
  color: #ff6a16;
  font-weight: 900;
}

.module-grid {
  gap: 14px 6px;
}

.module-icon {
  width: 50px;
  height: 50px;
  font-size: 24px;
}

.nearby-card {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 9px 10px;
  box-shadow: none;
}

.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f4f7fb);
  box-shadow: inset 0 1px 0 #fff, 0 4px 10px rgba(30, 58, 91, .14);
}

.nearby-card strong {
  font-size: 13px;
  font-weight: 900;
}

.text-button {
  font-size: 18px;
}

.bottom-nav {
  left: 0;
  right: 0;
  min-height: 68px;
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 22px 22px 0 0;
  background: rgba(255,255,255,.97);
  box-shadow: 0 -7px 22px rgba(25, 38, 56, .12);
  padding: 3px 0 0;
}

.bottom-item {
  color: #657385;
  font-size: 11px;
  font-weight: 850;
}

.bottom-item span {
  color: #647286;
  font-size: 25px;
}

.bottom-item.active,
.bottom-item.active span {
  color: #ff6a16;
}

.post-fab span {
  width: 46px;
  height: 46px;
  margin-top: -18px;
  border: 4px solid #fff;
  background: linear-gradient(180deg, #ffac20, #ff6317);
  box-shadow: 0 8px 16px rgba(255, 107, 20, .32);
  font-size: 28px;
}

.screen-panel {
  background:
    radial-gradient(circle at 82% 5%, rgba(40, 173, 255, .26), transparent 28%),
    linear-gradient(180deg, #eaf8ff 0, #f8fbff 156px, #f8f9fc 100%);
}

.screen-top {
  min-height: 76px;
  padding: 13px 14px 9px;
  background: transparent;
  box-shadow: none;
}

.back-button {
  width: 46px;
  height: 46px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(27, 48, 72, .13);
  font-size: 30px;
}

.screen-top span {
  color: #314158;
  font-size: 11px;
  letter-spacing: .02em;
}

.screen-top strong {
  font-size: 23px;
}

.screen-body {
  padding: 8px 10px 92px;
}

.workforce-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(229, 235, 246, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  padding: 14px 12px;
  box-shadow: 0 9px 18px rgba(28, 55, 84, .1);
}

.workforce-hero-card h3,
.workforce-hero-card p {
  margin: 0;
}

.workforce-hero-card h3 {
  font-size: 16px;
  font-weight: 900;
}

.workforce-hero-card p {
  margin-top: 7px;
  color: #5f6d7e;
  font-size: 12px;
  line-height: 1.45;
}

.workforce-house,
.workforce-robot {
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #dff1ff, #f2f7ff);
  box-shadow: inset 0 1px 0 #fff, 0 8px 14px rgba(47, 117, 191, .12);
  font-size: 38px;
}

.workforce-house {
  width: 74px;
  height: 74px;
}

.workforce-robot {
  width: 54px;
  height: 54px;
  align-self: start;
  margin-top: 2px;
  border-radius: 50%;
  font-size: 29px;
}

.workforce-form {
  gap: 10px;
  margin-bottom: 11px;
  border: 1px solid rgba(229, 235, 246, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  padding: 10px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .08);
}

.job-prompt-wrap {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  min-height: 74px;
  border: 1px solid #e8edf7;
  border-radius: 10px;
  background: #f4f8ff;
  padding: 10px;
}

.job-prompt-wrap > span,
.select-chip > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f2eaff, #bba6ff);
  box-shadow: inset 0 1px 0 #fff;
  font-size: 23px;
}

.job-prompt-wrap textarea {
  min-height: 54px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1b2534;
  line-height: 1.45;
  resize: none;
}

.option-grid {
  grid-template-columns: 1fr 1fr;
}

.select-chip {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #e8edf7;
  border-radius: 9px;
  background: #fff;
  padding: 5px 9px;
}

.select-chip > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef7ff;
  color: #1686e5;
  font-size: 17px;
}

.select-chip select,
.select-chip input {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 750;
}

.ai-match-button,
.booking-gradient {
  min-height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff9e18, #ff5615);
  font-size: 16px;
}

.ai-draft-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid #eceff7;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  padding: 12px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .08);
}

.ai-draft-card strong,
.ai-draft-card span {
  display: block;
}

.ai-draft-card strong {
  color: #1b2534;
  font-size: 15px;
}

.ai-draft-card span {
  margin-top: 5px;
  color: #667486;
  font-size: 12px;
}

.ai-draft-card b {
  border-radius: 9px;
  background: linear-gradient(135deg, #8e58ff, #4d6dff);
  color: #fff;
  padding: 5px 9px;
  font-size: 11px;
}

.muted-draft {
  opacity: .86;
}

.premium-worker-card {
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 7px 16px rgba(28, 55, 84, .09);
}

.worker-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.worker-avatar-photo {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #dff2ff, #0c5383);
  border: 3px solid #fff;
  box-shadow: 0 7px 14px rgba(18, 51, 86, .18);
  font-size: 33px;
}

.worker-avatar-photo::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #21d35e;
}

.worker-avatar-photo i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffc23a, #df7b00);
  box-shadow: 0 3px 8px rgba(151, 92, 0, .22);
}

.worker-avatar-photo i::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
}

.worker-head strong {
  color: #1b2534;
  font-size: 16px;
  font-weight: 900;
}

.score-badge {
  flex: 0 0 auto;
  border-radius: 9px;
  background: #ecfff3;
  color: #0e9a52;
  padding: 7px 9px;
  font-size: 14px;
  font-weight: 900;
}

.worker-trust-row {
  margin-left: 68px;
  margin-top: -6px;
}

.trust-pill {
  background: #effaf2;
  color: #129452;
}

.rating-pill {
  background: #fff8e8;
  color: #a76b00;
}

.skill-pill {
  background: #edf6ff;
  color: #1974c8;
}

.booking-gradient {
  margin-top: 12px;
}

@media (max-width: 560px) {
  .phone-app {
    width: 100vw;
    max-width: none;
  }
}

@media (max-width: 360px) {
  .quick-panel,
  .module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .quick-icon,
  .module-icon {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .quick-item,
  .module-tile {
    font-size: 11px;
  }
}

/* Strong 3D icon treatment requested from reference screens */
.quick-icon,
.module-icon,
.action-icon,
.job-prompt-wrap > span,
.select-chip > span,
.workforce-house,
.workforce-robot {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.92);
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.98) 0 16%, rgba(255,255,255,.55) 17% 32%, transparent 33%),
    linear-gradient(145deg, #ffffff 0%, #f6f9ff 46%, #e7edf8 100%);
  box-shadow:
    0 11px 18px rgba(25, 43, 65, .20),
    0 3px 6px rgba(25, 43, 65, .12),
    inset 0 2px 2px rgba(255,255,255,.95),
    inset 0 -5px 9px rgba(57, 80, 112, .10);
  text-shadow:
    0 1px 0 #ffffff,
    0 3px 4px rgba(0,0,0,.20),
    0 8px 10px rgba(20, 45, 80, .18);
  transform: translateZ(0);
}

.quick-icon::before,
.module-icon::before,
.action-icon::before,
.job-prompt-wrap > span::before,
.select-chip > span::before,
.workforce-house::before,
.workforce-robot::before {
  content: "";
  position: absolute;
  inset: 5px 7px auto 7px;
  height: 35%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,0));
  z-index: -1;
  pointer-events: none;
}

.quick-icon::after,
.module-icon::after,
.action-icon::after,
.job-prompt-wrap > span::after,
.select-chip > span::after,
.workforce-house::after,
.workforce-robot::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: -8px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(25, 43, 65, .28), rgba(25, 43, 65, 0) 70%);
  z-index: -2;
  filter: blur(1px);
  pointer-events: none;
}

.quick-icon,
.module-icon {
  color: #ff6d00;
  font-size: 25px;
  filter: saturate(1.2) contrast(1.06);
}

.quick-icon.quick-lightning {
  color: #ffb300;
  text-shadow: 0 1px 0 #fff8c9, 0 3px 4px rgba(188, 104, 0, .32), 0 8px 12px rgba(255, 150, 0, .22);
}

.quick-icon.quick-building {
  color: #ff6d00;
  text-shadow: 0 1px 0 #fff1df, 0 3px 4px rgba(176, 72, 0, .28), 0 8px 12px rgba(255, 110, 0, .22);
}

.quick-icon.quick-diamond {
  color: #533cff;
  text-shadow: 0 1px 0 #eeeaff, 0 3px 4px rgba(52, 34, 180, .28), 0 8px 12px rgba(70, 60, 255, .22);
}

.quick-icon.quick-dots {
  color: #21c63a;
  text-shadow: 0 1px 0 #e7ffe9, 0 3px 4px rgba(0, 122, 28, .26), 0 8px 12px rgba(20, 210, 70, .22);
}

.module-icon:nth-child(n),
.action-icon {
  border-radius: 16px;
}

.module-tile:nth-child(1) .module-icon,
.module-tile:nth-child(5) .module-icon,
.module-tile:nth-child(9) .module-icon {
  color: #ff6b00;
}

.module-tile:nth-child(2) .module-icon,
.module-tile:nth-child(6) .module-icon,
.module-tile:nth-child(10) .module-icon {
  color: #0984e8;
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(7) .module-icon,
.module-tile:nth-child(11) .module-icon {
  color: #ff4d2f;
}

.module-tile:nth-child(4) .module-icon,
.module-tile:nth-child(8) .module-icon,
.module-tile:nth-child(12) .module-icon {
  color: #25ba37;
}

.quick-item:active .quick-icon,
.module-tile:active .module-icon,
.bottom-item:active span {
  transform: translateY(2px) scale(.97);
  box-shadow:
    0 5px 9px rgba(25, 43, 65, .18),
    inset 0 2px 4px rgba(57, 80, 112, .13);
}

.bottom-item span {
  display: grid;
  width: 33px;
  height: 31px;
  place-items: center;
  margin-bottom: 1px;
  border-radius: 11px;
  text-shadow: 0 1px 0 #fff, 0 3px 5px rgba(28, 45, 66, .22);
  filter: drop-shadow(0 4px 5px rgba(25, 43, 65, .16));
}

.bottom-item.active span {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,241,231,.92));
  box-shadow: 0 6px 12px rgba(255, 107, 20, .16), inset 0 1px 0 #fff;
}

.post-fab span {
  text-shadow: 0 1px 0 rgba(255,255,255,.44), 0 3px 6px rgba(125, 53, 0, .32);
  box-shadow:
    0 10px 18px rgba(255, 107, 20, .38),
    inset 0 2px 2px rgba(255,255,255,.52),
    inset 0 -5px 9px rgba(151, 64, 0, .22);
}

.workforce-house,
.workforce-robot {
  filter: saturate(1.18) drop-shadow(0 7px 10px rgba(37, 96, 154, .16));
}

.worker-avatar-photo {
  box-shadow:
    0 10px 16px rgba(18, 51, 86, .24),
    inset 0 2px 3px rgba(255,255,255,.42),
    inset 0 -8px 12px rgba(0, 34, 70, .26);
  text-shadow: 0 2px 4px rgba(0,0,0,.25);
}

.worker-avatar-photo i {
  box-shadow:
    0 5px 9px rgba(151, 92, 0, .32),
    inset 0 1px 1px rgba(255,255,255,.56),
    inset 0 -3px 5px rgba(118, 67, 0, .22);
}

/* Premium AI color pass for reference-like icons */
.quick-icon,
.module-icon,
.action-icon,
.job-prompt-wrap > span,
.select-chip > span,
.workforce-house,
.workforce-robot {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.58) 14% 30%, transparent 31%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 48%, #e7edf8 100%);
  color: var(--icon-main, #ff7a12);
  box-shadow:
    0 13px 20px rgba(var(--icon-shadow-rgb, 40, 74, 116), .20),
    0 5px 10px rgba(var(--icon-shadow-rgb, 40, 74, 116), .12),
    inset 0 2px 2px rgba(255,255,255,.95),
    inset 0 -6px 10px rgba(var(--icon-shadow-rgb, 40, 74, 116), .12);
  text-shadow:
    0 1px 0 rgba(255,255,255,.92),
    0 3px 4px rgba(var(--icon-shadow-rgb, 40, 74, 116), .30),
    0 9px 14px rgba(var(--icon-glow-rgb, 255, 122, 18), .28);
}

.quick-icon::before,
.module-icon::before,
.action-icon::before,
.job-prompt-wrap > span::before,
.select-chip > span::before,
.workforce-house::before,
.workforce-robot::before {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,0)),
    radial-gradient(circle at 75% 12%, rgba(var(--icon-glow-rgb, 255, 122, 18), .25), transparent 42%);
}

.quick-icon.quick-lightning,
.module-tile:nth-child(1) .module-icon,
.module-tile:nth-child(5) .module-icon {
  --icon-main: #ff8a00;
  --icon-shadow-rgb: 202, 93, 0;
  --icon-glow-rgb: 255, 169, 30;
}

.quick-icon.quick-building,
.module-tile:nth-child(6) .module-icon,
.module-tile:nth-child(10) .module-icon {
  --icon-main: #0688ff;
  --icon-shadow-rgb: 0, 96, 190;
  --icon-glow-rgb: 0, 154, 255;
}

.quick-icon.quick-diamond,
.module-tile:nth-child(7) .module-icon,
.module-tile:nth-child(13) .module-icon,
.workforce-robot,
.job-prompt-wrap > span {
  --icon-main: #7048ff;
  --icon-shadow-rgb: 72, 45, 196;
  --icon-glow-rgb: 130, 80, 255;
}

.quick-icon.quick-dots,
.module-tile:nth-child(4) .module-icon,
.module-tile:nth-child(14) .module-icon,
.module-tile:nth-child(15) .module-icon {
  --icon-main: #15b84f;
  --icon-shadow-rgb: 0, 128, 58;
  --icon-glow-rgb: 54, 220, 102;
}

.module-tile:nth-child(2) .module-icon,
.module-tile:nth-child(9) .module-icon,
.module-tile:nth-child(12) .module-icon {
  --icon-main: #1188e8;
  --icon-shadow-rgb: 0, 95, 180;
  --icon-glow-rgb: 62, 174, 255;
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(11) .module-icon,
.module-tile:nth-child(16) .module-icon {
  --icon-main: #ff4f36;
  --icon-shadow-rgb: 190, 54, 36;
  --icon-glow-rgb: 255, 96, 72;
}

.module-tile:nth-child(8) .module-icon,
.workforce-house,
.action-icon {
  --icon-main: #ff9a00;
  --icon-shadow-rgb: 201, 96, 0;
  --icon-glow-rgb: 255, 183, 34;
}

.module-tile:nth-child(1) .module-icon {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #fff8e9 0%, #fff 42%, #ffe7c6 100%);
}

.module-tile:nth-child(2) .module-icon,
.quick-icon.quick-building {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #eff8ff 0%, #fff 42%, #dcefff 100%);
}

.module-tile:nth-child(3) .module-icon,
.module-tile:nth-child(7) .module-icon {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #fff1f1 0%, #fff 42%, #ffe0dd 100%);
}

.module-tile:nth-child(4) .module-icon,
.quick-icon.quick-dots {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #eefdf3 0%, #fff 42%, #d9f8e4 100%);
}

.quick-icon.quick-diamond,
.workforce-robot,
.job-prompt-wrap > span {
  background:
    radial-gradient(circle at 24% 18%, rgba(255,255,255,.98) 0 13%, rgba(255,255,255,.62) 14% 30%, transparent 31%),
    linear-gradient(145deg, #f3efff 0%, #ffffff 42%, #e5ddff 100%);
}

.search-row button {
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.64), transparent 25%),
    linear-gradient(135deg, #b935ff 0%, #624cff 48%, #0aa7ff 100%);
  box-shadow:
    0 8px 18px rgba(99, 76, 255, .34),
    inset 0 1px 0 rgba(255,255,255,.52),
    inset 0 -5px 10px rgba(32, 37, 160, .20);
}

.search-row button::before {
  content: "AI✦";
  letter-spacing: -.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,.28), 0 4px 8px rgba(48, 28, 145, .45);
}

.ai-match-button,
.booking-gradient {
  background:
    radial-gradient(circle at 22% 12%, rgba(255,255,255,.38), transparent 28%),
    linear-gradient(180deg, #ffb21f 0%, #ff7c16 47%, #ff4e12 100%);
  box-shadow:
    0 8px 18px rgba(255, 105, 18, .32),
    inset 0 1px 0 rgba(255,255,255,.48),
    inset 0 -5px 12px rgba(188, 59, 0, .20);
}

.ai-match-button::first-letter {
  color: #fff7bd;
}

.worker-avatar-photo {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.7), transparent 26%),
    linear-gradient(180deg, #dff6ff 0%, #1b88c9 48%, #0b426e 100%);
}

/* Admin-uploaded hero image */
.resident-header.has-custom-hero {
  background-image:
    linear-gradient(180deg, rgba(255, 190, 84, .12), rgba(255, 128, 68, .06) 45%, rgba(0, 105, 150, .24) 100%),
    var(--hero-upload-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.resident-header.has-custom-hero::before {
  opacity: 0;
}

.resident-header.has-custom-hero::after {
  background: linear-gradient(180deg, rgba(0, 123, 170, .05), rgba(0, 92, 143, .38));
}
/* Quick panel removed because modules below already cover these actions */
.quick-panel {
  display: none;
}

.resident-header {
  min-height: 252px;
  padding-bottom: 138px;
}

.app-scroll {
  inset: 224px 0 70px;
  padding: 0 16px 28px;
}

@media (max-width: 360px) {
  .app-scroll {
    inset-block-start: 222px;
    padding-inline: 12px;
  }
}
/* Ocean Park location tabs replacing the old address card */
.location-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid rgba(221, 229, 237, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  padding: 10px;
  box-shadow: 0 10px 24px rgba(22, 38, 58, .12);
}

.location-tab {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 64px;
  border: 1px solid rgba(230, 235, 241, .95);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
  box-shadow: 0 6px 14px rgba(24, 44, 68, .08);
}

.location-tab.active {
  border-color: rgba(14, 130, 104, .28);
  box-shadow: 0 8px 18px rgba(14, 130, 104, .14);
}

.location-tab-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.38), 0 7px 12px rgba(20, 57, 94, .18);
}

.location-tab-icon.op1 {
  background: linear-gradient(145deg, #1189d2, #0a5aa8);
}

.location-tab-icon.op23 {
  background: linear-gradient(145deg, #1bb46c, #0a7c45);
}

.location-tab-copy {
  min-width: 0;
}

.location-tab-copy strong,
.location-tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-tab-copy strong {
  color: #24313e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}

.location-tab-copy small {
  margin-top: 4px;
  color: #6d7784;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
}

@media (max-width: 360px) {
  .location-switcher {
    gap: 8px;
    padding: 8px;
  }
  .location-tab {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }
  .location-tab-icon {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

.location-access-note {
  margin: -4px 2px 12px;
  border: 1px solid rgba(18, 132, 106, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(238, 250, 246, .94));
  color: #275047;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  box-shadow: 0 6px 16px rgba(20, 50, 72, .08);
}

.location-access-note.guest-mode,
.zone-access-card.guest-mode {
  border-color: rgba(255, 126, 54, .24);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255, 245, 235, .96));
  color: #7b421f;
}

.zone-access-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(18, 132, 106, .16);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #effbf7);
  padding: 12px;
  color: #254d45;
  box-shadow: 0 8px 18px rgba(23, 40, 58, .08);
}

.zone-access-card strong {
  font-size: 13px;
  font-weight: 900;
}

.zone-access-card span {
  font-size: 12px;
  line-height: 1.35;
}

button:disabled,
.service-form.is-readonly button:disabled {
  cursor: not-allowed;
  opacity: .62;
  filter: grayscale(.2);
}
  .location-tab-copy strong {
    font-size: 11px;
  }
}
/* Header install app action */
.profile-row {
  grid-template-columns: 58px minmax(0, 1fr) 98px;
  align-items: start;
}

.header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

.header-actions .bell-button {
  justify-self: end;
}

.install-app-button {
  display: inline-grid;
  grid-template-columns: 18px auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 96px;
  min-height: 39px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(180deg, #ffbd38 0%, #ff7a13 56%, #ff6410 100%);
  box-shadow:
    0 9px 18px rgba(203, 78, 0, .28),
    inset 0 1px 1px rgba(255,255,255,.48),
    inset 0 -5px 10px rgba(197, 70, 0, .24);
  font-size: 12px;
  line-height: 1;
}

.install-app-button span {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
}

.install-app-button strong {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.install-app-button:active {
  transform: translateY(1px);
}

@media (max-width: 360px) {
  .profile-row {
    grid-template-columns: 52px minmax(0, 1fr) 88px;
    gap: 8px;
  }
  .install-app-button {
    width: 88px;
    min-height: 36px;
    font-size: 11px;
  }
  .install-app-button strong {
    font-size: 11px;
  }
}

/* Account registration split: guest, resident, worker, merchant */
.account-type-grid {
  display: grid;
  gap: 12px;
}

.account-four-grid {
  grid-template-columns: 1fr;
}

.account-type-card {
  display: grid;
  gap: 10px;
}

.account-type-kicker {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #0d6b55;
  background: #e7f8f0;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.merchant-type-card .account-type-kicker {
  color: #965400;
  background: #fff3df;
}

.guest-type-card .account-type-kicker {
  color: #285ea8;
  background: #e8f1ff;
}

.worker-type-card .account-type-kicker {
  color: #7a3f98;
  background: #f6eaff;
}

.account-type-card small {
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.account-type-card textarea {
  min-height: 62px;
  resize: vertical;
}

.compact-account-form {
  gap: 8px;
}

.compact-merchant-list {
  gap: 7px;
}

.mini-status-row {
  border: 1px solid rgba(228, 233, 242, .92);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
}

.mini-status-row strong,
.mini-status-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status-row strong {
  color: #1f2c36;
  font-size: 13px;
  font-weight: 900;
}

.mini-status-row span {
  margin-top: 3px;
  color: #687484;
  font-size: 11px;
}
/* Resident account MVP */
.resident-profile-form textarea {
  min-height: 62px;
  resize: vertical;
}

.form-row-split,
.otp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.otp-row {
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: stretch;
}

.otp-row .secondary-button {
  min-height: 44px;
  padding-inline: 10px;
  white-space: nowrap;
}

.form-help {
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.role-check-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(228, 233, 242, .96);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: #304152;
  font-size: 12px;
  font-weight: 800;
}

.role-check-grid input {
  width: 15px;
  height: 15px;
  accent-color: #0d9f79;
}

@media (max-width: 390px) {
  .form-row-split,
  .otp-row {
    grid-template-columns: 1fr;
  }

  .role-check-grid {
    grid-template-columns: 1fr;
  }
}


.file-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(228, 233, 242, .96);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: #304152;
  font-size: 12px;
  font-weight: 800;
}

.file-field span {
  color: #667085;
  font-size: 11px;
}

.file-field input[type="file"] {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 11px;
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid rgba(13, 159, 121, .2);
  border-radius: 10px;
  background: #f1fbf7;
  padding: 9px 10px;
  color: #304152;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 750;
}

.consent-check input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: #0d9f79;
}
/* Improved Workforce job request form */
.improved-job-form {
  gap: 14px;
  padding: 12px;
  border-color: rgba(216, 226, 240, .96);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.92));
}

.job-field-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-field-label {
  color: #1f2a36;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.job-prompt-clear {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  min-height: 116px;
  border-color: rgba(204, 216, 232, .96);
  background: #f7faff;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(30, 54, 84, .08);
}

.job-prompt-clear textarea {
  min-height: 90px;
  padding-top: 2px;
  font-size: 15px;
  line-height: 1.48;
}

.schedule-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.schedule-option {
  position: relative;
  min-width: 0;
}

.schedule-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-option span {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid rgba(218, 226, 238, .96);
  border-radius: 12px;
  background: #fff;
  color: #263443;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
  box-shadow: 0 6px 14px rgba(28, 48, 74, .07);
}

.schedule-option small {
  display: block;
  margin-top: 3px;
  color: #738091;
  font-size: 10px;
  font-weight: 650;
}

.schedule-option input:checked + span {
  border-color: rgba(255, 115, 24, .62);
  background: linear-gradient(180deg, #fff8f0, #ffffff);
  color: #d45211;
  box-shadow: 0 8px 18px rgba(255, 112, 28, .16), inset 0 0 0 1px rgba(255, 139, 40, .2);
}

.schedule-option.urgent input:checked + span {
  color: #b63320;
  border-color: rgba(231, 73, 47, .46);
  background: linear-gradient(180deg, #fff2ee, #ffffff);
}

.custom-schedule-fields {
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.show-custom-schedule .custom-schedule-fields {
  display: grid;
}

.custom-schedule-fields label,
.job-address-field,
.job-attach-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 1px solid rgba(218, 226, 238, .96);
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  box-shadow: 0 6px 14px rgba(28, 48, 74, .06);
}

.custom-schedule-fields span,
.job-address-field span {
  color: #6d7785;
  font-size: 10px;
  font-weight: 800;
}

.custom-schedule-fields input,
.custom-schedule-fields select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #1f2b38;
  padding: 0;
  font-size: 12px;
  font-weight: 850;
}

.job-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.job-address-field strong,
.job-attach-field strong {
  overflow: hidden;
  color: #22303d;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-attach-field {
  position: relative;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
}

.job-attach-field > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #eef7ff, #ffffff);
  box-shadow: 0 5px 12px rgba(38, 112, 183, .16);
}

.job-attach-field small {
  grid-column: 2;
  color: #738091;
  font-size: 10px;
  font-weight: 650;
}

.job-attach-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 360px) {
  .schedule-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .custom-schedule-fields,
  .job-meta-grid {
    grid-template-columns: 1fr;
  }
}
/* Redesigned nearby service recommendation cards */
.nearby-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 1px;
  padding: 2px 2px 4px;
  color: #6d7785;
  font-size: 11px;
  line-height: 1.25;
}

.nearby-context-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-context-card strong {
  flex: 0 0 auto;
  color: #0e8a63;
  font-size: 11px;
  font-weight: 900;
}

.nearby-service-card {
  grid-template-columns: 52px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  min-height: 88px;
  border-color: rgba(220, 229, 240, .96);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 10px;
  box-shadow: 0 7px 18px rgba(26, 46, 72, .08);
}

.nearby-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 21px;
}

.nearby-service-card.service-technical .nearby-service-icon {
  --icon-main: #1478ef;
  --icon-shadow-rgb: 16, 105, 214;
  --icon-glow-rgb: 69, 157, 255;
}

.nearby-service-card.service-moving .nearby-service-icon {
  --icon-main: #ff7a12;
  --icon-shadow-rgb: 214, 92, 8;
  --icon-glow-rgb: 255, 159, 53;
}

.nearby-service-card.service-care .nearby-service-icon {
  --icon-main: #18a777;
  --icon-shadow-rgb: 16, 132, 92;
  --icon-glow-rgb: 43, 199, 142;
}

.nearby-service-card.service-homecare .nearby-service-icon {
  --icon-main: #8758ff;
  --icon-shadow-rgb: 92, 62, 200;
  --icon-glow-rgb: 151, 104, 255;
}

.nearby-service-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.nearby-service-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nearby-service-topline strong {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #162233;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eefaf5;
  color: #0f8b66 !important;
  padding: 3px 6px;
  font-size: 9px !important;
  font-weight: 900;
  line-height: 1;
}

.nearby-service-type {
  color: #5f6e7c !important;
  font-size: 11px !important;
  font-weight: 650;
  line-height: 1.2;
}

.nearby-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.nearby-metrics span {
  border-radius: 999px;
  background: #f2f5f9;
  color: #506071 !important;
  padding: 4px 7px;
  font-size: 10px !important;
  font-weight: 850;
  line-height: 1;
}

.nearby-metrics .distance-badge {
  background: #fff2e8;
  color: #e35c12 !important;
}

.nearby-action-button {
  display: grid;
  min-width: 48px;
  min-height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff9a32, #ff5c18);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(255, 103, 23, .25), inset 0 1px 0 rgba(255,255,255,.42);
}

.nearby-empty {
  grid-template-columns: 52px minmax(0, 1fr);
}

@media (max-width: 360px) {
  .nearby-service-card {
    grid-template-columns: 46px minmax(0, 1fr) 50px;
    gap: 8px;
    padding: 9px;
  }
  .nearby-service-icon {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
  .nearby-metrics span {
    padding-inline: 6px;
  }
}
/* Redesigned resident feed cards */
.feed-context-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 1px;
  padding: 2px 2px 4px;
  color: #6d7785;
  font-size: 11px;
  line-height: 1.25;
}

.feed-context-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-context-card strong {
  flex: 0 0 auto;
  color: #0f7fbd;
  font-size: 11px;
  font-weight: 900;
}

.resident-feed-card {
  border-color: rgba(220, 229, 240, .96);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
  box-shadow: 0 8px 20px rgba(26, 46, 72, .08);
}

.feed-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.resident-feed-card .feed-author {
  align-items: center;
  gap: 10px;
  width: 100%;
}

.resident-feed-card .feed-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #b8c8da, #8ea8c0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 14px rgba(40, 64, 90, .16);
  font-size: 12px;
  font-weight: 950;
}

.feed-author-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.feed-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.feed-name-row strong {
  min-width: 0;
  overflow: hidden;
  color: #162233;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-type-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.feed-type-badge.resident {
  background: #eef7ff;
  color: #1768b8;
}

.feed-type-badge.question {
  background: #fff3e7;
  color: #df5b13;
}

.feed-type-badge.notice {
  background: #eefaf5;
  color: #0d8b64;
}

.feed-type-badge.market {
  background: #f5efff;
  color: #744be8;
}

.feed-type-badge.event {
  background: #fff0f3;
  color: #c83d64;
}

.resident-feed-card .feed-meta {
  color: #697786;
  font-size: 11px;
  font-weight: 650;
}

.resident-feed-card .feed-content {
  display: -webkit-box;
  margin: 12px 0 11px;
  overflow: hidden;
  color: #1f2c3a;
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.compact-feed-actions {
  display: flex;
  gap: 7px;
  border-top: 1px solid rgba(226, 233, 242, .92);
  padding-top: 9px;
}

.compact-feed-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  border-radius: 999px;
  background: #f4f7fb;
  color: #465668;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.compact-feed-actions button:last-child {
  background: linear-gradient(135deg, #f3efff, #eef7ff);
  color: #6844d8;
}

.compact-comment-list {
  gap: 7px;
  margin-top: 9px;
}

.compact-comment-row {
  border-radius: 12px;
  background: #f6f8fb;
  padding: 8px 10px;
  font-size: 12px;
}

.compact-comment-row strong {
  margin-bottom: 3px;
  color: #1e2b39;
  font-size: 12px;
}

.compact-comment-row span {
  color: #637181;
  font-size: 12px;
  line-height: 1.35;
}

.comment-more-button {
  justify-self: start;
  border-radius: 999px;
  background: transparent;
  color: #ff6a16;
  padding: 3px 2px;
  font-size: 12px;
  font-weight: 900;
}

.compact-comment-form {
  grid-template-columns: minmax(0, 1fr) 58px;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.compact-comment-form input {
  min-height: 42px;
  border-radius: 12px;
  background: #fbfcff;
}

.compact-comment-form button {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffad18, #ff6417);
  font-size: 13px;
  box-shadow: 0 6px 14px rgba(255, 111, 17, .26), inset 0 1px 0 rgba(255,255,255,.45);
}

@media (max-width: 360px) {
  .resident-feed-card {
    padding: 10px;
  }
  .compact-feed-actions button {
    padding-inline: 8px;
  }
}


/* Avatar identity layer */
.hero-avatar-image,
.hero-profile-avatar,
.account-avatar,
.feed-avatar,
.worker-public-avatar,
.worker-avatar-photo,
.merchant-logo {
  overflow: hidden;
}

.hero-avatar-image img,
.hero-profile-avatar img,
.account-avatar img,
.feed-avatar img,
.worker-public-avatar img,
.worker-avatar-photo img,
.merchant-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-button .hero-avatar-image,
.avatar-button .hero-profile-avatar {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  font-weight: 950;
}

.profile-avatar-card {
  align-items: flex-start;
}

.avatar-upload-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.avatar-file-field {
  min-height: 48px;
  background: #f8fbff;
}

.avatar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ghost-button {
  min-height: 40px;
  border: 1px solid rgba(205, 218, 232, .95);
  border-radius: 8px;
  background: #fff;
  color: #536579;
  font-weight: 900;
}

.worker-public-avatar,
.merchant-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-weight: 950;
}

.merchant-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #edf7ff, #dbeafe);
  color: #0f5d9e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 6px 14px rgba(33, 66, 100, .12);
}

.merchant-service-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

@media (max-width: 420px) {
  .avatar-actions {
    grid-template-columns: 1fr;
  }
}
/* Hero profile avatar fixed sizing hotfix */
.profile-row {
  grid-template-columns: 58px minmax(0, 1fr) 52px;
}

.avatar-button {
  position: relative;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  flex: 0 0 58px;
  border-radius: 50%;
  padding: 0;
}

.avatar-button .hero-profile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(180deg, #eaf5ff, #8fb2cf);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.avatar-button .hero-profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

@media (max-width: 380px) {
  .profile-row {
    grid-template-columns: 52px minmax(0, 1fr) 48px;
    gap: 9px;
  }

  .avatar-button {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    flex-basis: 52px;
  }

  .avatar-button .hero-profile-avatar {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
}


/* Account role selector flow */
.account-auth-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.account-session-pills {
  margin-top: 9px;
}

.account-role-shell {
  display: grid;
  gap: 12px;
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.account-panel-head h3 {
  margin: 6px 0 0;
}

.account-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-role-card {
  display: grid;
  min-height: 104px;
  gap: 6px;
  align-content: start;
  border: 1px solid #dde7f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: #17211f;
  text-align: left;
  box-shadow: 0 8px 18px rgba(23, 33, 31, .06);
}

.account-role-card span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef5ff;
  color: #235fa7;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-role-card strong {
  font-size: 14px;
  line-height: 1.25;
}

.account-role-card small {
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.account-role-card.active {
  border-color: #14b58b;
  background: #f0fcf8;
  box-shadow: 0 10px 22px rgba(20, 181, 139, .12);
}

.account-role-card.worker-type-card span {
  color: #7a3f98;
  background: #f6eaff;
}

.account-role-card.merchant-type-card span {
  color: #965400;
  background: #fff3df;
}

.account-role-card.resident-type-card span {
  color: #0d6b55;
  background: #e7f8f0;
}

.account-selected-panel {
  display: grid;
  gap: 12px;
}

.account-choice-empty p {
  margin-bottom: 0;
}

@media (max-width: 380px) {
  .account-auth-actions,
  .account-role-grid {
    grid-template-columns: 1fr;
  }
}

/* Account OS v2: clean base-account and role-upgrade flow */
.account-overview-card {
  align-items: flex-start;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,255,.96)),
    radial-gradient(circle at 18% 8%, rgba(43, 154, 255, .14), transparent 34%);
  border-color: rgba(187, 207, 226, .82);
  box-shadow: 0 14px 32px rgba(29, 50, 76, .12);
}

.account-overview-card h3 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.16;
}

.account-overview-card p {
  max-width: 100%;
  color: #56677b;
  line-height: 1.45;
}

.account-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.account-primary-actions:has(> :nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-primary-actions button {
  min-height: 40px;
  white-space: normal;
}

.account-avatar-tools {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(219, 229, 239, .9);
}

.account-welcome-card,
.account-focus-card,
.account-role-shell {
  border-color: rgba(215, 228, 241, .96);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 26px rgba(23, 37, 56, .08);
}

.account-welcome-card h3,
.account-focus-card h3,
.account-role-shell h3 {
  font-size: 18px;
  line-height: 1.2;
}

.account-role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-role-card {
  position: relative;
  min-height: 118px;
  padding: 12px 11px;
  border-color: #dbe7f3;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 20px rgba(26, 47, 72, .08), inset 0 1px 0 rgba(255,255,255,.88);
}

.account-role-card em {
  align-self: end;
  width: fit-content;
  margin-top: 2px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f2f6fb;
  color: #52657a;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.account-role-card.active em {
  background: #dff8ef;
  color: #0b7a5f;
}

.account-selected-panel {
  animation: accountPanelIn .16s ease-out;
}

@keyframes accountPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-focus-card .service-form {
  margin-top: 2px;
}

.account-focus-card .form-help,
.account-avatar-tools .form-help {
  line-height: 1.4;
}

@media (max-width: 380px) {
  .account-primary-actions,
  .account-role-grid {
    grid-template-columns: 1fr;
  }

  .account-role-card {
    min-height: 96px;
  }
}
/* Mobile header containment hotfix: keep notification/install actions inside the phone frame. */
.profile-row {
  position: relative;
  grid-template-columns: 58px minmax(0, 1fr);
  padding-right: 90px;
}

.header-actions {
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  display: grid;
  justify-items: end;
  gap: 7px;
  z-index: 3;
}

.header-actions .bell-button {
  width: 44px;
  height: 44px;
}

.install-app-button {
  width: 84px;
  min-height: 36px;
  grid-template-columns: 14px minmax(0, auto);
  gap: 4px;
  padding: 0 7px;
  border-radius: 12px;
}

.install-app-button span {
  width: 14px;
  height: 14px;
  font-size: 11px;
}

.install-app-button strong {
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.location-access-note[hidden] {
  display: none !important;
}

@media (max-width: 390px) {
  .resident-header {
    padding-left: 14px;
    padding-right: 14px;
  }

  .profile-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 9px;
    padding-right: 82px;
  }

  .header-actions {
    width: 78px;
  }

  .install-app-button {
    width: 78px;
    min-height: 34px;
    padding: 0 6px;
  }

  .install-app-button strong {
    max-width: 43px;
    font-size: 10px;
  }
}
/* Feed avatars for posts and comments */
.feed-avatar.has-avatar,
.comment-avatar.has-avatar {
  overflow: hidden;
  background: #eaf1f8;
}

.feed-avatar img,
.comment-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.compact-comment-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.comment-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #c8d7e6, #9fb5ca);
  color: #ffffff;
  font-size: 10px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 4px 10px rgba(40, 64, 90, .14);
}

.comment-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}
/* Announcement notification cards */
.notification-card {
  overflow: hidden;
  padding: 0;
}

.notification-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  background-size: cover;
  background-position: center;
}

.notification-card-body {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.notification-card-body h3,
.notification-detail-card h3 {
  margin: 0;
}

.notification-card-body p,
.notification-detail-card p,
.notification-detail-body {
  color: #465463;
  line-height: 1.45;
}

.notification-card-body small,
.notification-detail-card small {
  color: #7a8794;
  font-size: 12px;
}

.notification-priority {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef7ff;
  color: #1768b8;
  font-size: 11px;
  font-weight: 900;
}

.notification-priority.important {
  background: #fff4e5;
  color: #d95d12;
}

.notification-priority.urgent {
  background: #ffeceb;
  color: #c92f24;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-detail-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.notification-detail-card {
  display: grid;
  gap: 10px;
}

.feed-image-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}
.feed-image-grid.single { grid-template-columns: 1fr; }
.feed-image-grid.multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feed-post-image,
.comment-image-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}
.feed-post-image img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
}
.comment-image-thumb {
  display: block;
  width: 92px;
  height: 68px;
  margin-top: 6px;
}
.comment-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.reaction-button.active {
  background: #fff1f2;
  color: #e11d48;
  border-color: rgba(225, 29, 72, .22);
}
.post-compose-tools,
.comment-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.emoji-strip {
  display: flex;
  gap: 4px;
  align-items: center;
}
.emoji-button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.post-photo-button,
.comment-photo-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}
.post-photo-button input,
.comment-photo-button input { display: none; }
.feed-media-preview { margin-top: 8px; }
.feed-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}
.feed-preview-item img {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
}
.comment-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
}
.comment-body { min-width: 0; }

/* Keep feed comment tools inside the mobile card. */
.compact-comment-form.comment-form {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.compact-comment-form .comment-input-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.compact-comment-form .comment-input-row input {
  min-width: 0;
}

.compact-comment-form .comment-tools {
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  overflow: hidden;
}

.compact-comment-form .emoji-strip {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.compact-comment-form .emoji-button,
.compact-comment-form .comment-photo-button {
  flex: 0 0 30px;
}

/* Show quick emojis as plain symbols, not orange action buttons. */
.compact-comment-form .emoji-button {
  min-height: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: 21px;
  line-height: 1;
}

.compact-comment-form .emoji-button:hover,
.compact-comment-form .emoji-button:focus-visible {
  background: rgba(255, 245, 230, .72);
  box-shadow: none;
}

/* Compact quick emojis to match the comment field scale. */
.compact-comment-form .emoji-strip {
  gap: 7px;
}

.compact-comment-form .emoji-button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  flex-basis: 24px;
  font-size: 17px;
}

.compact-comment-form .emoji-button:hover,
.compact-comment-form .emoji-button:focus-visible {
  background: transparent;
}

/* Multi-image resident post composer and in-app image viewer. */
.post-compose-preview {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.post-image-count {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.post-image-preview-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-image-preview-grid.count-1 {
  grid-template-columns: 1fr;
}

.post-image-preview-grid.count-3 .post-image-preview-item:first-child {
  grid-column: 1 / -1;
}

.post-image-preview-item {
  position: relative;
  margin: 0;
  min-width: 0;
  aspect-ratio: 1.25;
  border-radius: 12px;
  overflow: hidden;
  background: #eef4fb;
}

.post-image-preview-grid.count-1 .post-image-preview-item {
  aspect-ratio: 16 / 9;
}

.post-image-preview-button,
.comment-preview-image {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.post-image-preview-button img,
.comment-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 999px;
  background: rgba(15, 23, 42, .68);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .24);
}

.feed-image-grid.count-3 .feed-post-image:first-child {
  grid-column: 1 / -1;
}

.feed-image-grid.count-1 {
  grid-template-columns: 1fr;
}

.feed-image-grid.count-2,
.feed-image-grid.count-3,
.feed-image-grid.count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-image-grid.count-2 .feed-post-image,
.feed-image-grid.count-3 .feed-post-image,
.feed-image-grid.count-4 .feed-post-image {
  aspect-ratio: 1;
}

.feed-image-grid.count-3 .feed-post-image:first-child {
  aspect-ratio: 16 / 9;
}

.feed-image-grid .feed-post-image img {
  height: 100%;
}

.image-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .86);
  backdrop-filter: blur(8px);
}

.image-viewer-shell {
  position: relative;
  width: min(100%, 720px);
  height: min(86vh, 760px);
  display: grid;
  place-items: center;
}

.image-viewer-shell img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.image-viewer-close,
.image-viewer-nav {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  backdrop-filter: blur(8px);
}

.image-viewer-close {
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  font-size: 28px;
}

.image-viewer-nav {
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  font-size: 34px;
}

.image-viewer-nav.prev { left: 0; }
.image-viewer-nav.next { right: 0; }

.image-viewer-count {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

/* Community VIN group chat */
.community-zone-tabs button.active {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 111, 17, .24);
}

.community-group-header {
  display: grid;
  gap: 5px;
}

.community-group-header span {
  color: #0ea5a4;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.community-group-header h3,
.community-group-header p,
.community-group-header small {
  margin: 0;
}

.community-group-header small {
  color: #64748b;
  line-height: 1.4;
}

.community-chat-list {
  display: grid;
  gap: 10px;
}

.community-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(226, 233, 242, .96);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
}

.community-message-body {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.community-message-body > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.community-message-body strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.community-message-body span {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

.community-message-body p {
  margin: 0;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.community-connect-button {
  justify-self: start;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.community-message-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 233, 242, .96);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
}

.community-message-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
}

.community-message-form button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(255, 111, 17, .24);
}

.community-empty {
  text-align: left;
}

/* Community group completion: topics, reports, safe connects */
.community-topic-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.community-topic-strip button,
.community-topic-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eefdf8;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.community-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.community-report-button {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(225, 29, 72, .12);
  border-radius: 999px;
  background: #fff7f7;
  color: #be123c;
  font-size: 11px;
  font-weight: 800;
}

.community-message-form {
  grid-template-columns: minmax(0, 105px) minmax(0, 1fr) 58px;
}

.community-message-form select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 8px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 380px) {
  .community-message-form {
    grid-template-columns: 1fr 58px;
  }
  .community-message-form select {
    grid-column: 1 / -1;
  }
}

/* Community overview: VIN groups + resident feed */
.community-overview-card {
  display: grid;
  gap: 10px;
}

.community-overview-card h3,
.community-overview-card p {
  margin: 0;
}

.community-zone-grid {
  display: grid;
  gap: 8px;
}

.community-zone-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(14, 165, 164, .18);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fffc, #eefbf7);
  color: #12303a;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.community-zone-card.is-home {
  border-color: rgba(255, 122, 24, .32);
  background: linear-gradient(180deg, #fffaf2, #f4fbff);
}

.community-zone-card span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #12c4a8, #0d8f78);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(13, 143, 120, .2);
}

.community-zone-card.is-home span {
  background: linear-gradient(145deg, #ffb020, #ff6a18);
  box-shadow: 0 10px 18px rgba(255, 106, 24, .22);
}

.community-zone-card strong,
.community-zone-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-zone-card strong {
  font-size: 14px;
  font-weight: 950;
}

.community-zone-card small {
  grid-column: 2 / 3;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.community-zone-card em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .82);
  color: #07906f;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.community-feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 2px 8px;
}

.community-feed-heading div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.community-feed-heading strong {
  color: #111827;
  font-size: 16px;
  font-weight: 950;
}

.community-feed-heading span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.community-feed-heading .secondary-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
}

.community-feed-list {
  padding-bottom: 10px;
}

@media (max-width: 380px) {
  .community-zone-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .community-zone-card em {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    text-align: center;
  }
}

.community-topic-strip button {
  border: 0;
  cursor: pointer;
}

.community-topic-strip button.active {
  background: linear-gradient(180deg, #12c4a8, #06856f);
  color: #fff;
  box-shadow: 0 8px 16px rgba(6, 133, 111, .2);
}


/* App dialog: custom report modal */
.app-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(6px);
}

.app-dialog {
  width: min(100%, 390px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fff8f3);
  box-shadow: 0 26px 70px rgba(15, 23, 42, .28), 0 10px 24px rgba(255, 111, 17, .16);
  padding: 18px;
  color: #172033;
}

.app-dialog-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: linear-gradient(145deg, #ffb020, #ff6417);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(255, 100, 23, .24);
}

.app-dialog h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0;
}

.app-dialog p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.report-reason-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-reason-grid button {
  min-height: 34px;
  border: 1px solid #fee2d3;
  border-radius: 999px;
  background: #fff;
  color: #9a4a1d;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.report-reason-grid button.active {
  border-color: rgba(255, 100, 23, .44);
  background: linear-gradient(180deg, #fff4e7, #ffe6d3);
  color: #a33d10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.report-dialog-form {
  display: grid;
  gap: 8px;
}

.report-dialog-form label {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.report-dialog-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid #ffd2b6;
  border-radius: 14px;
  background: #fff;
  padding: 11px 12px;
  color: #172033;
  font: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03);
}

.report-dialog-form textarea:focus {
  border-color: #ff7a18;
  box-shadow: 0 0 0 4px rgba(255, 122, 24, .14);
}

.report-dialog-status {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.report-dialog-status.success { color: #047857; }
.report-dialog-status.error { color: #be123c; }

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.app-dialog-actions button {
  min-width: 86px;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.dialog-cancel-button {
  background: #ffe9dc;
  color: #9a4a1d;
}

.dialog-submit-button {
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  box-shadow: 0 12px 22px rgba(255, 100, 23, .22);
}

.dialog-submit-button:disabled {
  opacity: .68;
  cursor: wait;
}

@media (max-width: 380px) {
  .app-dialog { padding: 16px; }
  .report-reason-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* PWA + responsive shell: keep the existing mobile layout, make it fit real devices. */
html {
  min-height: 100%;
  min-height: 100dvh;
  background: #eef1f6;
}

body {
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}

.app-stage {
  min-height: 100dvh;
  padding: clamp(10px, 2.4vw, 22px);
}

.phone-app {
  width: min(100%, 430px);
  height: min(932px, calc(100dvh - clamp(20px, 4.8vw, 44px)));
  min-height: min(720px, 100dvh);
  contain: layout paint;
}

.app-scroll,
.screen-body {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.install-app-button.is-install-ready {
  box-shadow: 0 8px 18px rgba(255, 122, 18, .22), inset 0 1px 0 rgba(255,255,255,.8);
}

.install-help-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

@media (display-mode: standalone) {
  body { background: var(--app-bg); }
  .app-stage { display: block; padding: 0; }
  .phone-app {
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .resident-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .app-scroll { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .app-stage { display: block; padding: 0; }
  .phone-app {
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .resident-header { padding-top: max(18px, env(safe-area-inset-top)); }
  .bottom-nav { min-height: calc(68px + env(safe-area-inset-bottom)); }
}

@media (min-width: 561px) and (max-height: 760px) {
  .phone-app { height: calc(100dvh - 20px); }
  .resident-header { min-height: 232px; padding-bottom: 122px; }
  .app-scroll { inset-block-start: 206px; }
}

@media (max-width: 340px) {
  .resident-name strong { font-size: 17px; }
  .resident-address { max-width: 150px; }
  .bottom-item { font-size: 10px; }
  .bottom-item span { width: 30px; height: 29px; font-size: 21px; }
}

/* Hide install CTA after this device has installed/opened the PWA. */
html.pwa-installed .install-app-button,
html.pwa-install-hidden .install-app-button,
.install-app-button[hidden] {
  display: none !important;
}

/* Platform install buttons: Android prompt + iPhone guide. */
.header-actions {
  gap: 5px;
}

.install-app-button.install-ios-button,
.install-app-button.install-android-button {
  width: 84px;
}

.install-ios-button {
  background: linear-gradient(180deg, #ffffff, #f2f6ff);
  color: #1656a8;
}

.ios-install-guide h3 {
  margin-bottom: 10px;
}

.ios-install-steps {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.ios-install-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid rgba(229, 235, 246, .95);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  padding: 10px;
}

.ios-install-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff9d18, #ff6417);
  color: #fff;
  font-weight: 950;
}

.ios-install-steps p {
  margin: 0;
  line-height: 1.42;
}

.full-width {
  width: 100%;
}

@media (max-width: 390px) {
  .install-app-button.install-ios-button,
  .install-app-button.install-android-button {
    width: 78px;
  }
}

/* Desktop web app shell: sidebar + dashboard + utility panel. Mobile remains unchanged. */
.desktop-sidebar,
.desktop-utility,
.desktop-overview,
.desktop-module-grid {
  display: none;
}

@media (min-width: 1100px) {
  :root {
    --desktop-sidebar: 268px;
    --desktop-utility: 360px;
    --desktop-gap: 18px;
  }

  html,
  body {
    background: #edf2f6;
  }

  body {
    min-width: 1100px;
  }

  .app-stage {
    display: block;
    min-height: 100dvh;
    padding: 0;
    background:
      radial-gradient(circle at 18% 0%, rgba(255, 122, 18, .12), transparent 32%),
      radial-gradient(circle at 86% 4%, rgba(38, 134, 217, .14), transparent 30%),
      linear-gradient(180deg, #f7fafc 0%, #edf2f6 100%);
  }

  .phone-app {
    display: grid;
    grid-template-columns: var(--desktop-sidebar) minmax(0, 1fr) var(--desktop-utility);
    grid-template-rows: auto minmax(0, 1fr);
    gap: var(--desktop-gap);
    width: 100%;
    max-width: none;
    height: 100dvh;
    min-height: 760px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    contain: none;
    padding: 18px;
  }

  .desktop-sidebar,
  .desktop-utility {
    display: flex;
    min-height: 0;
  }

  .desktop-sidebar {
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(218, 226, 234, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    padding: 18px;
    box-shadow: 0 24px 60px rgba(28, 39, 54, .08);
    backdrop-filter: blur(14px);
  }

  .desktop-brand {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 58px;
  }

  .desktop-brand-logo {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(38, 51, 77, .16);
  }

  .desktop-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .desktop-brand strong,
  .desktop-brand small,
  .desktop-sidebar-card span,
  .desktop-sidebar-card strong,
  .desktop-sidebar-card p,
  .desktop-kicker,
  .desktop-utility-head strong,
  .desktop-user-card strong,
  .desktop-user-card p {
    display: block;
  }

  .desktop-brand strong {
    font-size: 16px;
    line-height: 1.18;
  }

  .desktop-brand small,
  .desktop-kicker,
  .desktop-sidebar-card p,
  .desktop-user-card p {
    color: #6b7785;
    font-size: 12px;
    line-height: 1.45;
  }

  .desktop-menu {
    display: grid;
    gap: 6px;
  }

  .desktop-menu button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 12px;
    background: transparent;
    color: #43505f;
    padding: 7px 10px;
    text-align: left;
    font-weight: 800;
  }

  .desktop-menu button span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: #f2f5f8;
    color: #ff6b18;
    font-size: 17px;
  }

  .desktop-menu button.active,
  .desktop-menu button:hover {
    background: #fff3ea;
    color: #121a24;
  }

  .desktop-menu button.active span,
  .desktop-menu button:hover span {
    background: linear-gradient(145deg, #ff9d24, #ff6417);
    color: #fff;
  }

  .desktop-sidebar-card,
  .desktop-utility-card,
  .desktop-overview article {
    border: 1px solid rgba(218, 226, 234, .95);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 14px 34px rgba(28, 39, 54, .07);
  }

  .desktop-sidebar-card {
    margin-top: auto;
    padding: 16px;
    background:
      linear-gradient(145deg, rgba(255, 128, 31, .11), rgba(38, 134, 217, .08)),
      #fff;
  }

  .desktop-sidebar-card span {
    margin-bottom: 6px;
    color: #ff6b18;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
  }

  .desktop-sidebar-card strong {
    margin-bottom: 8px;
    font-size: 17px;
  }

  .desktop-sidebar-card button,
  .desktop-utility-head button,
  .desktop-zone-actions button {
    min-height: 34px;
    border-radius: 999px;
    background: #fff3ea;
    color: #ff6417;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 950;
  }

  .resident-header {
    grid-column: 2;
    grid-row: 1;
    min-height: 248px;
    border-radius: 22px;
    overflow: hidden;
    padding: 24px 26px 132px;
    box-shadow: 0 24px 60px rgba(24, 41, 61, .13);
  }

  .profile-row {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    gap: 14px;
  }

  .avatar-button {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

  .resident-name strong {
    max-width: 620px;
    font-size: clamp(26px, 2vw, 34px);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .install-app-button.install-ios-button,
  .install-app-button.install-android-button {
    width: auto;
    min-width: 126px;
    height: 40px;
    border-radius: 999px;
    grid-auto-flow: column;
    grid-template-columns: 24px auto;
    padding: 0 12px;
  }

  .install-app-button strong {
    display: inline;
    font-size: 12px;
    white-space: nowrap;
  }

  .app-scroll {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 16px;
    min-height: 0;
    padding: 0 2px 18px;
    overflow-y: auto;
  }

  .location-switcher {
    position: relative;
    z-index: 4;
    width: min(620px, calc(100% - 44px));
    margin: -86px auto 0;
  }

  .location-access-note {
    margin-top: -4px;
  }

  .ai-search-card {
    padding: 14px;
  }

  .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .banner-rail {
    width: 100%;
  }

  .banner-card {
    min-height: 210px;
    border-radius: 18px;
    padding: 28px;
  }

  .banner-card strong {
    max-width: 720px;
    font-size: clamp(26px, 2.4vw, 38px);
  }

  .desktop-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .desktop-overview article {
    padding: 16px;
  }

  .desktop-overview span,
  .desktop-overview small {
    display: block;
    color: #6f7d89;
    font-size: 12px;
  }

  .desktop-overview strong {
    display: block;
    margin: 6px 0 2px;
    color: #111b27;
    font-size: 26px;
    line-height: 1;
  }

  .home-section {
    border-radius: 18px;
    padding: 18px;
  }

  .section-head h2 {
    font-size: 21px;
  }

  #moduleGrid {
    display: none;
  }

  .desktop-module-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(86px, 1fr));
    gap: 12px;
  }

  .desktop-module-grid .module-tile {
    min-height: 112px;
    border: 1px solid #edf1f5;
    border-radius: 16px;
    background: #fff;
    padding: 12px 8px;
  }

  .desktop-module-grid .module-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(28, 39, 54, .1);
  }

  .nearby-list,
  .feed-list {
    display: grid;
    gap: 12px;
  }

  .nearby-service-card {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .desktop-utility {
    grid-column: 3;
    grid-row: 1 / 3;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
  }

  .desktop-utility-card {
    padding: 16px;
  }

  .desktop-utility-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .desktop-utility-head strong,
  .desktop-user-card strong {
    color: #121a24;
    font-size: 17px;
  }

  .desktop-zone-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }

  .desktop-zone-actions button.active {
    background: linear-gradient(145deg, #ff9d24, #ff6417);
    color: #fff;
  }

  .desktop-notification-list,
  .desktop-nearby-list,
  .desktop-feed-list {
    display: grid;
    gap: 10px;
  }

  .desktop-notification-item,
  .desktop-mini-item {
    display: grid;
    gap: 6px;
    border: 1px solid #edf1f5;
    border-radius: 14px;
    background: #fbfcfe;
    padding: 12px;
  }

  .desktop-notification-item strong,
  .desktop-mini-item strong {
    color: #152131;
    font-size: 14px;
    line-height: 1.25;
  }

  .desktop-notification-item p,
  .desktop-mini-item span,
  .desktop-mini-item p {
    margin: 0;
    color: #667482;
    font-size: 12px;
    line-height: 1.45;
  }

  .desktop-notification-item button,
  .desktop-mini-item button {
    justify-self: start;
    min-height: 30px;
    border-radius: 999px;
    background: #eef6ff;
    color: #226bad;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
  }

  .notification-badge {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    margin-left: 4px;
    border-radius: 999px;
    background: #ff6417;
    color: #fff;
    font-size: 10px;
  }

  .bottom-nav {
    display: none;
  }

  .screen-panel {
    position: fixed;
    inset: 24px 24px 24px calc(var(--desktop-sidebar) + 42px);
    z-index: 50;
    width: auto;
    max-width: none;
    border-radius: 22px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
  }

  .screen-body {
    padding: 18px;
  }
}

@media (min-width: 1440px) {
  .desktop-module-grid {
    grid-template-columns: repeat(8, minmax(92px, 1fr));
  }

  .phone-app {
    grid-template-columns: 286px minmax(0, 1fr) 390px;
  }
}

/* Desktop banner height fix: keep carousel in normal layout so following cards cannot cover it. */
@media (min-width: 1100px) {
  .banner-rail {
    display: block;
    width: 100%;
    min-height: calc(clamp(210px, 19vw, 300px) + 34px);
    margin: 0;
    padding: 0 0 22px;
    overflow: visible;
  }

  .banner-carousel {
    display: grid;
    min-height: calc(clamp(210px, 19vw, 300px) + 22px);
    gap: 10px;
    overflow: visible;
  }

  .banner-card {
    height: clamp(210px, 19vw, 300px);
    min-height: 0;
    aspect-ratio: auto;
  }
}

/* Desktop action panel visibility fix: active screens must stay in the viewport. */
@media (min-width: 1100px) {
  .screen-panel {
    transform: translateX(calc(100% + 48px));
    pointer-events: none;
  }

  .screen-panel.active {
    transform: none !important;
    pointer-events: auto;
  }
}

/* Desktop cleanup: hide summary stat cards under the banner. */
@media (min-width: 1100px) {
  .desktop-overview {
    display: none !important;
  }
}

/* Realtime community and private chat polish */
.community-chat-list {
  max-height: min(58vh, 560px);
  overflow: auto;
  padding: 12px 8px 16px;
  background: linear-gradient(180deg, rgba(246, 248, 252, 0.92), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
}
.community-message {
  align-items: flex-end;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 8px 0;
  max-width: 92%;
}
.community-message.is-mine {
  flex-direction: row-reverse;
  margin-left: auto;
}
.community-message .comment-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.community-message-body {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  padding: 10px 12px;
}
.community-message.is-mine .community-message-body {
  background: linear-gradient(135deg, #0f766e, #0ea5a3);
  border-color: rgba(15, 118, 110, 0.18);
  border-radius: 18px 18px 6px 18px;
  color: #ffffff;
}
.community-message.is-mine .community-message-body span,
.community-message.is-mine .community-message-body p,
.community-message.is-mine .community-topic-pill {
  color: rgba(255, 255, 255, 0.88);
}
.community-input-stack {
  display: grid;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}
.chat-tool-strip {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 1px 0 2px;
  scrollbar-width: none;
}
.chat-tool-strip::-webkit-scrollbar { display: none; }
.chat-tool-strip .emoji-button,
.chat-sticker-button {
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: #0f172a;
  font-size: 14px;
  padding: 0 9px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.chat-sticker-button {
  font-size: 12px;
  min-width: max-content;
}
.chat-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(8px);
}
.chat-notice-card {
  width: min(360px, 92vw);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  padding: 18px;
  text-align: center;
}
.chat-notice-card strong { display: block; font-size: 17px; color: #0f172a; }
.chat-notice-card p { color: #475569; line-height: 1.5; margin: 8px 0 14px; }
.chat-notice-card button {
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 800;
  padding: 10px 18px;
}
.private-chat-dock {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(82px, env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}
.private-chat-dock > * { pointer-events: auto; }
.private-request-stack { display: grid; gap: 8px; }
.private-request-card {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(20, 184, 166, 0.25);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.16);
  padding: 10px;
}
.private-request-card.muted { grid-template-columns: 1fr; color: #64748b; }
.private-request-card span { display: block; color: #64748b; font-size: 12px; }
.private-request-card button {
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}
.private-request-card button + button { background: #e2e8f0; color: #334155; }
.private-chat-window {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}
.private-chat-window header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #0f172a, #0f766e);
  color: #ffffff;
}
.private-chat-window header div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.private-chat-window header button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 20px;
}
.private-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  background: #f8fafc;
}
.private-chat-messages p {
  align-self: flex-start;
  max-width: 82%;
  margin: 0;
  border-radius: 16px 16px 16px 5px;
  background: #ffffff;
  color: #0f172a;
  padding: 8px 10px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.private-chat-messages p.is-mine {
  align-self: flex-end;
  border-radius: 16px 16px 5px 16px;
  background: #0f766e;
  color: #ffffff;
}
.private-chat-messages small {
  display: block;
  margin-top: 4px;
  opacity: 0.62;
  font-size: 10px;
}
.private-chat-empty { color: #64748b; font-size: 13px; text-align: center; }
.private-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  background: #ffffff;
}
.private-chat-form input {
  min-width: 0;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  padding: 10px 12px;
}
.private-chat-form .chat-tool-strip { grid-column: 1 / -1; order: 3; }
.private-chat-form button[type="submit"] {
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 800;
  padding: 0 14px;
}
@media (max-width: 520px) {
  .community-message { max-width: 98%; }
  .community-message-form { align-items: stretch; }
  .private-chat-dock { right: 10px; bottom: max(78px, env(safe-area-inset-bottom)); }
  .private-chat-messages { max-height: 240px; }
}

/* Community chat visual upgrade 2026-07-11 */
.community-chat-list {
  position: relative;
  padding: 18px 14px 20px;
  background:
    radial-gradient(circle at 18% 12%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(251, 146, 60, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef7f5 100%);
  border-color: rgba(125, 162, 176, 0.26);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 45px rgba(15, 23, 42, 0.06);
}
.community-message {
  gap: 10px;
  margin: 12px 0;
  max-width: min(760px, 90%);
  animation: chatBubbleIn 180ms ease-out;
}
.community-message .comment-avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}
.community-message-body {
  position: relative;
  min-width: 0;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 22px 22px 22px 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
  padding: 12px 14px 13px;
}
.community-message-body::before {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 9px;
  width: 13px;
  height: 13px;
  background: inherit;
  border-left: 1px solid rgba(226, 232, 240, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  transform: rotate(45deg);
}
.community-message.is-mine .community-message-body {
  background: linear-gradient(135deg, #0f8f86 0%, #10aaa2 54%, #12b8a6 100%);
  border-color: rgba(15, 118, 110, 0.12);
  border-radius: 22px 22px 8px 22px;
  box-shadow: 0 18px 42px rgba(15, 118, 110, 0.26);
}
.community-message.is-mine .community-message-body::before {
  left: auto;
  right: -6px;
  border-left: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(15, 118, 110, 0.12);
  border-top: 1px solid rgba(15, 118, 110, 0.12);
}
.community-message-head,
.community-message-body > .community-message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.community-message-head strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-message-head span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.community-message-body p {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.52;
  margin-top: 8px;
  word-break: break-word;
}
.community-topic-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background: rgba(20, 184, 166, 0.1);
  border-radius: 999px;
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  padding: 3px 9px;
}
.community-message.is-mine .community-message-head strong,
.community-message.is-mine .community-message-head span,
.community-message.is-mine .community-message-body p,
.community-message.is-mine .community-topic-pill {
  color: rgba(255, 255, 255, 0.96);
}
.community-message.is-mine .community-topic-pill {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.18);
}
.community-message-form {
  align-items: stretch;
  gap: 10px;
  border: 1px solid rgba(125, 162, 176, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  padding: 10px;
}
.community-message-form select {
  min-height: 58px;
  border-radius: 18px;
  background: #f8fafc;
  font-weight: 900;
}
.community-input-stack {
  gap: 9px;
}
.community-message-form input {
  min-height: 42px;
  border-radius: 16px;
  font-size: 15px;
  padding-inline: 14px;
}
.community-message-form > button[type="submit"] {
  align-self: stretch;
  min-width: 58px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffae1a 0%, #ff6b1a 100%);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
  font-weight: 900;
  padding: 0 16px;
}
.chat-tool-strip {
  display: grid;
  gap: 7px;
  overflow: hidden;
  padding: 0;
}
.chat-emoji-rail,
.chat-sticker-rail {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 1px 1px 4px;
  scrollbar-width: none;
}
.chat-emoji-rail::-webkit-scrollbar,
.chat-sticker-rail::-webkit-scrollbar { display: none; }
.chat-tool-strip .emoji-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-color: rgba(203, 213, 225, 0.88);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  font-size: 16px;
  padding: 0;
}
.chat-tool-strip .emoji-button:hover,
.chat-sticker-button:hover {
  transform: translateY(-1px);
}
.chat-sticker-button {
  height: 34px;
  border: 0;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 40%, #fed7aa 100%);
  color: #9a3412;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.16);
  font-size: 12px;
  font-weight: 900;
  padding: 0 12px;
}
.private-chat-form .chat-tool-strip {
  grid-column: 1 / -1;
}
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 640px) {
  .community-chat-list { padding: 14px 10px 16px; border-radius: 20px; }
  .community-message { max-width: 98%; gap: 8px; }
  .community-message .comment-avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .community-message-head { gap: 8px; }
  .community-message-form {
    grid-template-columns: 1fr;
  }
  .community-message-form select,
  .community-message-form > button[type="submit"] {
    min-height: 44px;
  }
  .community-message-form > button[type="submit"] {
    width: 100%;
  }
}

/* Community composer without manual topic select */
.community-message-form-simple {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}
.community-message-form-simple .community-input-stack {
  width: 100%;
}
.community-message-form-simple input[name="body"] {
  width: 100%;
}
.community-message-form-simple > button[type="submit"] {
  min-width: 64px;
}
@media (max-width: 640px) {
  .community-message-form-simple {
    grid-template-columns: 1fr;
  }
  .community-message-form-simple > button[type="submit"] {
    width: 100%;
  }
}

/* Compact private connection status */
.private-request-stack {
  align-items: end;
  justify-items: end;
  gap: 6px;
  order: -1;
}
.private-request-card {
  width: min(310px, calc(100vw - 34px));
  min-height: 48px;
  grid-template-columns: 10px 30px minmax(0, 1fr) auto auto;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 9px;
  backdrop-filter: blur(14px);
}
.private-request-card .comment-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border: 2px solid rgba(255, 255, 255, 0.9);
}
.private-request-card strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.private-request-card span:not(.private-request-dot) {
  overflow: hidden;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.private-request-dot {
  color: #f59e0b;
  font-size: 10px;
  line-height: 1;
}
.private-request-card.outgoing {
  grid-template-columns: 10px minmax(0, 1fr);
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.94));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.18);
}
.private-request-card.incoming {
  border-color: rgba(20, 184, 166, 0.42);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.98), rgba(204, 251, 241, 0.94));
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.18);
}
.private-request-card.incoming .private-request-dot {
  color: #0f766e;
}
.private-request-card button {
  min-width: 0;
  height: 28px;
  border-radius: 999px;
  font-size: 11px;
  padding: 0 9px;
}
@media (max-width: 520px) {
  .private-request-card {
    width: min(292px, calc(100vw - 24px));
  }
}

/* Pin private connection status to top */
.private-chat-dock .private-request-stack {
  position: fixed;
  top: max(78px, calc(env(safe-area-inset-top) + 14px));
  right: max(18px, env(safe-area-inset-right));
  bottom: auto;
  z-index: 95;
  width: min(330px, calc(100vw - 36px));
  pointer-events: none;
}
.private-chat-dock .private-request-stack .private-request-card {
  pointer-events: auto;
  width: 100%;
}
@media (min-width: 900px) {
  .desktop-shell .private-chat-dock .private-request-stack,
  .private-chat-dock .private-request-stack {
    top: 86px;
    right: 22px;
  }
}
@media (max-width: 640px) {
  .private-chat-dock .private-request-stack {
    top: max(64px, calc(env(safe-area-inset-top) + 10px));
    left: 12px;
    right: 12px;
    width: auto;
    justify-items: stretch;
  }
}

/* Keep quick chat chips inside composer column */
.community-message-form-simple {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}
.community-message-form-simple .community-input-stack,
.community-message-form-simple .chat-tool-strip,
.community-message-form-simple .chat-emoji-rail,
.community-message-form-simple .chat-sticker-rail {
  min-width: 0;
  max-width: 100%;
}
.community-message-form-simple .chat-tool-strip {
  overflow: hidden;
}
.community-message-form-simple .chat-emoji-rail,
.community-message-form-simple .chat-sticker-rail {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-right: 4px;
}
.community-message-form-simple .chat-sticker-button {
  flex: 0 0 auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-message-form-simple > button[type="submit"] {
  grid-column: 2;
  grid-row: 1;
  min-width: 62px;
  z-index: 1;
}
@media (max-width: 640px) {
  .community-message-form-simple {
    grid-template-columns: 1fr !important;
  }
  .community-message-form-simple > button[type="submit"] {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Show quick sticker text fully in community composer */
.community-message-form-simple {
  overflow: visible !important;
}
.community-message-form-simple .community-input-stack,
.community-message-form-simple .chat-tool-strip {
  overflow: visible !important;
}
.community-message-form-simple .chat-emoji-rail,
.community-message-form-simple .chat-sticker-rail {
  flex-wrap: wrap !important;
  overflow: visible !important;
  width: 100% !important;
  padding-right: 0 !important;
}
.community-message-form-simple .chat-sticker-button {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.community-message-form-simple > button[type="submit"] {
  grid-row: 1 / span 2 !important;
}
@media (max-width: 640px) {
  .community-message-form-simple > button[type="submit"] {
    grid-row: auto !important;
  }
}

/* Auto-fit uploaded banner images without cropping */
.banner-card.has-image {
  isolation: isolate;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .46), rgba(0, 0, 0, .08)), var(--banner-image);
  background-size: cover;
  background-position: center;
}
.banner-card.has-image::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: 0;
  background-image: var(--banner-image);
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.08);
  opacity: .42;
  transform: scale(1.04);
}
.banner-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .52), rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, .04));
  pointer-events: none;
}
.banner-fit-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
}
.banner-card.has-image span,
.banner-card.has-image strong,
.banner-card.has-image small {
  z-index: 2;
}

/* Use uploaded AI icon asset for home search button */
.search-row button {
  background: #ffffff url("/iconAI/ai-icon.jpg") center / cover no-repeat !important;
  border: 0 !important;
  color: transparent !important;
  text-indent: -9999px;
  overflow: hidden;
  box-shadow:
    0 10px 22px rgba(72, 80, 255, .22),
    inset 0 1px 0 rgba(255,255,255,.62) !important;
}
.search-row button::before {
  content: "" !important;
  display: none !important;
}


/* Community group avatars managed from Admin */
.community-header-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.community-group-avatar,
.community-zone-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #eaf8ff, #ffffff);
  color: #0f766e;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

.community-group-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 13px;
}

.community-zone-avatar {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 16px;
  font-size: 12px;
}

.community-group-avatar img,
.community-zone-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Private chat popup polish 2026-07-11 */
.chat-notice-overlay.is-toast,
.chat-notice-overlay.success,
.chat-notice-overlay.info,
.chat-notice-overlay.error {
  align-items: flex-start;
  justify-content: center;
  padding-top: max(16px, env(safe-area-inset-top));
}
.chat-notice-overlay.is-toast .chat-notice-card,
.chat-notice-overlay.success .chat-notice-card,
.chat-notice-overlay.info .chat-notice-card,
.chat-notice-overlay.error .chat-notice-card {
  width: min(360px, calc(100vw - 28px));
  border-radius: 18px;
  text-align: left;
  padding: 12px 14px;
}
.private-chat-window {
  display: grid;
  grid-template-rows: auto minmax(128px, 1fr) auto;
  max-height: min(72vh, 560px);
}
.private-chat-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.private-chat-window-actions button {
  display: inline-grid;
  place-items: center;
  line-height: 1;
  cursor: pointer;
}
.private-chat-messages {
  max-height: none;
  min-height: 128px;
}
.private-chat-form {
  grid-template-columns: minmax(0, 1fr) 42px auto;
  align-items: center;
  position: relative;
}
.private-chat-tools {
  position: relative;
  order: 2;
}
.private-chat-tools summary {
  list-style: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
}
.private-chat-tools summary::-webkit-details-marker { display: none; }
.private-chat-tools .chat-tool-strip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 4;
  width: min(300px, calc(100vw - 48px));
  max-height: 142px;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}
.private-chat-form > button[type="submit"] {
  order: 3;
  min-height: 42px;
}
.private-chat-bubbles {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.private-chat-bubble {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  max-width: min(260px, calc(100vw - 32px));
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  padding: 6px 8px 6px 6px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}
.private-chat-bubble .comment-avatar {
  width: 30px;
  height: 30px;
}
.private-chat-bubble span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}
.private-chat-bubble b {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
}
@media (max-width: 520px) {
  .private-chat-window { max-height: min(68vh, 520px); }
  .private-chat-tools .chat-tool-strip { right: -54px; width: min(292px, calc(100vw - 24px)); }
}

/* Banner text overlay toggle 2026-07-12 */
.banner-card.no-text {
  padding: 0;
  place-items: stretch;
}
.banner-card.has-image.no-text {
  background-image: var(--banner-image);
}
.banner-card.has-image.no-text::before,
.banner-card.has-image.no-text::after {
  display: none;
}
.banner-card.no-text .banner-fit-image {
  z-index: 1;
}

/* Private chat compact tools fix 2026-07-12 */
.private-chat-window {
  overflow: visible;
}
.private-chat-form {
  grid-template-columns: minmax(0, 1fr) 42px 58px;
  gap: 8px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}
.private-chat-form input[name="body"] {
  height: 42px;
  font-size: 15px;
}
.private-chat-tools {
  position: relative;
  z-index: 6;
}
.private-chat-tools summary {
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.private-chat-tools[open] summary {
  border-color: rgba(15, 118, 110, 0.36);
  background: #ecfdf5;
}
.private-chat-menu-panel {
  position: absolute;
  right: -66px;
  bottom: calc(100% + 10px);
  width: min(314px, calc(100vw - 28px));
  max-height: 128px;
  overflow: auto;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 8px;
}
.private-chat-tools .private-chat-menu-panel .chat-tool-strip {
  position: static !important;
  width: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: grid !important;
  gap: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.private-chat-tools .chat-emoji-rail,
.private-chat-tools .chat-sticker-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 1px 0 3px;
  flex-wrap: nowrap !important;
}
.private-chat-tools .emoji-button {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  background: #ffffff !important;
}
.private-chat-tools .chat-sticker-button {
  height: 30px !important;
  min-width: max-content !important;
  max-width: 150px;
  border-radius: 999px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.private-chat-form > button[type="submit"] {
  width: 58px;
  min-width: 58px;
  min-height: 42px;
  padding: 0 10px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .private-chat-dock {
    width: min(390px, calc(100vw - 12px));
    right: 6px;
  }
  .private-chat-menu-panel {
    right: -64px;
    width: min(306px, calc(100vw - 22px));
  }
  .private-chat-form {
    grid-template-columns: minmax(0, 1fr) 40px 56px;
  }
  .private-chat-tools summary {
    width: 40px;
    height: 40px;
  }
  .private-chat-form > button[type="submit"] {
    width: 56px;
    min-width: 56px;
  }
}

/* Private chat tools unclipped 2026-07-12 */
.private-chat-window,
.private-chat-dock,
.private-chat-form,
.private-chat-tools {
  overflow: visible !important;
}
.private-chat-menu-panel {
  right: -70px !important;
  bottom: calc(100% + 12px) !important;
  width: min(330px, calc(100vw - 18px)) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 9px !important;
}
.private-chat-tools .chat-emoji-rail,
.private-chat-tools .chat-sticker-rail {
  flex-wrap: wrap !important;
  overflow: visible !important;
  width: 100% !important;
  gap: 7px !important;
  padding: 0 !important;
}
.private-chat-tools .chat-emoji-rail {
  display: grid !important;
  grid-template-columns: repeat(8, 30px);
  justify-content: start;
}
.private-chat-tools .chat-sticker-rail {
  display: flex !important;
  max-height: none !important;
}
.private-chat-tools .emoji-button,
.private-chat-tools .chat-sticker-button {
  flex: 0 0 auto !important;
}
.private-chat-tools .chat-sticker-button {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
@media (max-width: 520px) {
  .private-chat-window {
    width: calc(100vw - 12px);
  }
  .private-chat-menu-panel {
    left: auto !important;
    right: -66px !important;
    width: min(326px, calc(100vw - 18px)) !important;
  }
  .private-chat-tools .chat-emoji-rail {
    grid-template-columns: repeat(8, 29px);
  }
}

/* Private chat stable button tools 2026-07-12 */
.private-chat-tools {
  display: grid;
  place-items: center;
}
.private-chat-tools summary {
  display: none !important;
}
.private-chat-tool-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 999px;
  background: #ecfdf5;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}
.private-chat-tools .private-chat-menu-panel {
  display: none;
}
.private-chat-tools.is-open .private-chat-menu-panel {
  display: block;
}
.private-chat-tools.is-open .private-chat-tool-toggle {
  border-color: rgba(15, 118, 110, 0.58);
  background: #ccfbf1;
}
@media (max-width: 520px) {
  .private-chat-tool-toggle {
    width: 40px;
    height: 40px;
  }
}

/* Community chat composer compact popup 2026-07-12 */
.community-message-form-simple {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 42px 58px !important;
  align-items: center;
  gap: 8px;
  overflow: visible !important;
  padding: 10px !important;
}
.community-message-form-simple > input[name="body"] {
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 999px;
  padding: 0 16px;
  font-size: 15px;
  background: #fff;
}
.community-message-form-simple > input[type="hidden"] {
  display: none;
}
.community-message-form-simple .community-chat-tools {
  order: 2;
  position: relative;
  z-index: 8;
}
.community-message-form-simple > button[type="submit"] {
  grid-column: auto !important;
  grid-row: auto !important;
  order: 3;
  width: 58px;
  min-width: 58px;
  min-height: 42px;
  border-radius: 999px;
}
.community-message-form-simple .private-chat-menu-panel {
  right: -70px !important;
  bottom: calc(100% + 12px) !important;
  width: min(330px, calc(100vw - 18px)) !important;
  max-height: min(320px, 48vh);
  overflow: auto;
}
.community-message-form-simple .chat-tool-strip {
  display: grid !important;
  gap: 9px !important;
  overflow: visible !important;
}
.community-message-form-simple .chat-emoji-rail {
  display: grid !important;
  grid-template-columns: repeat(8, 30px) !important;
  gap: 6px !important;
  overflow: visible !important;
  width: 100% !important;
}
.community-message-form-simple .chat-sticker-rail {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  overflow: visible !important;
}
.community-message-form-simple .emoji-button,
.community-message-form-simple .chat-sticker-button {
  flex: 0 0 auto !important;
}
.community-message-form-simple .chat-sticker-button {
  max-width: 145px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
@media (max-width: 520px) {
  .community-message-form-simple {
    grid-template-columns: minmax(0, 1fr) 40px 56px !important;
  }
  .community-message-form-simple > button[type="submit"] {
    width: 56px;
    min-width: 56px;
  }
  .community-message-form-simple .private-chat-menu-panel {
    right: -66px !important;
    width: min(326px, calc(100vw - 18px)) !important;
  }
  .community-message-form-simple .chat-emoji-rail {
    grid-template-columns: repeat(8, 29px) !important;
  }
}
/* Community message action row under sender name */
.community-message-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 2px;
  min-width: 0;
}
.community-message-meta-row .community-topic-pill,
.community-message-meta-row .community-connect-button,
.community-message-meta-row .community-report-button {
  flex: 0 0 auto;
}
.community-message-meta-row .community-report-button {
  margin-left: auto;
}
.community-message.is-mine .community-message-meta-row {
  justify-content: flex-end;
}
@media (max-width: 420px) {
  .community-message-meta-row {
    gap: 6px;
  }
  .community-message-meta-row .community-connect-button,
  .community-message-meta-row .community-report-button {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 10px;
  }
}

/* Safe private inbox in Account tab */
.avatar-button,
.bottom-item,
.account-avatar-wrap,
.safe-inbox-shortcut button,
.safe-inbox-head {
  position: relative;
}
.safe-message-badge {
  position: absolute;
  z-index: 5;
  top: 4px;
  right: 6px;
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef174b;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(239, 23, 75, .28);
}
.avatar-button > .safe-message-badge {
  top: -2px;
  right: -2px;
}
.bottom-item > .safe-message-badge {
  top: 7px;
  right: 18%;
}
.account-avatar-wrap {
  display: inline-grid;
  width: 58px;
  height: 58px;
}
.account-avatar-wrap .account-avatar {
  grid-area: 1 / 1;
}
.account-avatar-badge {
  top: -5px;
  right: -5px;
}
.safe-inbox-shortcut {
  padding: 0;
  overflow: hidden;
}
.safe-inbox-shortcut button {
  display: grid;
  width: 100%;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border: 0;
  background: linear-gradient(135deg, #f8fffd 0%, #eef8ff 100%);
  color: #0f172a;
  padding: 14px;
  text-align: left;
}
.safe-inbox-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .18);
}
.safe-inbox-shortcut strong,
.safe-inbox-shortcut small {
  display: block;
  min-width: 0;
}
.safe-inbox-shortcut small {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.safe-inbox-shortcut-badge,
.safe-inbox-head-badge {
  position: static;
  justify-self: end;
}
.safe-inbox-panel {
  display: grid;
  gap: 12px;
}
.safe-inbox-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.safe-inbox-head h3,
.safe-inbox-head p {
  margin: 0;
}
.safe-inbox-head p {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.safe-inbox-list {
  display: grid;
  gap: 10px;
}
.safe-inbox-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  border: 1px solid rgba(15, 118, 110, .12);
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.safe-inbox-row span,
.safe-inbox-row strong,
.safe-inbox-row small,
.safe-inbox-row em {
  display: block;
  min-width: 0;
}
.safe-inbox-row strong {
  color: #0f172a;
  font-size: 14px;
}
.safe-inbox-row small,
.safe-inbox-row em {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.safe-inbox-row em {
  margin-top: 3px;
  color: #334155;
  font-style: normal;
}
.safe-inbox-row > b {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ef174b;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.safe-inbox-empty {
  display: grid;
  gap: 6px;
  border: 1px dashed rgba(15, 118, 110, .22);
  border-radius: 18px;
  background: #f8fffd;
  padding: 14px;
}
.safe-inbox-empty span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
@media (max-width: 420px) {
  .bottom-item > .safe-message-badge {
    right: 12%;
  }
  .safe-inbox-shortcut button,
  .safe-inbox-head,
  .safe-inbox-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 9px;
  }
  .safe-inbox-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }
}

/* Account avatar chooser collapsed flow */
.account-avatar-chooser { margin-top: 10px; display: grid; gap: 10px; justify-items: start; }
.account-avatar-chooser > button { min-height: 38px; padding-inline: 14px; }
.account-avatar-panel { width: 100%; display: grid; gap: 10px; }
.account-role-grid-current { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.account-role-grid-current .account-role-card { cursor: default; }
.account-role-grid-current .account-role-card:hover { transform: none; }
/* Preset avatar gallery */
.preset-avatar-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.9));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.preset-avatar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.preset-avatar-head strong, .preset-avatar-head small, .preset-avatar-head span { display: block; }
.preset-avatar-head strong { font-size: 13px; color: #102033; }
.preset-avatar-head small { margin-top: 2px; font-size: 11px; color: #64748b; }
.preset-avatar-head span { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: rgba(14, 165, 233, 0.1); color: #0369a1; font-size: 11px; font-weight: 800; }
.preset-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 9px; max-height: 210px; overflow: auto; padding: 2px 2px 4px; }
.preset-avatar-option { position: relative; width: 100%; aspect-ratio: 1; border: 2px solid rgba(148, 163, 184, 0.35); border-radius: 999px; padding: 2px; background: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.preset-avatar-option:hover { transform: translateY(-1px); border-color: rgba(14, 165, 233, .7); }
.preset-avatar-option.active { border-color: #0ea5e9; box-shadow: 0 10px 24px rgba(14, 165, 233, 0.24); }
.preset-avatar-option img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 999px; }
.preset-avatar-option b { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 999px; background: #0ea5e9; color: #fff; font-size: 11px; line-height: 1; border: 2px solid #fff; }
@media (max-width: 420px) { .preset-avatar-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); max-height: 196px; } }

/* Feed media and emoji polish - 2026-07-12
   Keep resident post images readable instead of cropping important content. */
.feed-image-grid { align-items: stretch; }
.feed-post-image,
.comment-image-thumb,
.post-image-preview-item,
.feed-preview-item { background: linear-gradient(135deg, #f8fafc, #eef4fb); }
.feed-post-image {
  display: grid;
  place-items: center;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, .18);
}
.feed-image-grid.count-1 .feed-post-image {
  max-height: min(420px, 68vh);
  aspect-ratio: auto;
}
.feed-image-grid.count-1 .feed-post-image img {
  width: 100%;
  height: auto;
  max-height: min(420px, 68vh);
  object-fit: contain;
  background: #f8fafc;
}
.feed-image-grid.count-2 .feed-post-image,
.feed-image-grid.count-3 .feed-post-image,
.feed-image-grid.count-4 .feed-post-image {
  min-height: 154px;
  max-height: 260px;
}
.feed-image-grid.count-3 .feed-post-image:first-child { max-height: 320px; }
.feed-image-grid .feed-post-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}
.comment-image-thumb {
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .18);
}
.comment-image-thumb img,
.comment-preview-image img,
.post-image-preview-button img {
  object-fit: contain;
  background: #f8fafc;
}
.post-image-preview-button img { border-radius: inherit; }
.feed-emoji-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.feed-emoji-toggle {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  font-size: 18px;
  line-height: 1;
}
.feed-emoji-toggle[aria-expanded="true"] {
  border-color: rgba(255, 122, 24, .32);
  background: #fff7ed;
}
.feed-emoji-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(312px, calc(100vw - 44px));
  max-height: 168px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}
.feed-emoji-panel[hidden] { display: none !important; }
.feed-emoji-panel .emoji-button,
.compact-comment-form .feed-emoji-panel .emoji-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex-basis: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 20px;
}
.feed-emoji-panel .emoji-button:hover,
.feed-emoji-panel .emoji-button:focus-visible {
  background: #f1f5f9;
  border-radius: 8px;
}
.compact-comment-form .comment-tools { overflow: visible; }
.compact-comment-form .feed-emoji-picker { align-self: flex-start; }
.post-compose-tools {
  position: relative;
  align-items: center;
}
@media (max-width: 560px) {
  .feed-image-grid.count-2 .feed-post-image,
  .feed-image-grid.count-3 .feed-post-image,
  .feed-image-grid.count-4 .feed-post-image { min-height: 132px; }
  .feed-emoji-panel {
    grid-template-columns: repeat(6, 1fr);
    width: min(252px, calc(100vw - 34px));
  }
}

/* Feed comment form layout fix - 2026-07-12
   Keep comment input readable and keep emoji/photo tools compact. */
.resident-feed-card .compact-comment-form.comment-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.resident-feed-card .compact-comment-form .comment-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.resident-feed-card .compact-comment-form .comment-input-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.resident-feed-card .compact-comment-form .comment-input-row button[type="submit"] {
  width: 54px;
  min-width: 54px;
  min-height: 40px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.resident-feed-card .compact-comment-form .comment-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  max-width: 100%;
  overflow: visible;
}

.resident-feed-card .compact-comment-form .feed-emoji-toggle,
.resident-feed-card .compact-comment-form .comment-photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: #fff;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
  font-size: 17px;
  line-height: 1;
}

.resident-feed-card .compact-comment-form .feed-emoji-toggle[aria-expanded="true"] {
  border-color: rgba(255, 122, 24, .32);
  background: #fff7ed;
  color: #0f172a;
}

.resident-feed-card .compact-comment-form .comment-photo-button span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

@media (max-width: 380px) {
  .resident-feed-card .compact-comment-form .comment-input-row {
    grid-template-columns: minmax(0, 1fr) 50px;
    gap: 6px;
  }
  .resident-feed-card .compact-comment-form .comment-input-row button[type="submit"] {
    width: 50px;
    min-width: 50px;
    padding: 0 8px;
  }
}

/* Feed comment emoji panel hard fix - 2026-07-12
   Override old .emoji-strip flex rules so the feed popup cannot become a thin vertical scrollbar. */
.resident-feed-card .compact-comment-form .feed-emoji-picker {
  position: relative;
  width: 34px;
  height: 34px;
  overflow: visible;
  z-index: 20;
}

.resident-feed-card .compact-comment-form .feed-emoji-panel {
  position: absolute !important;
  left: 0 !important;
  right: auto !important;
  bottom: calc(100% + 10px) !important;
  top: auto !important;
  display: grid !important;
  grid-template-columns: repeat(6, 34px) !important;
  grid-auto-rows: 34px !important;
  width: max-content !important;
  max-width: calc(100vw - 42px) !important;
  max-height: 190px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  gap: 4px !important;
  padding: 8px !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2) !important;
  z-index: 80 !important;
}

.resident-feed-card .compact-comment-form .feed-emoji-panel[hidden] {
  display: none !important;
}

.resident-feed-card .compact-comment-form .feed-emoji-panel .emoji-button {
  display: grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  flex: none !important;
  padding: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

.resident-feed-card .compact-comment-list,
.resident-feed-card .comment-list {
  overflow: visible !important;
  max-height: none !important;
}

@media (max-width: 380px) {
  .resident-feed-card .compact-comment-form .feed-emoji-panel {
    grid-template-columns: repeat(5, 34px) !important;
  }
}

/* Feed comment bottom sheet - 2026-07-12
   Full comment thread lives outside the card so image upload and emoji stay tappable on mobile. */
.comment-compose-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}
.comment-compose-entry em {
  flex: 0 0 auto;
  color: #0f172a;
  font-style: normal;
  letter-spacing: 0;
}
.comment-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(15, 23, 42, .36);
  backdrop-filter: blur(8px);
}
.comment-sheet {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-radius: 22px 22px 18px 18px;
  background: #fff;
  box-shadow: 0 -18px 60px rgba(15, 23, 42, .28);
  overflow: hidden;
}
.comment-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.comment-sheet-head span,
.comment-sheet-head strong {
  display: block;
}
.comment-sheet-head span {
  color: #f97316;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.comment-sheet-head strong {
  color: #0f172a;
  font-size: 17px;
}
.comment-sheet-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
}
.comment-sheet-post {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.comment-sheet-post strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}
.comment-sheet-post p {
  margin: 4px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}
.comment-sheet-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
}
.comment-sheet-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.comment-sheet-bubble {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 14px;
  background: #f6f8fb;
  color: #334155;
}
.comment-sheet-bubble strong {
  display: block;
  margin-bottom: 3px;
  color: #0f172a;
  font-size: 13px;
}
.comment-sheet-bubble p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.comment-sheet-empty {
  padding: 18px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.comment-sheet-form {
  display: grid;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(148, 163, 184, .16);
  background: rgba(255,255,255,.98);
}
.comment-sheet-compose {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px 50px;
  gap: 8px;
  align-items: end;
}
.comment-sheet-compose textarea {
  width: 100%;
  min-height: 38px;
  max-height: 92px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  line-height: 1.25;
}
.comment-sheet-photo,
.comment-sheet-send,
.comment-sheet-compose .feed-emoji-toggle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}
.comment-sheet-photo {
  border: 1px solid rgba(148, 163, 184, .24);
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}
.comment-sheet-send {
  width: 50px;
  min-width: 50px;
  border: 0;
  background: linear-gradient(180deg, #ffad18, #ff6417);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 111, 17, .26);
}
.comment-sheet-image-preview {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px;
  border-radius: 12px;
  background: #f8fafc;
}
.comment-sheet-image-preview span {
  min-width: 0;
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-sheet-remove-image {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 18px;
}
.comment-sheet .feed-emoji-panel {
  left: 0 !important;
  bottom: calc(100% + 10px) !important;
  grid-template-columns: repeat(6, 34px) !important;
  z-index: 1500 !important;
}
@media (max-width: 480px) {
  .comment-sheet-overlay { padding: 0; }
  .comment-sheet {
    width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
  }
  .comment-sheet-compose {
    grid-template-columns: 36px minmax(0, 1fr) 36px 48px;
    gap: 7px;
  }
  .comment-sheet-send { width: 48px; min-width: 48px; }
}

/* Resident verification proof layout */
.resident-proof-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; align-items: stretch; }
.resident-proof-fields { display: grid; gap: 8px; min-width: 0; }
.resident-proof-sample { display: grid; gap: 8px; border: 1px solid rgba(216, 226, 240, .96); border-radius: 16px; background: linear-gradient(180deg, #fff, #f8fbff); padding: 10px; color: #516173; box-shadow: 0 10px 24px rgba(30, 54, 84, .08); }
.resident-proof-sample > span { color: #172033; font-size: 12px; font-weight: 900; }
.resident-proof-sample > small { font-size: 11px; line-height: 1.35; }
.resident-proof-phone { display: grid; gap: 8px; min-height: 250px; border-radius: 20px; background: #f4f4f4; padding: 12px 10px; overflow: hidden; }
.resident-proof-phone-head { display: grid; grid-template-columns: 22px 1fr; align-items: center; color: #202633; }
.resident-proof-phone-head b { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px rgba(17,24,39,.08); }
.resident-proof-phone-head strong { text-align: center; font-size: 14px; }
.resident-proof-apartment-card, .resident-proof-member { border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgba(17,24,39,.08); padding: 10px; }
.resident-proof-apartment-card { display: grid; gap: 5px; }
.resident-proof-apartment-card small { color: #98a2b3; font-weight: 800; }
.resident-proof-apartment-card strong { color: #273244; font-size: 12px; }
.resident-proof-apartment-card em { color: #667085; font-style: normal; font-size: 11px; }
.resident-proof-tabs { display: flex; justify-content: space-between; border-bottom: 2px solid #fb6b00; padding-bottom: 7px; font-size: 12px; }
.resident-proof-tabs b { color: #273244; }
.resident-proof-tabs span { color: #98a2b3; font-weight: 800; }
.resident-proof-member { display: grid; grid-template-columns: 42px 1fr; gap: 9px; align-items: center; }
.resident-proof-member i { width: 42px; height: 42px; border-radius: 999px; background: #aab8d3; display: block; }
.resident-proof-member p { margin: 0; display: grid; gap: 4px; }
.resident-proof-member strong, .resident-proof-member small { display: block; max-width: 110px; height: 10px; border-radius: 999px; color: transparent; background: linear-gradient(90deg, #e5e7eb, #f8fafc, #e5e7eb); }
.resident-proof-member small { max-width: 130px; height: 9px; }
@media (max-width: 760px) { .resident-proof-layout { grid-template-columns: 1fr; } .resident-proof-phone { min-height: 220px; } }
/* Resident verification interests v1 */
.resident-interests { display: grid; gap: 10px; border: 1px solid rgba(216, 226, 240, .96); border-radius: 16px; background: linear-gradient(180deg, #fff, #f8fbff); padding: 12px; }
.resident-section-heading { display: grid; gap: 3px; }
.resident-section-heading strong { color: #172033; font-size: 14px; font-weight: 900; }
.resident-section-heading small { color: #667085; font-size: 12px; line-height: 1.35; }
.resident-interest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.resident-interest-chip { min-height: 42px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(216, 226, 240, .98); border-radius: 12px; background: rgba(255,255,255,.92); padding: 9px 10px; color: #263447; font-size: 12px; font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px rgba(15, 23, 42, .04); }
.resident-interest-chip input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #ff6b00; }
.resident-interest-chip span { min-width: 0; line-height: 1.25; }
.resident-interest-chip:has(input:checked) { border-color: rgba(255, 107, 0, .48); background: linear-gradient(135deg, rgba(255, 246, 235, .98), rgba(236, 253, 245, .9)); box-shadow: 0 10px 22px rgba(255, 107, 0, .12); }
@media (max-width: 920px) { .resident-interest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .resident-interest-grid { grid-template-columns: 1fr; } .resident-interest-chip { min-height: 40px; font-size: 12px; } }

/* Zone/address/group mobile stability - 20260715 */
.resident-address {
  display: -webkit-box;
  max-width: min(250px, calc(100vw - 146px));
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.28;
  word-break: break-word;
}
.bottom-nav {
  right: 0 !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(72px + env(safe-area-inset-bottom)) !important;
  padding: 5px 8px calc(7px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box;
}
.bottom-item {
  min-width: 0;
  min-height: 56px;
  align-content: center;
  overflow: visible;
}
.bottom-item span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.app-scroll {
  padding-bottom: calc(118px + env(safe-area-inset-bottom)) !important;
}
@media (max-width: 560px) {
  html, body, .app-stage, .phone-app {
    min-height: 100svh;
    min-height: 100dvh;
  }
  .phone-app {
    overflow: hidden;
  }
  .bottom-nav {
    position: absolute;
    left: 0;
    right: 0 !important;
    bottom: 0;
  }
}
@media (max-width: 340px) {
  .resident-address { max-width: min(210px, calc(100vw - 132px)); }
  .bottom-item { font-size: 9.5px; }
  .bottom-item span { width: 29px; height: 29px; font-size: 20px; }
}


/* Workforce OS v1 booking flow */
.job-field-block {
  display: grid;
  gap: 8px;
}
.job-field-label {
  color: #172033;
  font-size: 12px;
  font-weight: 800;
}
.job-prompt-clear textarea {
  width: 100%;
  min-width: 0;
  outline: none;
}
.form-help {
  color: #68768a;
  font-size: 11px;
  line-height: 1.35;
}
.workforce-chip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.workforce-chip {
  min-width: 0;
  cursor: pointer;
}
.workforce-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.workforce-chip span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid #e6edf7;
  border-radius: 10px;
  background: #fff;
  color: #1d2b40;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 7px 14px rgba(26, 45, 72, .06);
}
.workforce-chip.active span,
.workforce-chip input:checked + span {
  border-color: #ffb15f;
  background: linear-gradient(180deg, #fff6e8, #ffe2ba);
  color: #9a4b00;
}
.workforce-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.workforce-status-strip span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 9px;
  background: #f2f6fb;
  color: #536274;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}
.workforce-draft-card {
  display: grid;
  gap: 10px;
}
.workforce-draft-card small {
  display: block;
  margin-top: 5px;
  color: #68768a;
  font-size: 11px;
  line-height: 1.4;
}
.workforce-job-images {
  margin-top: 4px;
}
.workforce-job-image {
  max-height: 190px;
  object-fit: cover;
}
.booking-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.booking-actions button {
  min-height: 38px;
  padding-inline: 8px;
  font-size: 11px;
  white-space: normal;
}
@media (max-width: 430px) {
  .workforce-hero-card { grid-template-columns: 58px minmax(0, 1fr); }
  .workforce-robot { display: none; }
  .workforce-house { width: 58px; height: 58px; font-size: 30px; }
  .workforce-chip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workforce-status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-actions { grid-template-columns: 1fr; }
}


/* Workforce home service redesign */
.home-service-os { display: grid; gap: 12px; padding-bottom: 10px; }
.home-service-search { display: grid; grid-template-columns: 34px minmax(0,1fr) 58px; gap: 6px; align-items: center; min-height: 44px; border: 1px solid rgba(226,232,240,.95); border-radius: 14px; background: #fff; padding: 5px 7px; box-shadow: 0 7px 18px rgba(15,23,42,.06); }
.home-service-search span { display: grid; place-items: center; color: #94a3b8; font-size: 18px; }
.home-service-search input { min-width: 0; border: 0; outline: 0; font-size: 13px; }
.home-service-search button { min-height: 34px; border: 0; border-radius: 10px; background: #f97316; color: #fff; font-weight: 900; }
.home-service-ai-card, .resident-job-card, .service-picker-sheet, .worker-job-panel { border: 1px solid rgba(226,232,240,.95); border-radius: 16px; background: #fff; padding: 12px; box-shadow: 0 8px 20px rgba(15,23,42,.07); }
.home-service-ai-card { display: grid; grid-template-columns: 54px minmax(0,1fr) 30px; gap: 10px; align-items: center; }
.home-service-ai-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: linear-gradient(135deg,#fff7ed,#e0f2fe); font-size: 26px; }
.home-service-ai-card strong, .home-service-ai-card p { margin: 0; }
.home-service-ai-card p { margin-top: 4px; color: #64748b; font-size: 12px; line-height: 1.35; }
.home-service-ai-card button { width: 30px; height: 30px; border: 0; border-radius: 999px; background: #f8fafc; color: #64748b; font-size: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title strong, .section-title span { display: block; }
.section-title strong { color: #172033; font-size: 15px; }
.section-title span { margin-top: 2px; color: #64748b; font-size: 12px; }
.home-service-quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.home-service-quick-grid button, .home-service-tabs button { display: grid; place-items: center; gap: 5px; min-width: 0; min-height: 64px; border: 1px solid rgba(226,232,240,.95); border-radius: 14px; background: #fff; color: #334155; padding: 7px 4px; font-size: 11px; font-weight: 900; }
.home-service-quick-grid button.active, .home-service-tabs button.active { border-color: rgba(249,115,22,.42); background: #fff7ed; color: #c2410c; }
.home-service-quick-grid span, .home-service-tabs span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 11px; background: #f1f5f9; font-size: 17px; }
.home-service-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.home-service-tabs button { min-height: 62px; }
.home-service-list { display: grid; gap: 9px; }
.home-service-list button { display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; gap: 10px; align-items: center; min-height: 64px; border: 1px solid rgba(226,232,240,.95); border-radius: 14px; background: #fff; padding: 10px; text-align: left; }
.home-service-list button > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #f8fafc; font-size: 20px; }
.home-service-list strong, .home-service-list small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-service-list strong { color: #172033; font-size: 13px; }
.home-service-list small { margin-top: 3px; color: #64748b; font-size: 11px; }
.home-service-list b { color: #94a3b8; font-size: 22px; }
.service-picker-sheet summary { cursor: pointer; color: #172033; font-weight: 900; }
.worker-job-panel { display: grid; gap: 9px; }
.worker-job-panel article { display: grid; grid-template-columns: minmax(0,1fr) 88px; gap: 8px; align-items: center; border-radius: 14px; background: #f8fafc; padding: 10px; }
.worker-job-panel strong, .worker-job-panel span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worker-job-panel span { margin-top: 3px; color: #64748b; font-size: 12px; }
.worker-job-panel button { min-height: 36px; border: 0; border-radius: 10px; background: #0ea5e9; color: #fff; font-weight: 900; }
@media (max-width: 430px) { .home-service-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); } .home-service-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .worker-job-panel article { grid-template-columns: 1fr; } }
/* Food OS module */
.food-os { display: grid; gap: 12px; padding-bottom: 10px; }
.food-hero { display: grid; grid-template-columns: minmax(0,1fr) clamp(72px, 22vw, 96px); gap: 12px; align-items: center; min-height: 148px; padding: 18px; overflow: hidden; border-radius: 18px; background: linear-gradient(135deg, #fff7ed, #e6f7ff 68%, #f8fafc); border: 1px solid rgba(229,235,246,.9); box-shadow: 0 10px 26px rgba(25,38,56,.1); }
.food-hero-copy { min-width: 0; }
.food-hero-copy span, .food-detail-summary span { color: #f97316; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.food-hero h3, .food-hero p, .food-detail-summary h3, .food-detail-summary p { margin: 0; }
.food-hero h3 { margin-top: 5px; color: #172033; font-size: 22px; line-height: 1.08; }
.food-hero p { margin-top: 8px; max-width: 24em; color: #667085; font-size: 13px; line-height: 1.45; }
.food-hero-visual { align-self: center; justify-self: end; display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 92px; border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 12px 26px rgba(249,115,22,.14); font-size: clamp(30px, 9vw, 42px); }
.food-ai-form { display: grid; grid-template-columns: minmax(0,1fr) 76px; gap: 8px; }
.food-ai-form input { min-width: 0; border: 1px solid rgba(216,226,240,.96); border-radius: 14px; background: #fff; padding: 12px 13px; outline: none; font-size: 14px; }
.food-ai-form button, .food-action-row button, .food-action-row a, .food-voucher-row button, .food-ai-card button, .food-menu-item button, .food-related-row button { display: grid; place-items: center; min-height: 40px; border-radius: 12px; background: linear-gradient(180deg,#ffad18,#ff6417); color: #fff; font-weight: 900; text-decoration: none; padding: 0 12px; border: 0; }
.food-ai-prompt-row, .food-filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 1px 0 4px; scrollbar-width: thin; }
.food-ai-prompt-row button, .food-filter-row button, .food-category-sheet button { flex: 0 0 auto; min-height: 36px; border-radius: 999px; background: #fff; border: 1px solid rgba(216,226,240,.96); color: #334155; padding: 0 12px; font-size: 12px; font-weight: 900; white-space: nowrap; }
.food-filter-row button span { margin-right: 5px; }
.food-filter-row button.active, .food-category-sheet button.active { background: #fff7ed; border-color: rgba(249,115,22,.4); color: #c2410c; }
.food-ai-prompt-row button { color: #075985; background: #f0f9ff; border-color: rgba(14,165,233,.22); }
.food-ai-result { display: grid; gap: 8px; border-radius: 16px; background: #fff; border: 1px solid rgba(216,226,240,.96); padding: 12px; }
.food-ai-result p { margin: 0; color: #475569; font-size: 13px; line-height: 1.45; }
.food-ai-card { display: grid; gap: 5px; border-radius: 12px; background: #f8fafc; padding: 10px; }
.food-category-sheet { border-radius: 16px; background: #fff; border: 1px solid rgba(216,226,240,.96); overflow: hidden; }
.food-category-sheet summary { cursor: pointer; padding: 12px 14px; color: #172033; font-weight: 900; }
.food-category-sheet div { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 12px; }
.food-voucher-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(218px, 78%); gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.food-voucher-row article { display: grid; grid-template-rows: auto auto 40px; gap: 6px; min-height: 116px; border-radius: 16px; background: linear-gradient(135deg,#0ea5e9,#14b8a6); color: #fff; padding: 14px; box-shadow: 0 10px 22px rgba(14,165,233,.18); }
.food-voucher-row strong, .food-voucher-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-voucher-row span { font-size: 12px; opacity: .94; }
.food-voucher-row button { background: rgba(255,255,255,.96); color: #0f766e; }
.food-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #172033; }
.food-section-head strong { font-size: 15px; }
.food-section-head span, .food-section-head button { color: #f97316; font-size: 12px; font-weight: 900; background: transparent; border: 0; }
.food-place-list { display: grid; gap: 10px; }
.food-place-card { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 12px; border: 1px solid rgba(216,226,240,.96); border-radius: 16px; background: #fff; padding: 10px; box-shadow: 0 8px 20px rgba(15,23,42,.08); }
.food-place-photo-button { display: block; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; }
.food-place-photo, .food-detail-photo, .food-related-photo { display: grid; place-items: center; width: 100%; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg,#fff7ed,#f0f9ff); color: #f97316; }
.food-place-photo { min-height: 104px; font-size: 32px; }
.food-place-photo img, .food-detail-photo img, .food-related-photo img { width: 100%; height: 100%; object-fit: cover; }
.food-place-main { display: grid; gap: 7px; min-width: 0; }
.food-place-title-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 6px; align-items: start; }
.food-place-title-row button { width: 34px; height: 34px; border-radius: 999px; background: #fff7ed; color: #f97316; border: 1px solid rgba(249,115,22,.2); font-weight: 900; }
.food-place-main strong, .food-place-main span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-place-main span, .food-place-main p { color: #64748b; font-size: 12px; line-height: 1.35; }
.food-place-main p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0; overflow: hidden; }
.food-meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.food-meta-row b, .food-meta-row span { border-radius: 999px; background: #f1f5f9; color: #475569; padding: 4px 7px; font-size: 11px; font-weight: 900; }
.food-meta-row b { background: #fff7ed; color: #c2410c; }
.food-voucher-chip { width: fit-content; max-width: 100%; border-radius: 999px; background: #ecfdf5; color: #047857; padding: 5px 8px; font-size: 11px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-action-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.food-action-row button, .food-action-row a { min-height: 34px; font-size: 11px; }
.food-submit-place { border-radius: 16px; background: #fff; border: 1px solid rgba(216,226,240,.96); padding: 10px 12px; }
.food-submit-place summary { cursor: pointer; font-weight: 900; color: #172033; }
.food-detail { display: grid; gap: 12px; padding-bottom: 12px; }
.food-detail-hero { position: relative; min-height: 178px; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid rgba(216,226,240,.96); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
.food-detail-photo { height: 178px; border-radius: 20px; font-size: 54px; }
.food-detail-hero > button { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(255,255,255,.94); color: #f97316; font-weight: 900; box-shadow: 0 8px 20px rgba(15,23,42,.12); }
.food-detail-summary, .food-selected-dish, .food-menu-list, .food-review-list, .food-related-row { display: grid; gap: 8px; border-radius: 16px; background: #fff; border: 1px solid rgba(216,226,240,.94); padding: 12px; }
.food-detail-summary h3 { margin-top: 3px; color: #172033; font-size: 22px; }
.food-detail-summary p { margin-top: 3px; color: #64748b; font-size: 13px; }
.food-selected-dish { grid-template-columns: minmax(0,1fr) auto; align-items: center; background: #fffaf5; border-color: rgba(249,115,22,.16); }
.food-selected-dish span { display: block; margin-top: 4px; color: #64748b; font-size: 12px; }
.food-selected-dish b { color: #f97316; }
.food-reserve-form label { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 900; }
.food-menu-list h3, .food-review-list h3, .food-related-row h3, #foodReviewForm h3 { margin: 0; color: #172033; font-size: 15px; }
.food-menu-item { display: grid; grid-template-columns: minmax(0,1fr) auto 34px; gap: 9px; align-items: center; min-height: 56px; }
.food-menu-item strong, .food-menu-item small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-menu-item small { color: #64748b; font-size: 11px; }
.food-menu-item span { color: #f97316; font-size: 12px; font-weight: 900; white-space: nowrap; }
.food-menu-item button { width: 34px; min-height: 34px; padding: 0; border-radius: 999px; }
.food-review-list article { display: grid; gap: 6px; border-radius: 14px; background: #f8fafc; padding: 10px; }
.food-review-list article > div { display: flex; justify-content: space-between; gap: 8px; }
.food-review-list p { margin: 0; color: #475569; font-size: 12px; line-height: 1.4; }
.food-related-row > div { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(112px, 32%); gap: 9px; overflow-x: auto; }
.food-related-row button { align-content: start; gap: 5px; min-height: 132px; padding: 8px; background: #fff; color: #172033; border: 1px solid rgba(216,226,240,.94); box-shadow: 0 8px 18px rgba(15,23,42,.06); }
.food-related-photo { height: 68px; border-radius: 12px; font-size: 24px; }
.food-related-row span, .food-related-row small { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.food-related-row small { color: #64748b; font-size: 11px; }
.food-owner-panel { display: grid; gap: 10px; border-radius: 16px; background: #fff; border: 1px solid rgba(216,226,240,.96); padding: 10px 12px; }
.food-owner-panel summary { cursor: pointer; font-weight: 900; color: #172033; }
.food-owner-note { margin: 8px 0; color: #64748b; font-size: 12px; line-height: 1.45; }
.food-owner-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: start; }
.food-owner-products { display: grid; gap: 8px; }
.food-merchant-product { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 54px; border-radius: 14px; background: #f8fafc; border: 1px solid rgba(226,232,240,.92); padding: 10px; }
.food-merchant-product strong, .food-merchant-product span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.food-merchant-product span { margin-top: 3px; color: #64748b; font-size: 12px; }
.food-merchant-product b { border-radius: 999px; background: #fff7ed; color: #c2410c; padding: 5px 8px; font-size: 11px; white-space: nowrap; }
@media (max-width: 560px) { .food-owner-grid { grid-template-columns: 1fr; } }
@media (max-width: 430px) {
  .food-hero { grid-template-columns: minmax(0,1fr) 78px; min-height: 142px; padding: 16px; }
  .food-hero h3 { font-size: 21px; }
  .food-hero p { font-size: 12.5px; }
  .food-place-card { grid-template-columns: 96px minmax(0,1fr); }
  .food-place-photo { min-height: 96px; }
  .food-action-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .food-ai-form { grid-template-columns: minmax(0,1fr) 72px; }
}
@media (max-width: 360px) {
  .food-hero { grid-template-columns: 1fr; }
  .food-hero-visual { justify-self: start; width: 68px; }
  .food-place-card { grid-template-columns: 1fr; }
  .food-place-photo { min-height: 140px; }
}
.admin-mini-thumb { display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 14px; background: #fff7ed; font-size: 22px; }
.admin-mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 430px) { .food-place-card, .food-detail-head { grid-template-columns: 1fr; } .food-place-photo, .food-place-photo.large { min-height: 150px; } .food-action-row { grid-template-columns: 1fr; } }

/* Provider mini-shop profiles */
.provider-avatar-link {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.provider-avatar-link:focus-visible {
  outline: 3px solid rgba(14, 165, 233, .35);
  outline-offset: 3px;
}
.worker-card-actions {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 10px;
  align-items: center;
}
.provider-profile-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px;
  color: #102033;
  background: linear-gradient(135deg, #ffffff 0%, #eff9ff 52%, #fff7ed 100%);
  border: 1px solid rgba(14, 165, 233, .14);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .12);
}
.provider-profile-hero.merchant-shop {
  background: linear-gradient(135deg, #ffffff 0%, #f3fbf6 48%, #fff7ed 100%);
  border-color: rgba(34, 197, 94, .15);
}
.provider-profile-cover {
  position: absolute;
  inset: 0 0 auto 0;
  height: 76px;
  background: linear-gradient(90deg, rgba(14, 165, 233, .2), rgba(249, 115, 22, .18));
  pointer-events: none;
}
.provider-profile-main {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  padding-top: 32px;
}
.provider-profile-avatar {
  width: 72px;
  height: 72px;
  border: 4px solid #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}
.provider-profile-title span,
.provider-section-head span,
.provider-service-item span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, .1);
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
}
.provider-profile-title h3 {
  margin: 6px 0 2px;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
  color: #0f172a;
}
.provider-profile-title p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}
.provider-profile-badges,
.provider-profile-metrics,
.provider-profile-tabs {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.provider-profile-badges span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(148, 163, 184, .24);
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}
.provider-profile-metric {
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(148, 163, 184, .18);
}
.provider-profile-metric strong,
.provider-profile-metric small {
  display: block;
}
.provider-profile-metric strong {
  color: #0f172a;
  font-size: 15px;
}
.provider-profile-metric small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}
.provider-profile-tabs {
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}
.provider-profile-tabs span {
  flex: 1 0 auto;
  min-width: max-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}
.provider-section {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
.provider-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.provider-section-head h3 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}
.provider-service-list,
.provider-review-list,
.provider-voucher-list {
  display: grid;
  gap: 10px;
}
.provider-service-item,
.provider-voucher-item,
.provider-review-item,
.provider-empty-panel,
.provider-ai-summary {
  border-radius: 16px;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .18);
}
.provider-service-item,
.provider-voucher-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.provider-service-item strong,
.provider-voucher-item strong,
.provider-ai-summary strong,
.provider-empty-panel strong {
  display: block;
  margin-top: 5px;
  color: #102033;
  font-size: 14px;
}
.provider-service-item p,
.provider-ai-summary p,
.provider-empty-panel span,
.provider-review-item p,
.provider-voucher-item span {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.provider-service-item aside {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 96px;
}
.provider-service-item aside b {
  color: #f97316;
  font-size: 13px;
  white-space: nowrap;
}
.provider-voucher-item code {
  padding: 7px 9px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
}
.provider-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.provider-gallery-tile {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fafc, #e0f2fe);
  border: 1px solid rgba(14, 165, 233, .16);
  text-align: center;
}
.provider-gallery-tile b {
  font-size: 24px;
}
.provider-gallery-tile small {
  margin-top: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.provider-review-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #f97316;
}
.provider-review-item div strong {
  color: #0f172a;
}
.provider-sticky-actions {
  position: static;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .16);
  backdrop-filter: blur(14px);
}
.provider-review-form,
.provider-service-form {
  margin-top: 14px;
}
.provider-review-form strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}
@media (max-width: 430px) {
  .provider-profile-main { grid-template-columns: 64px minmax(0, 1fr); }
  .provider-profile-avatar { width: 64px; height: 64px; }
  .provider-service-item,
  .provider-voucher-item { grid-template-columns: minmax(0, 1fr); }
  .provider-service-item aside { justify-items: stretch; }
  .provider-service-item aside b { white-space: normal; }
  .provider-gallery-grid { grid-template-columns: repeat(3, minmax(72px, 1fr)); overflow-x: auto; }
  .provider-sticky-actions { grid-template-columns: 1fr; }
  .worker-card-actions { grid-template-columns: 1fr; }
}
/* Events module - 20260718-events-os-v1 */
.events-os,
.event-detail {
  display: grid;
  gap: 16px;
  color: #172033;
}
.events-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  min-height: 190px;
  overflow: hidden;
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 44%, rgba(255,255,255,.18) 100%),
    url('/hero2.jpg') center/cover;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .1);
}
.events-hero span,
.event-detail-head p,
.event-section-head p,
.event-meta span,
.event-detail-meta span,
.event-filter-panel > span,
.event-card-body p,
.event-schedule-row small,
.event-mini-rank small,
.event-notify-banner span,
.event-empty span {
  color: #64748b;
}
.events-hero span {
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}
.events-hero h2 {
  margin: 0;
  color: #111827;
  font-size: 34px;
  line-height: 1;
}
.events-hero p {
  max-width: 580px;
  margin: 10px 0 16px;
  color: #475569;
  line-height: 1.45;
}
.event-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  width: min(100%, 520px);
  min-height: 46px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .24);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.event-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: #0f172a;
}
.event-search button,
.event-near-btn,
.event-category-row button,
.event-chip-grid button,
.event-card-actions button,
.event-apply-filter,
.event-side-head button,
.event-notify-banner button,
.event-detail-actions button,
.event-text-link,
.event-map button {
  border-radius: 999px;
  font-weight: 800;
}
.event-search button {
  margin: 4px;
  background: #f8fafc;
  color: #0f172a;
}
.event-near-btn {
  min-width: 96px;
  min-height: 42px;
  padding: 0 16px;
  background: #fff7ed;
  color: #f97316;
  box-shadow: 0 10px 28px rgba(249, 115, 22, .18);
}
.event-category-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 1px 8px;
}
.event-category-row button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  background: #fff;
  color: #334155;
  border: 1px solid rgba(226, 232, 240, .95);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
  font-size: 12px;
}
.event-category-row button.active,
.event-chip-grid button.active {
  border-color: rgba(249, 115, 22, .38);
  background: #fff7ed;
  color: #f97316;
}
.events-layout {
  display: grid;
  gap: 16px;
}
.events-main,
.events-side {
  display: grid;
  align-content: start;
  gap: 16px;
}
.event-section-head,
.event-side-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.event-section-head h3,
.event-detail-section h3,
.event-side-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}
.event-section-head p {
  margin: 4px 0 0;
  font-size: 13px;
}
.event-section-head button,
.event-side-head button,
.event-text-link {
  background: transparent;
  color: #2563eb;
  font-size: 12px;
}
.event-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.event-card,
.event-filter-panel,
.event-side-card,
.event-detail-head,
.event-detail-section,
.event-empty {
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .88);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .07);
}
.event-card {
  overflow: hidden;
}
.event-card-image,
.event-detail-hero {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #e2e8f0;
}
.event-card-image {
  aspect-ratio: 1.36;
}
.event-card-image img,
.event-detail-hero img,
.event-row-photo img,
.event-mini-rank img,
.event-related-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.event-tag.is-purple,
.event-schedule-row em.is-purple { background: #7c3aed; }
.event-tag.is-orange,
.event-schedule-row em.is-orange { background: #f97316; }
.event-tag.is-blue,
.event-schedule-row em.is-blue { background: #2563eb; }
.event-tag.is-green,
.event-schedule-row em.is-green { background: #16a34a; }
.event-tag.is-pink,
.event-schedule-row em.is-pink { background: #db2777; }
.event-card-image time,
.event-detail-hero time,
.event-related-row time {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 52px;
  border-radius: 8px;
  background: #fff;
  color: #ef4444;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
}
.event-card-image time b,
.event-detail-hero time b,
.event-related-row time b {
  font-size: 20px;
  line-height: 1;
}
.event-card-image time small,
.event-detail-hero time small,
.event-related-row time small {
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}
.event-card-body {
  display: grid;
  gap: 9px;
  padding: 13px;
}
.event-card-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.3;
}
.event-card-body p,
.event-detail-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.42;
}
.event-meta,
.event-detail-meta {
  display: grid;
  gap: 5px;
  font-size: 12px;
}
.event-card-actions,
.event-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.event-card-actions button,
.event-detail-actions button {
  min-height: 38px;
  padding: 0 12px;
  background: #f1f5f9;
  color: #2563eb;
}
.event-card-actions button:first-child,
.event-detail-actions button:first-child,
.event-apply-filter,
.event-notify-banner button {
  background: linear-gradient(135deg, #ff7a18, #ff4f1f);
  color: #fff;
  box-shadow: 0 12px 24px rgba(249, 115, 22, .22);
}
.event-date-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}
.event-date-tabs button {
  flex: 0 0 86px;
  min-height: 48px;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  border: 1px solid rgba(226, 232, 240, .95);
  font-size: 12px;
  font-weight: 800;
}
.event-date-tabs button.active {
  border-color: rgba(249, 115, 22, .36);
  color: #f97316;
}
.event-schedule-list {
  display: grid;
  gap: 8px;
}
.event-schedule-row {
  display: grid;
  grid-template-columns: 48px 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 10px 0;
  background: transparent;
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  text-align: left;
}
.event-schedule-row time,
.event-schedule-row span,
.event-schedule-row strong,
.event-schedule-row small {
  display: block;
  min-width: 0;
}
.event-schedule-row time b {
  color: #0f172a;
  font-size: 12px;
}
.event-row-photo {
  height: 62px;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
}
.event-schedule-row strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25;
}
.event-schedule-row em {
  min-width: 72px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.event-notify-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #9f43f5);
  color: #fff;
}
.event-notify-banner span {
  color: rgba(255,255,255,.82);
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.event-notify-banner button {
  min-height: 40px;
  padding: 0 14px;
  background: #fff;
  color: #6d28d9;
  box-shadow: none;
}
.event-filter-panel,
.event-side-card,
.event-detail-head,
.event-detail-section,
.event-empty {
  padding: 16px;
}
.event-filter-panel {
  display: grid;
  gap: 12px;
}
.event-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.event-chip-grid button {
  min-height: 34px;
  padding: 0 12px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid rgba(226, 232, 240, .92);
  font-size: 12px;
}
.event-apply-filter {
  min-height: 42px;
  padding: 0 14px;
}
.event-side-card {
  display: grid;
  gap: 10px;
}
.event-mini-rank {
  display: grid;
  grid-template-columns: 26px 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  background: transparent;
  text-align: left;
}
.event-mini-rank > b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e0f2fe;
  color: #2563eb;
  font-size: 12px;
}
.event-mini-rank span {
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
}
.event-mini-rank strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
}
.event-mini-rank strong small {
  display: block;
  margin-top: 3px;
  font-weight: 600;
}
.event-mini-rank em {
  color: #f97316;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.event-detail-hero {
  min-height: 255px;
  border-radius: 8px;
}
.event-detail-head h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
}
.event-detail-meta {
  margin-top: 12px;
}
.event-detail-actions {
  margin-top: 16px;
}
.event-detail-section p {
  margin: 10px 0 0;
  color: #475569;
  line-height: 1.55;
  font-size: 14px;
}
.event-agenda {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.event-agenda div {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}
.event-agenda i {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #f97316;
}
.event-agenda i.is-purple { background: #7c3aed; }
.event-agenda i.is-blue { background: #2563eb; }
.event-agenda i.is-green { background: #16a34a; }
.event-agenda i.is-pink { background: #db2777; }
.event-agenda strong,
.event-agenda small {
  display: block;
}
.event-agenda strong {
  color: #0f172a;
  font-size: 13px;
}
.event-agenda small {
  color: #64748b;
  margin-top: 3px;
}
.event-map {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.8), rgba(255,255,255,.4)),
    repeating-linear-gradient(45deg, #eef2f7 0 12px, #e2e8f0 12px 14px);
  border: 1px solid rgba(226, 232, 240, .9);
}
.event-map span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
}
.event-map small {
  color: #334155;
  font-weight: 800;
}
.event-map button {
  min-height: 34px;
  padding: 0 12px;
  background: #fff;
  color: #2563eb;
}
.event-related-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.event-related-row button {
  min-width: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}
.event-related-row span {
  position: relative;
  display: block;
  height: 82px;
  overflow: hidden;
  border-radius: 8px;
  background: #e2e8f0;
}
.event-related-row time {
  min-width: 36px;
  min-height: 40px;
  left: 6px;
  bottom: 6px;
}
.event-related-row time b { font-size: 15px; }
.event-related-row strong,
.event-related-row small {
  display: block;
  margin-top: 6px;
}
.event-related-row strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.25;
}
.event-related-row small {
  color: #64748b;
  font-size: 11px;
}
@media (min-width: 900px) {
  .events-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
  }
  .event-feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .event-card-actions {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .events-hero {
    grid-template-columns: 1fr;
    min-height: 172px;
    padding: 18px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
      url('/hero2.jpg') center/cover;
  }
  .events-hero h2 { font-size: 28px; }
  .event-near-btn { justify-self: start; }
  .event-feature-grid { grid-template-columns: 1fr; }
  .events-side { order: 3; }
  .event-filter-panel { display: none; }
  .event-schedule-row {
    grid-template-columns: 44px 84px minmax(0, 1fr) 28px;
    gap: 9px;
  }
  .event-schedule-row em {
    width: 28px;
    min-width: 28px;
    height: 28px;
    overflow: hidden;
    padding: 0;
    color: transparent;
  }
  .event-schedule-row em::after {
    content: '›';
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #fff;
    font-size: 18px;
  }
  .event-notify-banner,
  .event-detail-actions {
    grid-template-columns: 1fr;
  }
  .event-notify-banner {
    display: grid;
  }
  .event-detail-hero { min-height: 180px; }
  .event-related-row { overflow-x: auto; grid-template-columns: repeat(3, 118px); }
}
@media (max-width: 380px) {
  .event-card-actions,
  .event-detail-actions { grid-template-columns: 1fr; }
  .event-schedule-row { grid-template-columns: 40px 74px minmax(0, 1fr) 26px; }
  .event-row-photo { height: 56px; }
}

