:root {
  --blue: #2e7eff;
  --blue-deep: #1765e8;
  --blue-soft: #eaf2ff;
  --purple: #7458f6;
  --orange: #ffad2f;
  --red: #ff6572;
  --green: #27b883;
  --cyan: #1bb7cc;
  --ink: #161b26;
  --muted: #7a8498;
  --line: #e8ebf2;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --shadow: 0 8px 24px rgba(36, 53, 82, 0.08);
  --radius: 8px;
  --radius-large: 12px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { background: #edf1f7; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: #edf1f7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; letter-spacing: 0; }

button {
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible { outline: 3px solid rgba(46, 126, 255, 0.25); outline-offset: 2px; }

button:active { transform: scale(0.985); }

img { display: block; max-width: 100%; }

svg { width: 1em; height: 1em; stroke-width: 1.8; }

.app-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--canvas);
  box-shadow: 0 0 44px rgba(26, 39, 65, 0.12);
  transition: background 260ms ease, color 260ms ease;
}

.app-main { min-height: 100vh; }

.app-screen { display: none; }

.app-screen.is-active { display: block; animation: screen-in 220ms ease both; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-inner {
  width: 100%;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(94px + env(safe-area-inset-bottom));
}

.home-inner { padding-top: max(14px, env(safe-area-inset-top)); }

.home-header,
.page-heading,
.profile-heading,
.greeting-row,
.section-title,
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-lockup img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 13px rgba(46, 126, 255, 0.18); }

.brand-lockup span,
.greeting-row > span,
.page-heading > span,
.profile-heading > span,
.delivery-copy,
.section-title > div,
.sheet-header > span { min-width: 0; }

.brand-lockup strong { display: block; font-size: 17px; line-height: 1.1; }
.brand-lockup small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.header-actions { display: flex; gap: 8px; }

.icon-button,
.sheet-header > button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.has-dot::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
}

.greeting-row { margin: 23px 0 14px; }
.greeting-row small { color: var(--muted); font-size: 12px; }
.greeting-row h1 { margin: 4px 0 0; font-size: 25px; line-height: 1.2; }

.weather-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 87px;
  height: 43px;
  padding: 0 10px;
  border: 1px solid #dfe7f5;
  border-radius: 22px;
  background: #fff;
  color: var(--blue);
}

.weather-pill > svg { font-size: 20px; }
.weather-pill b, .weather-pill small { display: block; line-height: 1.05; }
.weather-pill b { font-size: 13px; color: var(--ink); }
.weather-pill small { margin-top: 3px; font-size: 9px; }

.community-hero {
  position: relative;
  height: 196px;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: #eaf3ff;
  box-shadow: var(--shadow);
}

.community-hero > img { width: 100%; height: 100%; object-fit: cover; }
.community-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.96) 2%, rgba(255,255,255,0.78) 39%, rgba(255,255,255,0.03) 72%); }

.hero-copy { position: absolute; z-index: 2; top: 22px; left: 19px; width: 58%; }
.hero-copy > span { display: inline-flex; align-items: center; gap: 4px; color: var(--blue-deep); font-size: 10px; font-weight: 700; }
.hero-copy > span svg { font-size: 13px; }
.hero-copy h2 { margin: 12px 0 15px; font-size: 23px; line-height: 1.35; }
.hero-copy button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 7px 14px rgba(46,126,255,0.22); }

.status-strip,
.notice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.status-icon,
.notice-card > span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.status-strip strong,
.status-strip small,
.notice-card strong,
.notice-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-strip strong, .notice-card strong { font-size: 13px; }
.status-strip small, .notice-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-strip > svg, .notice-card > svg { color: #b2b9c6; }

.section-title { margin: 24px 0 11px; }
.section-title h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.section-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.section-title > button { display: inline-flex; align-items: center; gap: 4px; padding: 7px 0 7px 8px; background: transparent; color: var(--muted); font-size: 11px; }
.compact-title { margin-top: 25px; }

.scene-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 104px;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 0 7px;
  scrollbar-width: none;
}

.scene-row::-webkit-scrollbar,
.community-service-row::-webkit-scrollbar,
.activity-row::-webkit-scrollbar,
.people-row::-webkit-scrollbar { display: none; }

.scene-card {
  position: relative;
  display: flex;
  height: 128px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(38, 58, 90, 0.07);
  text-align: left;
}

