.feature-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 22px;
  min-width: 0;
}
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.settings-grid .setting-card { margin:0; display:flex; flex-direction:column; align-items:flex-start; }
.setting-card h2 { font-size:20px; margin-bottom:12px; }
.setting-card > .secondary { margin-top:auto; }
.section-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.section-heading h2 { margin:0; }
.family-dialog.settings-dialog { max-width:580px; }
.settings-dialog h2 { padding-right:26px; }
.settings-dialog label { display:block; margin:16px 0; font-size:13px; font-weight:600; }
.settings-dialog input:not([type=checkbox]), .settings-dialog select, .settings-dialog textarea { display:block; width:100%; max-width:100%; margin-top:7px; padding:11px; border:1px solid #cbd6c8; border-radius:8px; background:white; color:var(--green); font:inherit; }
.settings-dialog textarea { resize:vertical; line-height:1.5; }
.settings-dialog .check { display:flex; align-items:center; gap:12px; font-weight:400; }
.settings-dialog .check input { width:19px; height:19px; margin:0; flex-shrink:0; }
.settings-dialog fieldset { min-width:0; }
.settings-dialog details { border-top:1px solid var(--line); margin:20px 0; padding-top:16px; }
.settings-dialog summary { font-size:13px; cursor:pointer; font-weight:600; }
.settings-dialog details[open] > summary { margin-bottom:16px; }
.settings-dialog .duration-field { border-top:1px solid var(--line); margin:24px 0; padding-top:14px; }
.duration-values { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.settings-dialog .time-fields { flex-wrap:wrap; gap:12px; }
.settings-dialog .time-fields label { min-width:110px; }
.settings-dialog .days { flex-wrap:wrap; }
.settings-dialog .days label { margin:0; }
.settings-dialog .schedule-window,.budget-editor { padding:16px; background:var(--soft); border-radius:10px; margin:16px 0; }
.settings-dialog .schedule-window legend { padding-top:8px; }
.settings-dialog .group-options .check { padding:9px 12px; margin:0; min-height:44px; }
.settings-dialog .group-options .check[hidden],.duration-values[hidden] { display:none; }
.editor-footer { display:flex; align-items:center; flex-wrap:wrap; gap:16px; border-top:1px solid var(--line); padding-top:20px; margin-top:24px; }
.settings-dialog [data-editor-error]:empty { display:none; }
.settings-dialog [data-editor-error] { margin-bottom:0; }
.discard-prompt { border-top:1px solid var(--line); padding-top:20px; margin-top:20px; }
.troubleshooting > summary { cursor:pointer; font-weight:600; }
.troubleshooting[open] > summary { margin-bottom:20px; }
.account-group { border-top:1px solid var(--line); padding:20px 0; }
.account-group > summary { cursor:pointer; font-size:15px; font-weight:600; }
.account-group > summary small { display:block; margin:6px 0 0 18px; color:var(--muted); font-size:12px; font-weight:400; }
.account-group[open] > summary { margin-bottom:20px; }
.settings-link { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; padding:14px 0; border:0; border-bottom:1px solid var(--line); background:none; color:var(--green); text-align:left; }
.device-actions { display:flex; flex-wrap:wrap; gap:10px; }
@media(max-width:600px) {
  .settings-grid { grid-template-columns:1fr; }
  .settings-dialog { padding:24px; }
  .settings-dialog .schedule-window,.budget-editor { padding:12px; }
}
.draft-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 20px; margin-bottom:20px; padding:12px 16px; border:1px solid #d8c69e; border-radius:10px; background:#fff9ec; font-size:13px; }
.draft-bar[hidden], .group-options .check[hidden] { display:none; }
.group-apps { grid-column:1/-1; min-width:0; border:0; padding:0; margin:14px 0; }
.group-apps legend { font-size:13px; font-weight:600; }
.group-options { max-height:240px; overflow:auto; border:1px solid var(--line); border-radius:8px; background:white; }
.feature-card .group-options .check { margin:0; padding:10px 12px; min-height:44px; border-bottom:1px solid var(--line); font-weight:400; }
.feature-card .group-options .check:last-child { border-bottom:0; }
.feature-card .coverage-note { margin:12px 0; padding:0; border:0; font-size:13px; }
.place-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; grid-column:1/-1; }
.feature-card .place-coordinates { grid-column:1/-1; margin:0; padding-top:12px; font-size:12px; }
.place-pin span { display:block; width:24px; height:24px; border-radius:50%; background:#b77c34; border:3px solid white; box-shadow:0 1px 6px #0005; }
.selected-place { outline:2px solid #b77c34; outline-offset:2px; }
.feature-card h2 {
  font-size: 24px;
}
.feature-card > p {
  max-width: 800px;
}
.feature-card h3 {
  margin-top: 22px;
}
.feature-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0;
  color: var(--green);
}
.feature-card input:not([type="checkbox"]),
.feature-card select,
.feature-card textarea,
.family-picker select {
  display: block;
  width: 100%;
  border: 1px solid #cbd6c8;
  border-radius: 8px;
  padding: 11px;
  margin-top: 7px;
  background: #fff;
  color: var(--green);
  font: inherit;
  max-width: 100%;
}
.feature-card textarea {
  resize: vertical;
  line-height: 1.5;
}
.feature-card .check {
  display: flex;
  gap: 12px;
  align-items: center;
  line-height: 1.5;
  color: #243c34;
}
.check input,
.limit-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.feature-card details {
  margin: 24px 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.feature-card summary {
  cursor: pointer;
  font-weight: 600;
}
.limit-head,
.limit-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) 115px 100px 70px;
  gap: 20px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.limit-head {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}
.limit-row span {
  overflow-wrap: anywhere;
}
.feature-card .limit-row input {
  margin: 0;
}
.feature-card .limit-row label {
  margin: 0;
}
.limit-label {
  display: none;
}
.group-row {
  background: var(--soft);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.group-row label:nth-child(3) {
  grid-column: 1/-1;
}
.place-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
  background: var(--soft);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.place-row button {
  justify-self: start;
}
.save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  background: #f0f4eaf5;
  backdrop-filter: blur(10px);
  border: 1px solid #cbd6c8;
  border-radius: 12px;
  box-shadow: 0 6px 30px #163d2017;
}
.save-bar span {
  font-size: 13px;
}
.family-picker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  max-width: 320px;
  margin-bottom: 24px;
}
.family-picker select {
  font-size: 15px;
}
.alert-row {
  display: flex;
  text-align: left;
  align-items: center;
  gap: 20px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 22px 0;
  width: 100%;
  color: inherit;
}
.alert-row > span:nth-child(2) {
  flex: 1;
}
.alert-row strong {
  font-weight: 550;
  line-height: 1.55;
  display: block;
}
.alert-row small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}
.alert-row:hover {
  background: var(--soft);
}
.alerts-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.feature-card .alert-filter-label { margin: 0; width: 200px; max-width: 100%; }
.alert-context { margin: 20px 0 0; }
.family-dialog.notification-settings { max-width: 560px; }
.notification-settings h2 { padding-right: 16px; }
.notification-channel { border-top: 1px solid var(--line); padding: 22px 0; }
.notification-channel h3 { margin: 0 0 14px; font-size: 16px; }
.notification-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.notification-settings .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.notification-settings .check input { margin: 0; }
.notification-settings details { margin: 20px 0; }
.notification-settings summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.notification-settings details[open] summary { margin-bottom: 20px; }
.notification-settings .severity-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.notification-settings .severity-options label { margin: 6px 0; }
.notification-settings .time-fields { flex-wrap: wrap; }
.notification-settings .time-fields label { min-width: 120px; }
.notification-settings [role=status]:empty { display: none; }
.notification-settings [role=status] { margin: 12px 0 0; }
.notification-test { border-top: 1px solid var(--line); padding-top: 22px; }
.notification-test > p { margin: 12px 0 0; }
.notification-settings .notification-details { margin-bottom: 0; }
.family-dialog {
  max-width: 740px;
  width: calc(100% - 32px);
}
.evidence {
  background: var(--soft);
  padding: 20px;
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.evidence blockquote {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
}
.evidence pre {
  white-space: pre-wrap;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.usage-bars {
  margin: 24px 0;
}
.usage-bars > div {
  display: grid;
  grid-template-columns: 100px 1fr 90px;
  gap: 15px;
  align-items: center;
  margin: 16px 0;
  font-size: 13px;
}
.usage-bars meter {
  width: 100%;
  height: 18px;
  accent-color: var(--green);
}
.usage-bars strong {
  text-align: right;
}
.family-map {
  height: 360px;
  border-radius: 12px;
  background: #edf2e7;
  overflow: hidden;
  margin: 20px 0;
}
.map-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.map-placeholder p {
  max-width: 440px;
}
.notification-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.notification-grid > div {
  min-width: 0;
}
.notification-grid p {
  overflow-wrap: anywhere;
}
.feature-card .activity-row {
  gap: 24px;
  align-items: flex-start;
  overflow-wrap: anywhere;
}
.feature-card .activity-row time {
  flex-shrink: 0;
  font-size: 12px;
}
.sidebar {
  overflow-y: auto;
}
.sidebar-note {
  margin-top: 28px;
}
@media (max-width: 900px) {
  .notification-grid {
    grid-template-columns: 1fr;
  }
  .place-row {
    grid-template-columns: 1fr 1fr;
  }
  .alert-row {
    gap: 12px;
  }
  .alert-row .status {
    max-width: 100px;
    white-space: normal;
  }
}
@media (max-width: 600px) {
  .feature-card {
    padding: 20px;
  }
  .feature-card h2 {
    font-size: 22px;
  }
  .form-columns,
  .check-grid,
  .group-row {
    grid-template-columns: 1fr;
  }
  .group-row label:nth-child(3) {
    grid-column: auto;
  }
  .limit-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
  }
  .limit-head {
    display: none;
  }
  .limit-row > span {
    grid-column: 1 / -1;
    font-weight: 600;
  }
  .limit-row .limit-label {
    display: block;
    min-height: 32px;
    font-size: 11px;
    margin-bottom: 8px;
  }
  .save-bar {
    bottom: 8px;
    padding: 14px;
  }
  .save-bar span {
    display: none;
  }
  .save-bar button {
    width: 100%;
  }
  .usage-bars > div {
    grid-template-columns: 83px 1fr 64px;
    gap: 8px;
  }
  .alert-row {
    flex-wrap: wrap;
  }
  .alert-row > span:nth-child(2) {
    min-width: 65%;
  }
  .feature-card .activity-row {
    flex-direction: column;
    gap: 6px;
  }
  .family-map {
    height: 310px;
  }
  .place-row {
    gap: 10px;
  }
  .place-row label:first-child {
    grid-column: 1/-1;
  }
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.media-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-width: 0;
  background: var(--paper, #f5f4ee);
  border: 1px solid #e3e7df;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  color: inherit;
}
.media-card img,
.media-placeholder {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #e7ece5;
}
.media-placeholder {
  display: grid;
  place-items: center;
  font-size: 40px;
  color: #527260;
}
.media-card > span:not(.media-placeholder),
.media-card small {
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-card small {
  padding-top: 0;
  color: #68796d;
  font-weight: 400;
}
.media-preview {
  display: block;
  max-height: 65vh;
  max-width: 100%;
  margin: 16px auto;
  border-radius: 12px;
}
.health-checklist {
  margin: 16px 0;
  border-top: 1px solid #e3e7df;
  padding: 16px 0;
}
.health-checklist summary {
  cursor: pointer;
  font-weight: 600;
}
.health-checklist li {
  margin: 10px 0;
  line-height: 1.5;
}
.account-password input[type="checkbox"] {
  width: auto;
  min-height: auto;
}
.account-password .check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-weight: 400;
}
.account-password .check input {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
}
#email-preferences-form fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0;
}
#email-preferences-form legend {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.consent-check {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px;
  font-size: 12px !important;
  line-height: 1.6;
}
.consent-check input {
  width: 16px !important;
  height: 16px;
  margin: 4px 0 0;
  flex: none;
}
.consent-check a,
.policy-notice a {
  color: #246954;
}
.policy-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.policy-notice label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.policy-notice input {
  width: 16px;
}
.policy-notice button {
  margin-left: auto;
}
.auth-qr {
  display: block;
  margin: 16px auto;
  max-width: 100%;
  height: auto;
}
.security-content > button {
  margin: 8px 8px 0 0;
}
.security-content details {
  margin: 12px 0;
}
.recovery-codes {
  font-size: 13px;
  background: #f5f4ee;
  padding: 16px;
  border-radius: 12px;
  overflow: auto;
  line-height: 1.8;
  user-select: all;
}
.identity-dialog {
  max-width: 460px;
}
.admin-dialog {
  max-width: 650px;
}
.admin-dialog textarea,
.admin-dialog select {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid #d4ddd5;
  border-radius: 10px;
}
.admin-dialog label {
  display: block;
  margin-top: 16px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #e3e8e0;
  padding: 16px 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.report-row small {
  display: block;
  color: #657269;
  font-size: 12px;
}
.report-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f4ee;
  border-radius: 12px;
  padding: 16px;
}
.support-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; margin: 18px 0; }
.support-images figure { margin: 0; min-width: 0; }
.support-images a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f5f4ee; }
.support-images img { display: block; width: 100%; height: 170px; object-fit: contain; }
.support-images figcaption { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; margin-top: 6px; }
.removal-list {
  margin-top: 20px;
  border-top: 1px solid #dce1d8;
  padding: 18px 0;
  color: #657269;
  font-size: 13px;
}
.removal-list summary {
  cursor: pointer;
}
.removal-list p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.help-nav {
  text-decoration: none;
}
.factor-field {
  margin-top: 14px;
}
.identity-dialog .error {
  margin-bottom: 0;
}
@media (max-width: 550px) {
  .policy-notice {
    display: block;
  }
  .policy-notice label {
    margin: 12px 0;
  }
  .identity-dialog,
  .admin-dialog {
    max-width: calc(100vw - 28px);
  }
  .site-links {
    gap: 12px;
    font-size: 11px;
  }
}

[hidden] {
  display: none !important;
}

#account-dialog > .close,
.admin-dialog > .close {
  position: sticky;
  float: right;
  top: 0;
  right: 0;
  z-index: 2;
  background: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
}

.billing-content { padding: 4px 0 16px; }
.billing-price { display:flex; align-items:baseline; gap:8px; margin-top:12px; }
.billing-price strong { font-size:32px; letter-spacing:-1px; }
.billing-price span { color:var(--muted); }
.billing-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:18px 0 10px; }
.billing-notice { display:flex; flex-wrap:wrap; gap:8px 18px; align-items:center; justify-content:space-between; }