.scene-card > span { position: absolute; top: 13px; right: 13px; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; font-size: 18px; }
.scene-card b { font-size: 13px; }
.scene-card small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.scene-card.sleep { background: linear-gradient(150deg, #232a40, #4f3f82); color: #fff; }
.scene-card.sleep > span { background: rgba(255,255,255,0.13); color: #c9bcff; }
.scene-card.sleep small { color: #c7c3d3; }
.scene-card.morning { background: linear-gradient(150deg, #fffaf0, #ffe3aa); }
.scene-card.morning > span { background: rgba(255,173,47,0.17); color: #e99000; }
.scene-card.away > span { background: var(--blue-soft); color: var(--blue); }
.scene-card.home > span { background: #e8f8f2; color: var(--green); }
.scene-card.is-active { outline: 2px solid var(--blue); box-shadow: 0 9px 24px rgba(46,126,255,0.17); }

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

.room-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 89px;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 5px 16px rgba(38, 58, 90, 0.04);
}

.room-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: #f0f2f6; color: #7e8796; font-size: 19px; }
.room-card.is-on .room-icon { background: var(--blue-soft); color: var(--blue); }
.room-card b, .room-card small, .room-card em { display: block; font-style: normal; }
.room-card b { font-size: 13px; }
.room-card small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.3; }

.switch { position: absolute; top: 10px; right: 10px; width: 25px; height: 14px; border-radius: 8px; background: #d6dae2; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: #fff; transition: transform 180ms ease; }
.switch.is-on { background: var(--blue); }
.switch.is-on::after { transform: translateX(11px); }

.climate-card strong { position: absolute; top: 11px; right: 11px; color: var(--green); font-size: 10px; }
.garage-card { grid-column: 1 / -1; min-height: 76px; }
.garage-state { position: absolute; right: 12px; bottom: 13px; padding: 4px 7px; border-radius: 5px; background: #e9f8f1; color: #15865f; font-size: 9px; font-weight: 700; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.service-grid > button { display: flex; min-height: 98px; flex-direction: column; align-items: center; justify-content: center; padding: 10px 5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.service-grid b { margin-top: 7px; font-size: 12px; }
.service-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.service-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; font-size: 19px; }
.service-icon.blue { background: var(--blue-soft); color: var(--blue); }
.service-icon.purple { background: #efecff; color: var(--purple); }
.service-icon.orange { background: #fff3df; color: #e89105; }
.service-icon.red { background: #ffeaed; color: var(--red); }
.service-icon.green { background: #e7f8f1; color: var(--green); }
.service-icon.cyan { background: #e4f8fb; color: var(--cyan); }

.delivery-card {
  position: relative;
  width: 100%;
  height: 194px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: #dceaff;
  text-align: left;
  box-shadow: var(--shadow);
}

.delivery-card > img { width: 100%; height: 100%; object-fit: cover; }
.delivery-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,28,43,0.82), rgba(20,28,43,0.02) 70%); }
.delivery-copy { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 13px; color: #fff; }
.delivery-copy small, .delivery-copy strong, .delivery-copy em { display: block; font-style: normal; }
.delivery-copy small { font-size: 9px; }
.delivery-copy small i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #50e6a7; box-shadow: 0 0 0 4px rgba(80,230,167,0.18); }
.delivery-copy strong { margin-top: 6px; font-size: 16px; }
.delivery-copy em { margin-top: 4px; color: #e6ebf5; font-size: 9px; }
.live-badge { position: absolute; z-index: 2; top: 11px; right: 11px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 5px; background: rgba(255,255,255,0.9); color: var(--blue-deep); font-size: 9px; font-weight: 700; }

.community-service-row,
.activity-row,
.people-row { display: grid; grid-auto-flow: column; gap: 9px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.community-service-row { grid-auto-columns: 105px; }
.community-service-row button { display: flex; height: 102px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.community-service-row button > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); }
.community-service-row button:nth-child(2) > span { background: #e8f8f2; color: var(--green); }
.community-service-row button:nth-child(3) > span { background: #efecff; color: var(--purple); }
.community-service-row button:nth-child(4) > span { background: #fff3df; color: #e89105; }
.community-service-row b { margin-top: 8px; font-size: 12px; }
.community-service-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.facility-panel { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 15px; border-radius: var(--radius); background: linear-gradient(120deg, #283652, #365e82); color: #fff; }
.facility-panel small { color: #b7d0e4; font-size: 9px; }
.facility-panel h3 { margin: 6px 0 3px; font-size: 15px; }
.facility-panel p { margin: 0; color: #dbe6ef; font-size: 9px; }
.facility-panel button { flex: 0 0 auto; padding: 8px 10px; border-radius: 6px; background: #fff; color: #26425f; font-size: 10px; font-weight: 700; }

.notice-card { margin: 12px 0 2px; }

.page-heading { margin: 6px 0 18px; }
.page-heading small { color: var(--muted); font-size: 11px; }
.page-heading h1 { margin: 3px 0 0; font-size: 25px; }

.sub-tabs,
.message-filter { display: flex; gap: 21px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.sub-tabs button,
.message-filter button { position: relative; padding: 7px 0 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; }
.sub-tabs button::after,
.message-filter button::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.sub-tabs button.is-active,
.message-filter button.is-active { color: var(--ink); }
.sub-tabs button.is-active::after,
.message-filter button.is-active::after { background: var(--blue); }

.circle-pane { display: none; }
.circle-pane.is-active { display: block; animation: screen-in 180ms ease both; }

.topic-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.topic-feature { display: flex; height: 104px; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 11px; border-radius: var(--radius); color: #fff; text-align: left; overflow: hidden; }
.topic-feature > svg { font-size: 22px; opacity: 0.9; }
.topic-feature b, .topic-feature small { display: block; }
.topic-feature b { font-size: 12px; }
.topic-feature small { margin-top: 4px; color: rgba(255,255,255,0.75); font-size: 8px; }
.topic-feature.blue { background: linear-gradient(140deg, #2e7eff, #6eb5ff); }
.topic-feature.purple { background: linear-gradient(140deg, #7657f6, #a88cff); }
.topic-feature.orange { background: linear-gradient(140deg, #f7a01c, #ffc962); }

.benefit-banner,
.join-banner { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 11px; padding: 15px; border-radius: var(--radius); background: linear-gradient(125deg, #ffb022, #ff8c62); color: #fff; text-align: left; }
.benefit-banner small, .benefit-banner strong, .benefit-banner em,
.join-banner small, .join-banner strong, .join-banner em { display: block; font-style: normal; }
.benefit-banner small, .join-banner small { font-size: 9px; opacity: 0.85; }
.benefit-banner strong, .join-banner strong { margin-top: 5px; font-size: 15px; }
.benefit-banner em, .join-banner em { margin-top: 4px; font-size: 9px; opacity: 0.85; }
.benefit-banner > svg, .join-banner > svg { flex: 0 0 auto; font-size: 38px; opacity: 0.72; }

.hot-topic { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.hot-art { display: grid; height: 80px; place-items: center; border-radius: 6px; background: linear-gradient(145deg, #dff0ff, #7eb8ff); color: #fff; font-size: 36px; }
.hot-topic small, .hot-topic strong, .hot-topic em { display: block; font-style: normal; }
.hot-topic small { color: var(--blue); font-size: 9px; }
.hot-topic strong { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.hot-topic em { margin-top: 7px; color: var(--muted); font-size: 9px; }

.activity-row { grid-auto-columns: 168px; }
.activity-row button { padding: 0 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.activity-art { display: grid; height: 88px; place-items: center; font-size: 34px; }
.activity-art.health { background: linear-gradient(145deg, #dff7ee, #8edbc0); color: #fff; }
.activity-art.sport { background: linear-gradient(145deg, #e8e1ff, #9b88f5); color: #fff; }
.activity-row b, .activity-row small { display: block; padding: 0 10px; }
.activity-row b { margin-top: 9px; font-size: 12px; }
.activity-row small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.post-card { margin-top: 4px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.post-card header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.post-avatar, .message-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #e8efff; color: var(--blue); font-size: 13px; font-weight: 800; }
.post-avatar.violet { background: #eeeaff; color: var(--purple); }
.post-avatar.blue { background: var(--blue-soft); color: var(--blue); }
.post-card header strong, .post-card header small { display: block; }
.post-card header strong { font-size: 12px; }
.post-card header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.post-card header button { display: grid; width: 30px; height: 30px; place-items: center; background: transparent; color: var(--muted); }
.post-card p { margin: 12px 0; color: #414959; font-size: 12px; line-height: 1.7; }
.post-photo { display: flex; height: 142px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; overflow: hidden; border-radius: 7px; color: #fff; font-size: 32px; }
.post-photo span { font-size: 10px; font-weight: 700; }
.pool-photo { background: linear-gradient(150deg, #5dd0c7, #3989df); }
.gym-photo { background: linear-gradient(150deg, #41526e, #815fee); }
.post-card footer { display: flex; gap: 6px; margin-top: 11px; }
.post-card footer button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 5px; background: #f5f6f9; color: var(--muted); font-size: 10px; }
.post-card footer button:last-child { margin-left: auto; }

.join-banner { margin-top: 0; background: linear-gradient(125deg, #2e7eff, #825ef5); }
.group-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.group-grid > button { display: flex; min-width: 0; flex-direction: column; align-items: stretch; overflow: hidden; padding: 0 0 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.group-art { display: grid; height: 78px; place-items: center; font-size: 31px; }
.group-art.tennis { background: #dff5ef; color: var(--green); }
.group-art.pets { background: #e6efff; color: var(--blue); }
.group-art.reading { background: #efeaff; color: var(--purple); }
.group-grid b, .group-grid small, .group-grid em { display: block; margin-right: 8px; margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.group-grid b { margin-top: 8px; font-size: 11px; }
.group-grid small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.group-grid em { width: fit-content; margin-top: 7px; padding: 4px 9px; border-radius: 5px; background: var(--blue); color: #fff; font-size: 8px; font-weight: 700; }

.joined-list, .menu-group { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.joined-list > button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.joined-list > button:last-child { border-bottom: 0; }
.joined-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 8px; }
.joined-icon.blue { background: var(--blue-soft); color: var(--blue); }
.joined-icon.orange { background: #fff3df; color: #e89105; }
.joined-list b, .joined-list small { display: block; }
.joined-list b { font-size: 12px; }
.joined-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.people-row { grid-auto-columns: 104px; }
.people-row button { display: flex; height: 142px; flex-direction: column; align-items: center; justify-content: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.person-avatar { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 800; }
.person-avatar.blue { background: var(--blue-soft); color: var(--blue); }
.person-avatar.orange { background: #fff1da; color: #df8900; }
.person-avatar.purple { background: #eeeaff; color: var(--purple); }
.people-row b { margin-top: 8px; font-size: 11px; }
.people-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.people-row em { margin-top: 7px; padding: 4px 10px; border-radius: 5px; background: var(--blue); color: #fff; font-size: 8px; font-style: normal; }

.message-filter { margin-bottom: 8px; }
.message-list > button { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 13px 2px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.message-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; font-size: 20px; }
.message-icon.blue { background: var(--blue-soft); color: var(--blue); }
.message-icon.orange { background: #fff3df; color: #e89105; }
.message-icon.purple { background: #efecff; color: var(--purple); }
.message-avatar.green { background: #e8f8f1; color: var(--green); }
.message-list strong, .message-list small { display: block; }
.message-list strong { font-size: 13px; }
.message-list small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.message-list time { align-self: start; margin-top: 3px; color: #a1a9b6; font-size: 8px; }
.unread { position: absolute; top: 45px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.profile-inner { padding-top: max(22px, env(safe-area-inset-top)); }
.profile-heading { margin-bottom: 18px; }
.profile-avatar { display: grid; width: 57px; height: 57px; flex: 0 0 57px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #2e7eff, #8466f6); color: #fff; box-shadow: 0 9px 22px rgba(46,126,255,0.2); }
.profile-avatar span { font-size: 20px; font-weight: 800; }
.profile-heading > span { flex: 1; }
.profile-heading small { color: var(--muted); font-size: 9px; }
.profile-heading h1 { margin: 4px 0; font-size: 22px; }
.profile-heading em { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-size: 8px; font-style: normal; }
.profile-heading em i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

.owner-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 130px; padding: 17px; border-radius: var(--radius-large); background: linear-gradient(130deg, #1f3354, #315b87 55%, #1f806f); color: #fff; text-align: left; box-shadow: 0 12px 28px rgba(32, 56, 85, 0.18); }
.owner-card small, .owner-card strong, .owner-card em { display: block; font-style: normal; }
.owner-card small { color: #b8cce3; font-size: 9px; }
.owner-card strong { margin-top: 7px; font-size: 15px; }
.owner-card em { margin-top: 8px; color: #d4e0eb; font-size: 9px; }
.owner-card-code { display: grid; width: 70px; height: 74px; flex: 0 0 70px; place-items: center; border: 1px solid rgba(255,255,255,0.2); border-radius: 7px; background: rgba(255,255,255,0.11); font-size: 9px; }
.owner-card-code svg { font-size: 31px; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 18px; }
.profile-stats button { padding: 8px; border-right: 1px solid var(--line); background: transparent; }
.profile-stats button:last-child { border-right: 0; }
.profile-stats strong, .profile-stats small { display: block; }
.profile-stats strong { font-size: 16px; }
.profile-stats small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.profile-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.profile-shortcuts button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; }
.shortcut-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 8px; }
.shortcut-icon.blue { background: var(--blue-soft); color: var(--blue); }
.shortcut-icon.purple { background: #eeeaff; color: var(--purple); }
.profile-shortcuts b, .profile-shortcuts small { display: block; }
.profile-shortcuts b { font-size: 11px; }
.profile-shortcuts small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.profile-shortcuts > button > svg { color: #aeb5c0; font-size: 13px; }

.menu-group { margin-top: 11px; }
.menu-group > button { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 15px; align-items: center; gap: 9px; width: 100%; min-height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.menu-group > button:last-child { border-bottom: 0; }
.menu-group > button > svg:first-child { color: #5b6678; font-size: 18px; }
.menu-group > button > svg:last-child { color: #b2b9c4; font-size: 14px; }
.menu-group span { font-size: 12px; }
.menu-group small { color: var(--muted); font-size: 9px; }
.property-signature { margin: 22px 0 2px; color: var(--muted); font-size: 9px; text-align: center; }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 430px;
  height: calc(67px + env(safe-area-inset-bottom));
  margin: 0 auto;
  padding: 4px 7px env(safe-area-inset-bottom);
  border-top: 1px solid rgba(224,228,236,0.95);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(18px);
  box-shadow: 0 -8px 25px rgba(36,53,82,0.06);
}

.bottom-nav > button { position: relative; display: flex; height: 62px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: transparent; color: #9aa1ad; font-size: 20px; }
.bottom-nav > button > span { font-size: 9px; }
.bottom-nav > button.is-active { color: var(--blue); }
.owner-code-nav { color: var(--ink) !important; }
.owner-code-nav > span { display: grid; width: 43px; height: 43px; place-items: center; border: 4px solid var(--canvas); border-radius: 50%; background: linear-gradient(145deg, #2e7eff, #755af4); color: #fff; transform: translateY(-13px); box-shadow: 0 7px 17px rgba(46,126,255,0.27); font-size: 20px !important; }
.owner-code-nav > small { position: absolute; bottom: 4px; font-size: 9px; }
.nav-dot { position: absolute; top: 8px; right: 24px; width: 6px; height: 6px; border: 2px solid #fff; border-radius: 50%; background: var(--red); }

.overlay { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; background: rgba(17,25,40,0.42); opacity: 0; pointer-events: none; transition: opacity 220ms ease, visibility 220ms ease; }
.overlay.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
.bottom-sheet { width: min(100%, 430px); max-height: 91vh; overflow: hidden; border-radius: 18px 18px 0 0; background: var(--surface); transform: translateY(100%); transition: transform 240ms ease; }
.overlay.is-open .bottom-sheet { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; margin: 8px auto 4px; border-radius: 3px; background: #d7dbe3; }
.sheet-header { padding: 8px 16px 11px; border-bottom: 1px solid var(--line); }
.sheet-header small { color: var(--muted); font-size: 9px; }
.sheet-header h2 { margin: 3px 0 0; font-size: 19px; }
.sheet-content { max-height: calc(91vh - 75px); overflow-y: auto; padding: 14px 16px calc(22px + env(safe-area-inset-bottom)); }

.detail-hero { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: var(--radius); background: var(--blue-soft); }
.detail-hero > span { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border-radius: 9px; background: #fff; color: var(--blue); font-size: 22px; }
.detail-hero small, .detail-hero strong { display: block; }
.detail-hero small { color: var(--blue-deep); font-size: 9px; }
.detail-hero strong { margin-top: 4px; font-size: 15px; }
.detail-copy { margin: 14px 0; color: #4c5566; font-size: 12px; line-height: 1.75; }
.detail-points { margin: 0; padding: 0; list-style: none; }
.detail-points li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); color: #4b5361; font-size: 11px; line-height: 1.5; }
.detail-points li svg { flex: 0 0 auto; margin-top: 1px; color: var(--green); font-size: 15px; }
.primary-action { width: 100%; min-height: 46px; margin-top: 16px; border-radius: 7px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 750; box-shadow: 0 8px 20px rgba(46,126,255,0.2); }
.secondary-action { width: 100%; min-height: 42px; margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; }

.payment-total { display: flex; align-items: flex-end; justify-content: space-between; margin: 14px 0 7px; padding: 14px; border-radius: var(--radius); background: #263650; color: #fff; }
.payment-total small, .payment-total strong { display: block; }
.payment-total small { color: #b8c8d9; font-size: 9px; }
.payment-total strong { margin-top: 5px; font-size: 23px; }
.payment-total em { color: #9fd8c4; font-size: 9px; font-style: normal; }
.bill-list > label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bill-list input { width: 16px; height: 16px; accent-color: var(--blue); }
.bill-list b, .bill-list small { display: block; }
.bill-list b { font-size: 12px; }
.bill-list small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.bill-list strong { font-size: 12px; }

.delivery-visual { position: relative; height: 207px; overflow: hidden; border-radius: var(--radius); }
.delivery-visual img { width: 100%; height: 100%; object-fit: cover; }
.camera-label { position: absolute; top: 9px; left: 9px; padding: 5px 7px; border-radius: 5px; background: rgba(21,28,40,0.76); color: #fff; font-size: 8px; }
.robot-route { position: relative; height: 142px; margin-top: 11px; overflow: hidden; border-radius: var(--radius); background: #eef4fd; }
.robot-route::before, .robot-route::after { content: ""; position: absolute; width: 200px; height: 55px; border: 9px solid #fff; border-radius: 50%; transform: rotate(-16deg); }
.robot-route::before { top: 38px; left: -13px; }
.robot-route::after { right: -28px; bottom: 5px; }
.route-line { position: absolute; z-index: 2; top: 76px; left: 42px; width: 250px; border-top: 3px dashed var(--blue); transform: rotate(-6deg); }
.route-gate, .route-home, .route-robot { position: absolute; z-index: 3; display: grid; place-items: center; border-radius: 50%; }
.route-gate { top: 77px; left: 24px; width: 28px; height: 28px; background: #fff; color: var(--orange); }
.route-home { top: 36px; right: 27px; width: 31px; height: 31px; background: #fff; color: var(--green); }
.route-robot { top: 55px; left: 185px; width: 36px; height: 36px; background: var(--blue); color: #fff; box-shadow: 0 0 0 7px rgba(46,126,255,0.15); animation: robot-pulse 1.8s ease infinite; }
@keyframes robot-pulse { 50% { box-shadow: 0 0 0 11px rgba(46,126,255,0.06); } }
.route-meta { position: absolute; z-index: 4; right: 12px; bottom: 9px; color: #566274; font-size: 8px; }

.timeline { margin-top: 11px; }
.timeline > div { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; padding: 8px 0; }
.timeline > div::before { content: ""; position: absolute; top: 23px; bottom: -8px; left: 8px; width: 1px; background: #dfe4ec; }
.timeline > div:last-child::before { display: none; }
.timeline i { position: relative; z-index: 2; width: 17px; height: 17px; border: 5px solid #dfe5ef; border-radius: 50%; background: #fff; }
.timeline .done i { border-color: var(--blue); }
.timeline .current i { border-color: var(--green); box-shadow: 0 0 0 4px rgba(39,184,131,0.12); }
.timeline b, .timeline small { display: block; }
.timeline b { font-size: 11px; }
.timeline small, .timeline time { margin-top: 3px; color: var(--muted); font-size: 8px; }

.alarm-box { padding: 14px; border: 1px solid #ffccd1; border-radius: var(--radius); background: #fff5f6; color: #ab3340; }
.alarm-box strong { display: block; font-size: 14px; }
.alarm-box p { margin: 7px 0 0; font-size: 10px; line-height: 1.6; }
.alarm-button { background: var(--red); box-shadow: 0 8px 20px rgba(255,101,114,0.22); }

.device-visual { position: relative; height: 190px; overflow: hidden; border-radius: var(--radius); }
.device-visual img { width: 100%; height: 100%; object-fit: cover; }
.device-slider { margin-top: 14px; }
.device-slider label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; }
.device-slider input { width: 100%; accent-color: var(--blue); }
.toggle-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 11px; }

.owner-code-panel { padding: 4px 0 2px; text-align: center; }
.owner-code-panel > small { color: var(--muted); font-size: 9px; }
.owner-code-panel h3 { margin: 5px 0 3px; font-size: 18px; }
.owner-code-panel > p { margin: 0; color: var(--muted); font-size: 9px; }
.qr-stage { position: relative; display: grid; width: 212px; height: 212px; margin: 17px auto 13px; place-items: center; border: 10px solid #f3f6fb; border-radius: 12px; background: #fff; box-shadow: 0 12px 28px rgba(36,53,82,0.1); }
.qr-grid { display: grid; grid-template-columns: repeat(21, 7px); grid-template-rows: repeat(21, 7px); }
.qr-grid span { width: 7px; height: 7px; background: #1a2941; }
.qr-logo { position: absolute; display: grid; width: 40px; height: 40px; place-items: center; border: 5px solid #fff; border-radius: 10px; background: var(--blue); color: #fff; }
.owner-code-refresh { color: var(--green); font-size: 9px; }
.benefit-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.benefit-list div { padding: 11px 6px; border-radius: 7px; background: #f5f7fb; }
.benefit-list b, .benefit-list small { display: block; }
.benefit-list b { font-size: 13px; }
.benefit-list small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.toast { position: fixed; z-index: 200; right: 50%; bottom: calc(82px + env(safe-area-inset-bottom)); width: max-content; max-width: min(330px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 7px; background: rgba(21, 29, 42, 0.92); color: #fff; font-size: 11px; line-height: 1.45; text-align: center; opacity: 0; transform: translate(50%, 8px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(50%, 0); }

body.is-locked { overflow: hidden; }

body.sleep-mode { --ink: #f4f5fa; --muted: #9ca5b8; --line: #30384a; --surface: #202636; --canvas: #151a26; --blue-soft: #263857; color-scheme: dark; background: #10141d; }
body.sleep-mode .app-shell { background: var(--canvas); }
body.sleep-mode .community-hero { filter: brightness(0.62) saturate(0.72); }
body.sleep-mode .community-hero::after { background: linear-gradient(90deg, rgba(21,26,38,0.96) 2%, rgba(21,26,38,0.7) 43%, rgba(21,26,38,0.08) 78%); }
body.sleep-mode .weather-pill,
body.sleep-mode .icon-button,
body.sleep-mode .sheet-header > button,
body.sleep-mode .bottom-nav { background: rgba(31,37,52,0.96); color: #dbe1ed; }
body.sleep-mode .scene-card:not(.sleep) { background: #202636; color: #f1f3f8; }
body.sleep-mode .facility-panel { background: linear-gradient(120deg, #252b3b, #303653); }
body.sleep-mode .owner-code-nav > span { border-color: var(--canvas); }
body.sleep-mode .post-card p,
body.sleep-mode .detail-copy,
body.sleep-mode .detail-points li { color: #c5ccda; }
body.sleep-mode .group-grid em,
body.sleep-mode .people-row em { color: #fff; }

@media (min-width: 560px) {
  body { padding: 20px 0; }
  .app-shell { min-height: calc(100vh - 40px); border-radius: 14px; }
  .bottom-nav { bottom: 20px; border-radius: 0 0 14px 14px; }
  .overlay { align-items: center; }
  .bottom-sheet { max-height: min(760px, calc(100vh - 40px)); border-radius: 18px; }
  .sheet-content { max-height: min(680px, calc(100vh - 115px)); }
}

@media (max-width: 359px) {
  .screen-inner { padding-right: 12px; padding-left: 12px; }
  .community-hero { height: 184px; }
  .hero-copy { width: 62%; }
  .hero-copy h2 { font-size: 20px; }
  .service-grid { gap: 6px; }
  .service-grid > button { min-height: 92px; }
  .topic-feature-grid { gap: 5px; }
  .profile-shortcuts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
