/* Avoid double-tap zoom while keeping scrolling and pinch zoom available. */
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --surface-soft: #f5f7f8;
  --ink: #202a36;
  --muted: #727e8c;
  --line: #e9edf1;
  --green: #167964;
  --green-soft: #eaf5ef;
  --green-line: #d0e7da;
  --orange: #aa6a31;
  --orange-soft: #fff4e8;
  --blue: #5879a3;
  --blue-soft: #edf2f9;
  --shadow: 0 20px 80px #14283916;
  --radius: 16px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13191d;
  --surface: #1a2228;
  --surface-soft: #202a31;
  --ink: #e5ecee;
  --muted: #a0adb6;
  --line: #2c3840;
  --green: #87d5bc;
  --green-soft: #203b33;
  --green-line: #325047;
  --orange: #e3b17e;
  --orange-soft: #3a3025;
  --blue: #a1bedf;
  --blue-soft: #253343;
  --shadow: 0 20px 80px #0005;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
:where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--green);
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
button svg,
a svg {
  pointer-events: none;
}
svg.icon {
  width: 19px;
  height: 19px;
  flex: none;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button {
  border: 0;
  background: none;
}
a,
button {
  touch-action: manipulation;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 99;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
.app-shell {
  max-width: 1600px;
  margin: auto;
  min-height: 100vh;
}
.sidebar {
  width: 228px;
  position: fixed;
  top: 0;
  bottom: 0;
  padding: 35px 22px 24px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.brand-mark {
  position: relative;
  width: 37px;
  height: 37px;
  background: var(--green);
  border-radius: 11px;
  display: block;
  flex: none;
}
.brand-mark span { position: absolute; border: 1.7px solid var(--surface); height: 14px; width: 19px; border-radius: 3px; left: 7px; top: 8px; opacity: 0.7; }
.brand-mark span + span { left: 12px; top: 14px; opacity: 1; background: var(--green); }
.brand-name { letter-spacing: 1px; }
.brand-cn {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
}
.sidebar-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 23px 0 29px 9px;
}
.desktop-nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 9px;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-link:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.nav-link[aria-current="page"] {
  color: var(--green);
  background: var(--green-soft);
}
.nav-link .nav-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 35px 7px 0;
}
.prototype-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--green);
}
.prototype-badge span {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
.sidebar-bottom p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 11px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.theme-switch {
  margin-top: 19px;
}
.sidebar-copyright {
  font-size: 10px;
  color: var(--muted);
  margin-top: 32px;
}
.app-body {
  margin-left: 228px;
}
.topbar {
  height: 79px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  background: var(--surface);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.preview-tag {
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  width: 32px;
  height: 32px;
  font-size: 13px;
  font-weight: 600;
}
.avatar .icon {display:block;width:24px;height:24px;}
.profile-icon-head {fill:currentColor;stroke:none;}
.profile-icon-body {fill:currentColor;fill-opacity:.65;stroke:none;}
.topbar-actions .avatar {width:36px;height:36px;padding:0;}
.topbar-actions .avatar:hover {background:var(--green-line);}
.topbar-actions .avatar:focus-visible {outline:2px solid var(--green);outline-offset:3px;}
.mobile-brand,
.mobile-nav {
  display: none;
}
#main-content {
  padding: 35px 42px 28px;
  max-width: 1220px;
  margin: 0 auto;
  outline: none;
  min-height: calc(100vh - 155px);
}
.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.9px;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 7px;
}
.page-title-row h1 {
  font-size: 27px;
  letter-spacing: -0.8px;
  font-weight: 650;
  line-height: 1.4;
}
.page-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.date-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.date-pill svg {
  width: 15px;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 25px;
  align-items: start;
}
.content-column {
  min-width: 0;
}
.overview-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--green-line);
  background: var(--green-soft);
  border-radius: var(--radius);
  padding: 21px 5px;
  margin-bottom: 26px;
}
.overview-stat {
  padding: 0 20px;
  position: relative;
}
.overview-stat + .overview-stat:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: var(--green-line);
}
.stat-name {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 5px;
  align-items: center;
}
.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}
.stat-value span {
  font-size: 11px;
  font-weight: 400;
  margin-left: 5px;
}
.stat-hint {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}
.section-title-row h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.section-title-row .subtle {
  font-size: 11px;
}
.subtle {
  color: var(--muted);
}
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.filter-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-button {
  padding: 7px 11px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 7px;
  white-space: nowrap;
}
.filter-button[aria-pressed="true"] {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 500;
}
.filter-button:hover {
  background: var(--surface-soft);
}
.search-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 11px;
  min-width: 0;
  margin-bottom: 17px;
  color: var(--muted);
}
.search-wrap svg {
  width: 16px;
}
.search-wrap input {
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 100%;
  padding: 11px 8px;
  font-size: 12px;
  outline-offset: 0;
}
.search-wrap input:focus {
  outline: 0;
  box-shadow: none;
}
.search-wrap:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.search-shortcut {
  font-size: 10px;
  white-space: nowrap;
}
.feed-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 23px;
}
.activity-item {
  padding: 22px 0;
}
.activity-item + .activity-item {
  border-top: 1px solid var(--line);
}
.activity-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  flex-wrap: wrap;
}
.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--green);
}
.meta-divider {
  width: 2px;
  height: 2px;
  background: var(--muted);
  border-radius: 50%;
}
.badge {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--green);
  background: var(--green-soft);
}
.badge.orange {
  color: var(--orange);
  background: var(--orange-soft);
}
.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}
.activity-title {
  display: block;
  text-align: left;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: -0.3px;
  padding: 0;
  margin: 10px 0 7px;
}
.activity-title:hover {
  color: var(--green);
}
.activity-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.activity-insight {
  font-size: 11px;
  background: var(--surface-soft);
  padding: 9px 11px;
  border-radius: 6px;
  margin-top: 11px;
  color: var(--muted);
}
.activity-insight strong {
  color: var(--ink);
  font-weight: 500;
  margin-right: 6px;
}
.activity-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 14px;
}
.activity-dates {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.activity-dates svg {
  width: 12px;
  height: 12px;
}
.save-button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  padding: 5px 0 5px 10px;
  white-space: nowrap;
}
.save-button svg {
  width: 14px;
  height: 14px;
}
.save-button[aria-pressed="true"] {
  color: var(--green);
}
.save-button[aria-pressed="true"] svg {
  fill: var(--green-soft);
}
.feed-end {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 21px 0;
}
.right-rail {
  display: grid;
  gap: 18px;
}
.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.rail-card h2 {
  font-size: 13px;
  font-weight: 600;
}
.rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 9px;
}
.rail-card-header > a,
.rail-card-header > button {
  font-size: 10px;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}
.rail-card-header svg {
  width: 12px;
  height: 12px;
}
.reminder-list {
  display: grid;
  gap: 19px;
}
.reminder-item {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.day-block {
  min-width: 36px;
  height: 41px;
  border-radius: 7px;
  background: var(--surface-soft);
  text-align: center;
  padding: 3px;
  font-size: 9px;
  color: var(--muted);
}
.day-block strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
}
.reminder-info {
  flex: 1;
  min-width: 0;
}
.reminder-info h3 {
  font-size: 12px;
  font-weight: 500;
  margin-top: 1px;
}
.reminder-info p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.reminder-info .amount {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}
.rail-note {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.rail-note svg {
  width: 12px;
  height: 12px;
  margin-top: 2px;
}
.hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.hot-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.hot-number {
  font-size: 12px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.hot-link {
  padding: 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.6;
}
.hot-link small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.calm-card {
  background: var(--green-soft);
  border-color: var(--green-line);
}
.calm-card .small-symbol {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 9px;
  color: var(--green);
  margin-bottom: 12px;
}
.calm-card h2 {
  font-size: 14px;
  margin-bottom: 6px;
}
.calm-card p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.calm-card .text-button {
  color: var(--green);
  margin-top: 13px;
  font-size: 11px;
}
.page-footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 20px 42px 28px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  color: var(--muted);
}
.primary-button,
.secondary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 500;
}
.secondary-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}
.primary-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
}
.primary-button:hover {
  filter: brightness(0.95);
}
.secondary-button:hover {
  background: var(--surface-soft);
}
.calendar-surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.calendar-toolbar {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.calendar-toolbar h2 {
  font-size: 17px;
  font-weight: 600;
}
.calendar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.calendar-controls .text-button {
  margin-right: 10px;
}
.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-week {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding-bottom: 12px;
}
.calendar-day {
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 96px;
  text-align: left;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  overflow: hidden;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day.other-month {
  background: var(--surface-soft);
  color: var(--muted);
}
.calendar-day.selected {
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px var(--green-line);
}
.calendar-day:hover {
  background: var(--surface-soft);
}
.day-number {
  font-size: 12px;
  line-height: 24px;
  min-width: 24px;
  text-align: center;
  border-radius: 50%;
  font-variant-numeric: tabular-nums;
}
.is-today .day-number {
  color: var(--surface);
  background: var(--green);
}
.calendar-event-label {
  font-size: 9px;
  line-height: 1.5;
  padding: 3px 5px;
  border-radius: 4px;
  color: var(--green);
  background: var(--green-soft);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event-label.bill {
  color: var(--orange);
  background: var(--orange-soft);
}
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
}
.legend-dot.orange {
  background: var(--orange);
}
.selected-events {
  margin-top: 21px;
}
.selected-events h2 {
  font-size: 14px;
  margin-bottom: 13px;
}
.event-row {
  display: flex;
  gap: 13px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px;
  margin-top: 9px;
}
.event-icon {
  width: 35px;
  height: 35px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  flex: none;
}
.event-icon.orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.event-text {
  flex: 1;
  min-width: 0;
}
.event-text h3 {
  font-size: 12px;
  font-weight: 500;
}
.event-text p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.calendar-count {
  font-size: 11px;
  color: var(--muted);
}
.bills-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.bills-summary-label {
  font-size: 11px;
  color: var(--muted);
}
.bills-summary-amount {
  font-size: 35px;
  letter-spacing: -1px;
  font-weight: 600;
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}
.bills-summary-amount small {
  font-size: 20px;
  margin-right: 5px;
}
.bills-summary-note {
  font-size: 10px;
  color: var(--muted);
}
.bills-summary-side {
  text-align: right;
  color: var(--green);
  font-size: 12px;
}
.bills-summary-side small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.bill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.bill-card {
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bill-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bank-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
}
.bill-card h2 {
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.bill-card small {
  font-size: 10px;
  color: var(--muted);
}
.bill-card-top .icon-button {
  margin-left: auto;
  flex: none;
}
.bill-amount {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.7px;
  margin: 19px 0 13px;
  font-variant-numeric: tabular-nums;
}
.bill-amount .badge {
  margin-left: 9px;
  vertical-align: middle;
  font-weight: 400;
  letter-spacing: 0;
}
.bill-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bill-details dt {
  color: var(--muted);
  font-size: 10px;
}
.bill-details dd {
  font-size: 12px;
  margin: 4px 0 0;
}
.bill-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 17px;
  gap: 8px;
}
.bill-actions .text-button {
  font-size: 11px;
}
.bill-actions .secondary-button {
  padding: 6px 10px;
  font-size: 11px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 14px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.notice svg {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 25px;
  margin-bottom: 23px;
}
.profile-card .avatar {
  width: 51px;
  height: 51px;
  font-size: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-card h2 {
  font-size: 16px;
  font-weight: 600;
}
.profile-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.profile-card .badge {
  margin-left: auto;
  white-space: nowrap;
}
.settings-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px;
  margin-bottom: 22px;
}
.settings-row {
  width: 100%;
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.settings-row[hidden] { display: none; }
.settings-row + .settings-row {
  border-top: 1px solid var(--line);
}
.settings-row > svg {
  color: var(--muted);
}
.settings-text {
  flex: 1;
}
.settings-text strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.settings-text small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.settings-row > span:last-child {
  font-size: 11px;
  color: var(--muted);
}
.empty-state {
  text-align: center;
  padding: 40px 15px;
}
.empty-state .icon {
  width: 28px;
  height: 28px;
  color: var(--muted);
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 14px;
  font-weight: 500;
}
.empty-state p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 18px;
}
.empty-state .text-button {
  color: var(--green);
}
dialog {
  width: min(500px, calc(100% - 30px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #101f2b66;
  backdrop-filter: blur(4px);
}
.dialog-content {
  padding: 27px;
}
.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dialog-header h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
}
.dialog-header .eyebrow {
  margin-bottom: 5px;
}
.dialog-header .icon-button {
  flex: none;
  margin: -5px -7px 0 0;
}
.dialog-description {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.detail-list {
  margin: 20px 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  font-size: 12px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.form-fields {
  display: grid;
  gap: 15px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  min-width: 0;
}
/* Direct fields need spacing too: account and submission forms have no grid wrapper. */
form > .form-field {
  margin-bottom: 14px;
}
.form-field input,
.form-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.form-help {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.form-error {
  font-size: 12px;
  color: var(--orange);
  min-height: 18px;
}
.danger-button {
  color: #ae4c4c;
  margin-right: auto;
  padding: 8px 0;
  font-size: 12px;
}
.channel-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.channel-row > svg {
  color: var(--green);
  margin-top: 3px;
}
.channel-row h3 {
  font-size: 13px;
  font-weight: 500;
}
.channel-row p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.channel-row .badge {
  margin-left: auto;
  white-space: nowrap;
}
#toast {
  position: fixed;
  inset: auto;
  margin: 0;
  border: 0;
  width: max-content;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 20px;
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 100;
  max-width: calc(100% - 32px);
  text-align: center;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.noscript-note {
  padding: 20px;
}
@media (min-width: 1600px) {
  .sidebar {
    left: calc((100vw - 1600px) / 2);
  }
}
@media (max-width: 1190px) {
  .sidebar {
    width: 196px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .app-body {
    margin-left: 196px;
  }
  .topbar {
    padding: 0 28px;
  }
  #main-content {
    padding: 30px 28px 20px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 19px;
  }
  .rail-card {
    padding: 17px;
  }
  .page-footer {
    padding-left: 28px;
    padding-right: 28px;
  }
  .overview-stat {
    padding: 0 14px;
  }
  .activity-title {
    font-size: 16px;
  }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .sidebar {
    width: 176px;
  }
  .app-body {
    margin-left: 176px;
  }
  .brand {
    font-size: 20px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .right-rail .calm-card {
    display: none;
  }
  .calendar-day {
    min-height: 83px;
  }
  .date-pill {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --radius: 13px;
  }
  .sidebar,
  .breadcrumb {
    display: none;
  }
  .app-body {
    margin-left: 0;
  }
  .app-shell {
    min-height: 100dvh;
  }
  .mobile-brand {
    display: flex;
    font-size: 20px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .brand-mark span { left: 5px; top: 7px; }
  .brand-mark span + span { left: 10px; top: 12px; }
  .topbar {
    height: 66px;
    padding: 0 20px;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 15;
  }
  .topbar-actions {
    gap: 10px;
  }
  .topbar-actions .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
  .topbar-actions .icon-button {
    width: 31px;
    height: 31px;
  }
  .preview-tag {
    font-size: 9px;
  }
  #main-content {
    padding: 25px 19px 16px;
    min-height: calc(100dvh - 200px);
  }
  .page-title-row {
    margin-bottom: 20px;
    gap: 10px;
  }
  .page-title-row h1 {
    font-size: 24px;
    letter-spacing: -0.7px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.5px;
  }
  .page-subtitle {
    font-size: 11px;
    margin-top: 6px;
  }
  .date-pill {
    display: none;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .right-rail {
    display: none;
  }
  .overview-strip {
    padding: 16px 1px;
    margin-bottom: 24px;
  }
  .overview-stat {
    padding: 0 13px;
  }
  .stat-name {
    font-size: 10px;
  }
  .stat-value {
    font-size: 24px;
    margin-top: 5px;
  }
  .stat-value span {
    font-size: 10px;
  }
  .stat-hint {
    font-size: 9px;
    margin-top: 3px;
  }
  .section-title-row h2 {
    font-size: 16px;
  }
  .section-title-row {
    margin-bottom: 13px;
  }
  .section-title-row .subtle {
    font-size: 10px;
  }
  .filter-button {
    font-size: 11px;
    padding: 7px 10px;
  }
  .filter-list {
    gap: 2px;
  }
  .search-wrap {
    margin-bottom: 13px;
  }
  .search-wrap input {
    font-size: 16px;
    padding: 10px 8px;
  }
  .search-shortcut {
    display: none;
  }
  .feed-list {
    padding: 0 17px;
  }
  .activity-item {
    padding: 19px 0;
  }
  .activity-meta {
    font-size: 10px;
    gap: 6px;
  }
  .activity-title {
    font-size: 16px;
    margin-top: 9px;
  }
  .activity-description {
    font-size: 12px;
    line-height: 1.85;
  }
  .activity-insight {
    font-size: 10px;
    padding: 9px 10px;
    line-height: 1.8;
  }
  .activity-bottom {
    margin-top: 11px;
  }
  .activity-dates {
    font-size: 10px;
  }
  .save-button {
    min-height: 36px;
    font-size: 11px;
  }
  .page-footer {
    padding: 10px 20px calc(91px + env(safe-area-inset-bottom));
    display: grid;
    justify-content: center;
    text-align: center;
    gap: 4px;
    font-size: 9px;
  }
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 6px 12px calc(7px + env(safe-area-inset-bottom));
    z-index: 30;
  }
  .mobile-nav .nav-link {
    flex-direction: column;
    gap: 4px;
    padding: 6px 5px;
    font-size: 12px;
    border-radius: 12px;
    min-height: 52px;
  }
  .mobile-nav .nav-link[aria-current="page"] {
    background: var(--green-soft);
  }
  .mobile-nav .nav-link svg {
    width: 21px;
    height: 21px;
  }
  .mobile-nav .nav-dot {
    display: none;
  }
  .primary-button,
  .secondary-button {
    padding: 9px 12px;
    font-size: 11px;
  }
  .calendar-toolbar {
    padding: 16px 13px;
  }
  .calendar-toolbar h2 {
    font-size: 16px;
  }
  .calendar-week {
    font-size: 10px;
    padding-bottom: 9px;
  }
  .calendar-day {
    min-height: 64px;
    padding: 6px 3px;
    gap: 3px;
    align-items: center;
  }
  .day-number {
    font-size: 12px;
    line-height: 23px;
    min-width: 23px;
  }
  .calendar-event-label {
    font-size: 10px;
    max-width: 100%;
    padding: 1px 3px;
  }
  .calendar-legend {
    font-size: 9px;
    padding: 12px;
    gap: 10px;
  }
  .selected-events h2 {
    font-size: 13px;
  }
  .event-row {
    padding: 13px;
  }
  .calendar-count {
    font-size: 10px;
  }
  .bills-summary {
    padding: 20px 17px;
  }
  .bills-summary-amount {
    font-size: 30px;
  }
  .bills-summary-label {
    font-size: 10px;
  }
  .bills-summary-side {
    font-size: 11px;
  }
  .bills-summary-side small {
    font-size: 9px;
  }
  .bill-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .bill-card {
    padding: 19px;
  }
  .bill-card h2 {
    font-size: 14px;
  }
  .bill-amount {
    font-size: 27px;
  }
  .bill-details dd {
    font-size: 13px;
  }
  .bill-actions .secondary-button {
    padding: 8px 12px;
  }
  .notice {
    font-size: 10px;
    padding: 12px;
    gap: 7px;
  }
  .profile-card {
    padding: 20px 17px;
    gap: 12px;
  }
  .profile-card .avatar {
    width: 43px;
    height: 43px;
    font-size: 18px;
  }
  .profile-card h2 {
    font-size: 15px;
  }
  .profile-card p {
    font-size: 10px;
  }
  .profile-card .badge {
    font-size: 9px;
  }
  .settings-row {
    padding: 18px 0;
  }
  .dialog-content {
    padding: 22px 20px;
  }
  .dialog-header h2 {
    font-size: 18px;
  }
  .form-field input,
  .form-field select,
  .form-field textarea {
    font-size: 16px;
  }
  .dialog-actions .primary-button,
  .dialog-actions .secondary-button {
    min-height: 43px;
  }
  #toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
    min-width: 200px;
    max-width: calc(100% - 35px);
  }
}
@media (max-width: 360px) {
  #main-content {
    padding-left: 13px;
    padding-right: 13px;
  }
  .topbar {
    padding: 0 14px;
  }
  .overview-stat {
    padding: 0 10px;
  }
  .stat-hint {
    font-size: 9px;
  }
  .filter-button {
    padding: 7px 8px;
  }
  .feed-list {
    padding: 0 14px;
  }
  .activity-title {
    font-size: 15px;
  }
  .profile-card .badge {
    display: none;
  }
  .calendar-day {
    min-height: 59px;
  }
  .calendar-event-label {
    font-size: 10px;
  }
  .page-title-row h1 {
    font-size: 22px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.month-select {
  font: inherit;
  font-size: 11px;
  max-width: 124px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 7px;
}
.feed-meta .subtle {
  font-size: 10px;
}
@media (max-width: 480px) {
  .feed-meta .subtle {
    display: none;
  }
  .month-select {
    font-size: 12px;
    max-width: 125px;
  }
}

/* Activities: separate monthly participation from the overall activity term. */
.activity-access {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}
.activity-month-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 17px 20px;
  margin-bottom: 22px;
}
.month-caption {
  font-size: 11px;
  color: var(--green);
}
.month-picker {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 4px 0 0 -8px;
}
.month-picker input {
  width: 158px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  padding: 4px;
}
.month-picker .icon-button {
  width: 30px;
  height: 34px;
}
.month-bar-caption {
  font-size: 13px;
  color: var(--green);
  text-align: right;
}
.month-bar-caption small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  color: var(--muted);
}
.long-term-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  min-height: 36px;
  cursor: pointer;
}
.long-term-filter input,
.transaction-checks input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex: none;
}
.activity-sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.activity-sortbar > div {
  display: flex;
  gap: 4px;
}
.activity-sortbar button {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.activity-sortbar button[aria-pressed="true"] {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}
.sort-explainer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 8px 0 15px;
}
.bank-activity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bank-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
}
.bank-label small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.boc-symbol {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #a31d2c0d;
  border: 1px solid #a31d2c20;
  color: #ae3042;
  font-family: serif;
  font-size: 21px;
  font-weight: 600;
}
:root[data-theme="dark"] .boc-symbol {
  color: #f197a4;
  border-color: #f197a440;
  background: #f197a410;
}
.bank-activity .activity-title {
  font-size: 23px;
  line-height: 1.5;
  margin: 21px 0 18px;
  letter-spacing: -0.5px;
}
.bank-activity .activity-title span {
  color: var(--green);
}
.reward-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  border-radius: 10px;
  background: var(--surface-soft);
  margin-bottom: 20px;
}
.reward-strip strong {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.1;
}
.reward-strip strong span {
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 6px;
}
.reward-strip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.rule-threshold {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.cycle-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cycle-summary > div {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.cycle-summary .icon {
  color: var(--green);
  width: 17px;
  height: 17px;
  margin-top: 3px;
}
.cycle-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.activity-verification {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  margin: 20px 0 0;
}
.activity-verification .icon {
  width: 13px;
  height: 13px;
}
.bank-activity .activity-bottom {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
.activity-detail-link {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  text-align: left;
  padding: 4px 0;
}
.activity-detail-link .icon {
  width: 15px;
}
.activity-page-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 20px 0;
}
.activity-steps {
  display: grid;
  gap: 23px;
  margin: 24px 0;
}
.activity-steps > div {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.activity-steps > div > span {
  color: var(--green);
  background: var(--green-soft);
  border-radius: 8px;
  padding: 5px 7px;
  font-size: 11px;
}
.activity-steps h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 7px;
}
.activity-steps p,
.activity-rail-copy {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}
.activity-rail-copy {
  margin-top: 13px;
}
.activity-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.activity-rule-box {
  padding: 16px;
  background: var(--green-soft);
  border-radius: 10px;
  margin: 18px 0;
}
.activity-rule-box strong {
  font-size: 20px;
  color: var(--green);
}
.activity-rule-box p {
  font-size: 12px;
  margin: 7px 0 0;
  color: var(--muted);
}
.participation-panel {
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.participation-panel .section-title-row {
  margin-bottom: 7px;
}
.participation-panel h2 {
  font-size: 15px;
}
.participation-panel strong {
  color: var(--green);
  font-size: 13px;
  white-space: nowrap;
}
.participation-panel p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}
.transaction-checks {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.transaction-checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.transaction-checks label:has(input:checked) {
  border-color: var(--green-line);
  background: var(--green-soft);
}
.transaction-checks label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
  font-size: 13px;
}
.transaction-checks small {
  font-size: 11px;
  color: var(--muted);
}
.activity-rule-notes {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}
.activity-rule-notes summary {
  cursor: pointer;
  color: var(--ink);
}
.activity-rule-notes ul {
  padding-left: 18px;
}
.activity-rule-notes li + li {
  margin-top: 8px;
}
@media (max-width: 760px) {
  .activity-access {
    font-size: 11px;
    margin-top: 12px;
  }
  .activity-month-bar {
    padding: 14px;
    margin-bottom: 17px;
  }
  .month-bar-caption {
    font-size: 11px;
  }
  .month-bar-caption small {
    font-size: 10px;
  }
  .feed-toolbar {
    flex-wrap: wrap;
    gap: 4px;
  }
  .long-term-filter {
    font-size: 11px;
    margin-left: auto;
  }
  .bank-activity .activity-title {
    font-size: 22px;
  }
  .reward-strip {
    padding: 14px;
    gap: 8px;
  }
  .reward-strip strong {
    font-size: 30px;
  }
  .rule-threshold {
    font-size: 11px;
  }
  .cycle-summary {
    gap: 12px;
  }
  .cycle-summary > div {
    font-size: 12px;
    gap: 6px;
  }
  .cycle-summary small {
    font-size: 10px;
  }
  .activity-sortbar {
    font-size: 11px;
  }
  .activity-sortbar button {
    font-size: 11px;
  }
  .activity-page-note {
    margin-bottom: 12px;
  }
}
@media (max-width: 360px) {
  .month-bar-caption {
    display: none;
  }
  .activity-month-bar > div:first-child {
    width: 100%;
  }
  .month-picker {
    justify-content: space-between;
  }
  .bank-activity .activity-title {
    font-size: 20px;
  }
  .reward-strip {
    flex-wrap: wrap;
  }
  .cycle-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .transaction-checks label {
    padding: 10px 7px;
    gap: 6px;
  }
  .transaction-checks label > span {
    gap: 6px;
  }
}
@media (max-width: 760px) {
  .page-title-row:has(.activity-access) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}
.contribute-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  margin-top: 20px;
  border: 1px dashed var(--green-line);
  border-radius: 12px;
  background: var(--surface);
}
.contribute-entry strong {
  font-size: 13px;
  font-weight: 500;
}
.contribute-entry small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.contribute-entry .secondary-button {
  font-size: 11px;
}
.bank-activity .activity-title {
  overflow-wrap: anywhere;
}
.activity-description {
  white-space: pre-line;
}
.cycle-summary span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.activity-detail-badges {
  justify-content: flex-end;
}
.rule-threshold {
  overflow-wrap: anywhere;
}
.reward-strip > div {
  min-width: 0;
}
.reward-strip strong {
  overflow-wrap: anywhere;
}
@media (max-width: 360px) {
  .contribute-entry {
    align-items: flex-start;
    flex-direction: column;
  }
  .bank-activity-top {
    align-items: flex-start;
  }
  .bank-activity-top .activity-detail-badges {
    max-width: 90px;
  }
}

/* Compact activity browsing, with full cards available on demand. */
.activity-item.activity-compact {
  padding: 0;
}
.activity-compact-title {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.activity-compact-title:hover {
  color: var(--green);
  background: var(--green-soft);
}
.activity-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--muted);
}
.activity-detail-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}
.activity-sortbar > .activity-list-options {
  align-items: center;
  gap: 12px;
}
.activity-month-bar {
  padding: 6px 12px;
  margin-bottom: 12px;
  gap: 8px;
  border-radius: 10px;
}
.activity-month-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
}
.month-caption {
  white-space: nowrap;
}
.activity-month-bar .month-picker {
  margin: 0;
  gap: 0;
}
.month-picker input {
  width: 140px;
  font-size: 14px;
}
.month-bar-caption {
  font-size: 11px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .activity-sortbar {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .activity-compact-title {
    padding: 12px;
  }
}
@media (max-width: 360px) {
  .activity-month-bar {
    padding: 6px 8px;
  }
  .activity-month-bar > div:first-child {
    width: 100%;
    gap: 4px;
  }
  .activity-month-bar .month-picker {
    flex: 1;
    justify-content: space-between;
  }
}

/* Flat activity toolbar: search, category tabs, and lightweight controls. */
.activity-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.activity-controls .activity-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0 16px;
  background: var(--surface);
}
.activity-search input {
  font-size: 13px;
  padding: 12px 10px;
}
.activity-search .icon {
  flex-shrink: 0;
}
.activity-controls .activity-categories {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.activity-categories .filter-button {
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 12px;
  background: transparent;
  white-space: nowrap;
}
.activity-categories .filter-button[aria-pressed="true"] {
  color: var(--green);
  font-weight: 500;
  background: var(--green-soft);
}
.activity-categories .filter-button:hover {
  background: var(--surface-soft);
}
.activity-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.activity-view-options {
  display: flex;
  align-items: center;
  gap: 16px;
}
.activity-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.activity-option:has(input:checked) {
  color: var(--green);
}
.activity-option input {
  appearance: none;
  width: 26px;
  height: 16px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  transition: background .15s;
}
.activity-option input::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .15s;
}
.activity-option input:checked {
  background: var(--green);
  border-color: var(--green);
}
.activity-option input:checked::before {
  transform: translateX(10px);
  background: var(--surface);
}
.activity-order {
  display: flex;
  align-items: center;
  gap: 12px;
}
.activity-order button {
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
}
.activity-order button + button {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.activity-order button[aria-pressed="true"] {
  color: var(--green);
  font-weight: 600;
}
.activity-results-caption {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 10px 0 8px;
  font-size: 12px;
}
.activity-results-caption > .subtle {
  white-space: nowrap;
}
.activity-results-caption .sort-explainer {
  margin: 0;
  font-size: 10px;
}
@media (max-width: 760px) {
  .activity-controls { gap: 10px; }
  .activity-controls .activity-categories { gap: 4px; }
  .activity-view-options { gap: 12px; }
  .activity-option, .activity-order button { font-size: 11px; }
  .activity-order { gap: 8px; }
  .activity-order button + button { padding-left: 8px; }
  .activity-control-row { flex-wrap: wrap; gap: 4px 12px; }
  .activity-order { margin-left: auto; }
  .activity-results-caption { flex-wrap: wrap; gap: 2px 8px; }
}


.activity-category-row {
  display: flex;
  align-items: center;
}
/* Display preferences and sorting form a single compact row. */
.activity-control-row {
  flex-wrap: nowrap;
  min-height: 38px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.activity-control-row .activity-view-options {
  gap: 16px;
  flex-shrink: 0;
}
.activity-control-row .activity-order {
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .activity-control-row {
    gap: 6px;
  }
  .activity-control-row .activity-view-options {
    gap: 8px;
  }
  .activity-control-row .activity-option {
    gap: 4px;
    font-size: 11px;
  }
  .activity-control-row .activity-order {
    gap: 6px;
  }
  .activity-control-row .activity-order button {
    font-size: 11px;
  }
  .activity-control-row .activity-order button + button {
    padding-left: 6px;
  }
}
@media (max-width: 360px) {
  .activity-control-row .activity-view-options { gap: 6px; }
  .activity-control-row .activity-option,
  .activity-control-row .activity-order button { font-size: 10px; }
  .activity-control-row .activity-option input { width: 22px; }
  .activity-control-row .activity-option input:checked::before {
    transform: translateX(6px);
  }
}


.bill-status { padding: 8px 10px; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.bill-urgent { border-color: #d99129; }
.bill-urgent .bill-status, .bill-alert.urgent { background: #fff4dc; color: #875000; }
.bill-overdue { border: 2px solid #d64747; }
.bill-overdue .bill-status, .bill-alert.overdue { background: #ffeded; color: #b32424; }
.bill-overdue .bill-amount { color: #b32424; }
.bill-paid .bill-status { color: var(--muted); background: var(--bg); }
.bill-details { flex-wrap: wrap; gap: 16px; }
.bill-details > div { min-width: 42%; }
.bill-transaction { border-top: 1px solid var(--line); padding: 14px 0; }
.bill-transaction > span { font-size: 12px; color: var(--muted); }
.bill-transaction > strong { display: block; font-size: 24px; color: var(--green); margin-top: 6px; }
.bill-transaction p { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 6px 0 0; }
.bill-alert { padding: 12px 16px; border-radius: 9px; margin: 12px 0; font-size: 13px; line-height: 1.6; }
.bill-preview { padding: 12px; background: var(--green-soft); color: var(--green); border-radius: 8px; font-size: 12px; line-height: 1.7; }

.bill-amount-label { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-bottom: 6px; }
.bill-form-heading { font-size: 13px; margin: 6px 0 0; color: var(--green); font-weight: 600; }
@media (max-width: 760px) {
  #main-content:has(.bill-grid) .page-title-row {
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
  }
  #main-content:has(.bill-grid) .page-title-row h1 {
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -.5px;
  }
  #main-content:has(.bill-grid) .page-title-row .eyebrow { display: none; }
  #main-content:has(.bill-grid) .page-subtitle { font-size: 11px; margin-top: 5px; }
  #main-content:has(.bill-grid) [data-action="add-bill"].primary-button {
    padding: 10px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex: none;
    border-radius: 10px;
  }
  .bills-summary { padding: 20px 16px; border-radius: 14px; gap: 12px; }
  .bills-summary-amount { font-size: 32px; }
  .bills-summary-note { font-size: 10px; max-width: 200px; line-height: 1.6; }
  .bill-card { padding: 16px; border-radius: 14px; }
  .bill-card-top { gap: 10px; }
  .bill-card-top > div:nth-child(2) { flex: 1; min-width: 0; }
  .bill-card-top h2 { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0 0 4px; }
  .bill-card-top .bank-icon { width: 34px; height: 34px; flex: none; }
  .bill-amount { font-size: 30px; margin: 18px 0 10px; }
  .bill-status { padding: 8px 10px; margin-bottom: 14px; font-size: 12px; }
  .bill-details { gap: 14px 10px; margin: 0; padding-bottom: 14px; }
  .bill-details > div { min-width: 0; }
  .bill-details dt { font-size: 11px; }
  .bill-details dd { font-size: 13px; font-weight: 500; margin-top: 5px; }
  .bill-transaction { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 0 0; }
  .bill-transaction > span { grid-column: 1; grid-row: 1; font-size: 12px; }
  .bill-transaction > strong { grid-column: 2; grid-row: 1 / 3; font-size: 28px; margin: 0; }
  .bill-transaction > p { grid-column: 1 / -1; margin: 0; font-size: 11px; }
  .bill-transaction > p:first-child { grid-column: 1; grid-row: 2; }
  .bill-actions { margin-top: 14px; padding-top: 12px; }
  .bill-actions .secondary-button { min-height: 36px; padding: 8px 14px; border-radius: 8px; }
  dialog:has(.bill-editor) {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
    box-sizing: border-box;
  }
  dialog:has(.bill-editor) .dialog-content { padding: 20px 18px 0; }
  dialog:has(.bill-editor) .dialog-header { margin-bottom: 16px; }
  dialog:has(.bill-editor) .dialog-header .eyebrow { display: none; }
  .bill-editor .form-fields { gap: 14px; }
  .bill-editor .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .bill-editor .form-field { font-size: 12px; gap: 7px; min-width: 0; }
  .bill-editor .form-field input, .bill-editor .form-field select {
    font-size: 16px;
    min-height: 44px;
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
  .bill-editor .form-field small, .bill-editor .form-help { font-size: 11px; line-height: 1.7; }
  .bill-editor .bill-form-heading { padding-top: 10px; border-top: 1px solid var(--line); margin: 0; }
  .bill-editor .bill-form-heading:first-child { padding-top: 0; border: 0; }
  .bill-editor .bill-preview { padding: 12px; line-height: 1.8; }
  .bill-editor .dialog-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 8px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    margin-top: 14px;
    background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .bill-editor .dialog-actions .primary-button { flex: 1; min-height: 44px; }
  .bill-editor .dialog-actions .secondary-button { min-height: 44px; }
  .bill-editor .dialog-actions .danger-button { font-size: 12px; padding: 8px; }
}

.bill-title-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.credit-summary { padding: 24px; border: 1px solid var(--green-line); background: var(--green-soft); border-radius: 16px; color: var(--green); margin-bottom: 16px; }
.credit-summary > span { font-size: 12px; }
.credit-summary > strong { display: block; font-size: 36px; margin: 10px 0; font-variant-numeric: tabular-nums; }
.credit-summary > div { font-size: 13px; }
.credit-summary p { color: var(--muted); font-size: 11px; line-height: 1.8; }
.credit-card-total { border-top: 1px solid var(--green-line); padding-top: 12px; }
.credit-bank-list { display: grid; gap: 12px; }
.credit-bank { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px; }
.credit-bank-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.credit-bank-heading h2 { font-size: 16px; margin: 0 0 4px; }
.credit-bank small { font-size: 11px; color: var(--muted); }
.credit-bank-heading > strong { color: var(--green); font-size: 20px; }
.credit-bank summary { font-size: 12px; cursor: pointer; color: var(--muted); padding-top: 14px; }
.credit-card-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 12px 0; font-size: 12px; }
.credit-card-row:first-of-type { margin-top: 12px; }
.credit-card-row > div { flex: 1; min-width: 0; }
.credit-card-row strong, .credit-card-row small { display: block; }
.credit-card-row strong { overflow-wrap: anywhere; }
.credit-card-row .icon-button { flex: none; }
.bill-editor [hidden] { display: none; }
@media (max-width: 760px) {
  #main-content:has(.bill-grid) .page-title-row { flex-wrap: wrap; }
  .bill-title-actions { width: 100%; }
  .bill-title-actions > * { flex: 1; justify-content: center; text-align: center; font-size: 12px; }
  .credit-summary { padding: 18px; }
  .credit-summary > strong { font-size: 30px; }
  .credit-bank { padding: 16px; }
  .credit-bank-heading > strong { font-size: 18px; }
}

.bank-mark { display: block; width: 40px; height: 40px; flex: none; }
.bank-mark-generic { display: flex; align-items: center; justify-content: center; background: var(--green-soft); border-radius: 12px; color: var(--green); }
.credit-bank-heading > div { flex: 1; min-width: 0; }
.credit-bank-heading > strong { flex: none; }
@media (max-width: 760px) {
  .bill-card-top > .bank-mark { width: 36px; height: 36px; }
  .credit-bank-heading { gap: 10px; }
  .credit-bank-heading h2 { font-size: 15px; }
}

.bill-credit-entry {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: fit-content;
  margin: 0 0 10px auto;
  padding: 6px 0;
  color: var(--green);
  font-size: 12px;
  text-decoration: none;
}
.bill-credit-entry .icon { width: 15px; height: 15px; }
.bill-credit-entry:hover { text-decoration: underline; }

.module-content { max-width: 920px; }
.module-caption { color: var(--muted); font-size: 12px; }
.app-version { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.module-entry-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.module-entry { display: flex; align-items: center; gap: 16px; padding: 22px; min-height: 90px; }
button.module-entry { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; }
.module-section-title { margin: 24px 0 12px; font-size: 14px; font-weight: 600; }
.module-status { padding: 4px 8px; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 11px; white-space: nowrap; flex: none; }
.module-entry + .module-entry { border-top: 1px solid var(--line); }
.module-entry:hover { background: var(--surface-soft); }
.module-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--green-soft); color: var(--green); }
.module-icon .icon { width: 23px; height: 23px; }
.module-entry-text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.module-entry strong, .tool-tile strong { font-size: 16px; font-weight: 600; }
.module-entry small, .tool-tile small { color: var(--muted); font-size: 13px; }
.module-entry > .icon { color: var(--muted); flex: none; }
.favorites-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.favorite-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px; background: transparent; border: 0; text-align: left; }
.favorite-item + .favorite-item { border-top: 1px solid var(--line); }
.favorite-item:hover { background: var(--surface-soft); }
.favorite-symbol { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--green); background: var(--green-soft); flex: none; }
.favorite-symbol .icon { width: 18px; height: 18px; }
.favorite-copy { min-width: 0; flex: 1; }
.favorite-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.favorite-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.favorite-item > .icon { flex: none; width: 16px; height: 16px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.tool-tile:hover { border-color: var(--green-line); background: var(--surface-soft); }
.tool-tile .module-icon { margin-bottom: 8px; }
.tool-open { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 16px; color: var(--green); font-size: 13px; }
.tool-open .icon { width: 15px; height: 15px; }
@media (max-width: 767px) {
  .module-entry { padding: 18px 16px; gap: 12px; }
  .module-icon { width: 40px; height: 40px; border-radius: 12px; }
  .module-entry strong, .tool-tile strong { font-size: 15px; }
  .module-entry small, .tool-tile small { font-size: 12px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tool-tile { padding: 17px 14px; border-radius: 15px; }
}
.bill-preview-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 0; }
.bill-preview-row > span { color: var(--muted); font-size: 11px; }
.bill-preview-row > strong { font-size: 12px; font-weight: 600; text-align: right; }
.bill-preview-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  #main-content:has(.bill-grid) .page-title-row { flex-wrap: nowrap; }
  #main-content:has(.bill-grid) .page-title-row > div:first-child { min-width: 0; }
  #main-content:has(.bill-grid) .page-title-row h1 { font-size: 20px; }
  #main-content:has(.bill-grid) .page-title-row [data-action="add-bill"] { padding: 10px; }
  .bill-editor .bill-rule-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bill-editor .form-field { align-content: start; }
  .bill-editor .bill-rule-fields select, .bill-editor .bill-rule-fields input { height: 46px; }
  .bill-editor .bill-preview { padding: 10px 12px; }
  .bill-preview-row + .bill-preview-row { border-top: 1px solid var(--green-line); }
}

.activity-views { display: inline-block; font-size: 11px; color: var(--muted); white-space: nowrap; line-height: 1.5; }
.activity-compact { display: flex; align-items: center; gap: 12px; }
.activity-compact .activity-compact-title { flex: 1; min-width: 0; width: auto; }
.activity-compact > .activity-views { padding-right: 12px; flex: none; font-size: 10px; }
.bank-activity > .activity-views { margin-top: 4px; }

.bill-sync-caption { color: var(--muted); font-size: 11px; line-height: 1.7; margin-bottom: 8px; }

.account-forgot-row { display: flex; justify-content: flex-end; margin: 4px 0 12px; }
.account-forgot-row .text-button { min-height: 36px; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

.activity-share-panel { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.activity-share-panel[hidden] { display: none; }
.activity-share-panel .secondary-button { margin-top: 10px; }
.activity-share-panel small { display: block; margin-top: 10px; color: var(--muted); }

.activity-signup-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.activity-detail-actions .activity-signup-button { margin-right: auto; min-width: 132px; }
@media (max-width: 600px) {
  .activity-detail-actions .activity-signup-button { width: 100%; margin-right: 0; min-height: 46px; }
}

.activity-share-status { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.activity-share-status:empty { display: none; }

.activity-dialog-title:focus { outline: none; }

.account-math { margin: 18px 0 8px; }
.account-math-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.account-math-heading > span { font-size: 11px; color: var(--muted); }
.account-math-row { display: grid; grid-template-columns: minmax(75px, 1fr) 12px minmax(65px, 1fr) 44px; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.account-math-row strong { text-align: center; white-space: nowrap; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: var(--ink); }
.account-math-equals { color: var(--muted); text-align: center; }
.account-math-row input { width: 100%; min-width: 0; height: 42px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 16px; text-align: center; }
.account-math-row input::placeholder { color: var(--muted); font-size: 13px; }
.account-math-row input:focus { border-color: var(--green); outline: 2px solid var(--green); outline-offset: -2px; }
.account-math-refresh { height: 44px; padding: 0; font-size: 12px; color: var(--green); border-radius: 6px; }
.account-math-refresh:hover { background: var(--green-soft); }
.account-math small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
@media (max-width: 360px) {
  .account-math-row { gap: 6px; padding: 7px; grid-template-columns: minmax(65px, 1fr) 10px minmax(55px, 1fr) 38px; }
  .account-math-row strong { font-size: 16px; }
}

.activity-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 24px 12px; color: var(--muted); font-size: 12px; text-align: center; }
.activity-pager:empty { display: none; }

#submission-form { display: grid; gap: 16px; }
#submission-form .dialog-actions { margin-top: 0; }
.submission-quick, .submission-extra { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.submission-quick summary, .submission-extra summary { cursor: pointer; color: var(--green); font-size: 13px; }
.submission-quick[open] summary, .submission-extra[open] summary { margin-bottom: 16px; }
.submission-extra .form-row { margin-top: 14px; }
.resource-library { max-width: 1100px; }
.resource-library-entry { display:flex; align-items:center; gap:16px; padding:22px; margin-bottom:24px; border:1px solid var(--green-line); background:var(--green-soft); border-radius:16px; }
.resource-library-entry > span:nth-child(2) { flex:1; }
.resource-library-entry strong { display:block; font-size:17px; }
.resource-library-entry small { display:block; margin-top:7px; color:var(--muted); font-size:12px; }
.resource-controls { display:grid; gap:16px; padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.resource-filter-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.resource-count,.resource-footnote { color:var(--muted); font-size:12px; margin:18px 0; }
.resource-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.resource-card { padding:22px; border:1px solid var(--line); border-radius:16px; background:var(--surface); display:flex; flex-direction:column; min-width:0; }
.resource-card-heading { display:flex; align-items:center; gap:12px; }
.resource-card-heading > div { flex:1; min-width:0; }
.resource-card h2 { font-size:16px; line-height:1.5; overflow-wrap:anywhere; margin-top:3px; }
.resource-kind { font-size:11px; color:var(--green); }
.resource-symbol { padding:10px; border-radius:12px; background:var(--green-soft); color:var(--green); display:flex; }
.resource-card > p { font-size:13px; color:var(--muted); line-height:1.7; margin:16px 0; white-space:pre-line; overflow-wrap:anywhere; }
.resource-tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:18px; }
.resource-tags span { font-size:11px; padding:4px 8px; border-radius:6px; background:var(--bg); color:var(--muted); }
.resource-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; margin-top:auto; border-top:1px solid var(--line); font-size:11px; }
.resource-invalid { color:var(--orange); }
.resource-save.is-saved { color:var(--green); background:var(--green-soft); }
.resource-code { margin-top:20px; }
@media(max-width:700px) { .resource-grid { grid-template-columns:1fr; } .resource-card { padding:18px; } .resource-controls { padding:16px; } .resource-library-entry { padding:18px; } .resource-filter-row .filter-list { gap:4px; flex-wrap:wrap; } }

/* Personal card services */
.service-workspace {max-width:1120px; display:grid; gap:20px;}
.service-overview {display:flex; align-items:center; gap:28px; padding:24px 28px; border:1px solid var(--line); border-radius:20px; background:var(--surface);}
.service-overview>div {flex-shrink:0; min-width:88px;}
.service-overview small {color:var(--muted); display:block; font-size:12px;}
.service-overview strong {display:block; font-size:32px; color:var(--green); line-height:1.5;}
.service-overview em {font-style:normal; font-size:13px; margin-left:8px; color:var(--muted);}
.service-overview p {flex:1; color:var(--muted); font-size:13px; line-height:1.8; margin:0;}
.service-tabs {display:flex; gap:8px;}
.service-tabs button {display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:12px; padding:12px 20px; background:var(--surface); color:var(--muted); cursor:pointer;}
.service-tabs button[aria-pressed="true"] {color:var(--green); background:var(--green-soft); border-color:var(--green); font-weight:600;}
.service-tabs svg {width:18px;height:18px;}
.service-toolbar {display:flex; gap:14px; align-items:center;}
.service-toolbar .search-wrap {flex:1; max-width:500px;}
.service-toolbar>.text-button {white-space:nowrap;}
.service-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start;}
.service-card {padding:24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); min-width:0;}
.service-card.warning {border-color:#d9ac62;}
.service-card.danger {border-color:#d58b89;}
.service-heading {display:flex; gap:12px; align-items:flex-start;}
.service-heading>div {min-width:0;flex:1;}
.service-heading .module-icon {width:38px; height:38px; flex-shrink:0; border-radius:12px;}
.service-heading h2 {font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere;}
.service-meta {font-size:12px;color:var(--muted);line-height:1.6;margin:3px 0 0;overflow-wrap:anywhere;}
.service-badge {font-size:11px; padding:4px 8px; border-radius:7px; background:var(--green-soft);color:var(--green);line-height:1.6;flex-shrink:0;}
.service-badge.warning {background:#fff0d6;color:#88590e;}
.service-badge.danger {background:#ffebea;color:#a83c39;}
.service-balance {margin:24px 0 16px; display:flex; align-items:baseline; justify-content:space-between; gap:12px;}
.service-balance strong {font-size:30px;line-height:1.3;overflow-wrap:anywhere;}
.service-balance strong small {font-size:14px;font-weight:400;color:var(--muted);}
.service-balance>span {font-size:12px;color:var(--muted);flex-shrink:0;}
.service-progress {display:block;width:100%;height:6px;border:0;border-radius:5px;appearance:none;background:var(--green-soft);overflow:hidden;}
.service-progress::-webkit-progress-bar {background:var(--green-soft);border-radius:5px;}
.service-progress::-webkit-progress-value {background:var(--green);border-radius:5px;}
.service-progress::-moz-progress-bar {background:var(--green);border-radius:5px;}
.service-dates {font-size:12px;line-height:1.9;color:var(--muted);margin:12px 0;}
.service-hint {font-size:13px;line-height:1.8;margin:10px 0;overflow-wrap:anywhere;}
.service-notes {font-size:13px;line-height:1.8;white-space:pre-wrap;background:var(--bg);padding:12px;border-radius:10px;overflow-wrap:anywhere;}
.service-actions {display:flex; flex-wrap:wrap; align-items:center;gap:10px 14px; padding-top:16px; margin-top:12px; border-top:1px solid var(--line);}
.service-actions .text-button {font-size:12px;}
.service-actions .primary-button,.service-actions .secondary-button {padding:9px 14px;font-size:12px;min-height:38px;}
.service-history {margin-top:12px;font-size:12px;color:var(--muted);}
.service-history summary {padding:8px 0;cursor:pointer;}
.service-history p {padding:6px 0;margin:0;overflow-wrap:anywhere;}
.points-batches {border-top:1px solid var(--line);margin:14px 0;}
.points-batches>div {display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;}
.points-batches strong {font-weight:600;}
.danger-text {color:#ae3431;}
.fee-amount {display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin:20px 0;}
.fee-amount span,.fee-amount small {font-size:12px;color:var(--muted);}
.fee-amount strong {font-size:26px;}
.fee-track {display:grid;gap:8px;margin:18px 0;}
.fee-track>div:first-child {display:flex;justify-content:space-between;gap:12px;font-size:12px;}
.fee-track strong {font-weight:500;}
.fee-track small {color:var(--muted);font-size:12px;}
.service-form .service-form-section {margin:20px 0;padding:18px;background:var(--bg);border-radius:14px;}
.service-form .form-field {margin-bottom:14px;}
.service-form h3 {font-size:14px;margin:15px 0 6px;}
.point-batch-row {padding:12px 0;border-bottom:1px solid var(--line);}
.point-batch-row>.text-button {font-size:12px;}
.service-footnote {margin-top:4px;}
@media(max-width:700px){
 .service-workspace {gap:16px;}
 .service-overview {padding:18px;gap:14px;flex-wrap:wrap;}
 .service-overview>div {min-width:70px;}
 .service-overview p {font-size:12px;min-width:150px;}
 .service-overview>.primary-button {width:100%;}
 .service-grid {grid-template-columns:minmax(0,1fr);gap:16px;}
 .service-card {padding:18px;}
 .service-heading {flex-wrap:wrap;gap:10px;}
 .service-heading>div {min-width:140px;}
 .service-heading>.service-badge {margin-left:48px;}
 .service-balance {margin-top:18px;}
 .service-balance strong {font-size:28px;}
 .service-tabs {gap:8px;}
 .service-tabs button {flex:1;justify-content:center;padding:11px 12px;font-size:13px;}
 .service-toolbar {gap:8px;}
 .service-toolbar .search-wrap {min-width:0;}
 .service-form .service-form-section {padding:14px;}
 .service-form .form-row {grid-template-columns:minmax(0,1fr);gap:0;}
 .points-batches>div {flex-wrap:wrap;}
}

/* Persistent private conversations, shared by the user and admin views. */
.user-message-workspace,.admin-message-workspace {max-width:1000px;display:grid;gap:18px;}
.message-thread {border:1px solid var(--line);border-radius:20px;background:var(--surface);overflow:hidden;}
.message-thread-bar {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 24px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted);}
.message-thread-bar .text-button {font-size:12px;white-space:nowrap;}
.message-thread>.notice {margin:14px 20px 0;}
.message-log {max-height:460px;min-height:200px;overflow-y:auto;overscroll-behavior:contain;padding:24px;background:var(--bg);display:flex;flex-direction:column;gap:20px;}
.message-older {align-self:center;}
.message-row {display:flex;gap:10px;align-items:flex-start;max-width:86%;}
.message-row.message-mine {align-self:flex-end;flex-direction:row-reverse;}
.message-avatar {height:32px;width:32px;border-radius:11px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);color:var(--muted);font-size:12px;flex-shrink:0;}
.message-mine .message-avatar {background:var(--green-soft);color:var(--green);border-color:var(--green-line);}
.message-copy {min-width:0;}
.message-meta {display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0 0 7px;font-size:11px;color:var(--muted);}
.message-meta strong {font-weight:500;}
.message-mine .message-meta {justify-content:flex-end;}
.message-copy p {padding:12px 16px;border:1px solid var(--line);border-radius:4px 14px 14px;background:var(--surface);margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.85;}
.message-mine .message-copy p {background:var(--green-soft);border-color:var(--green-line);border-radius:14px 4px 14px 14px;}
.message-copy>small {display:block;text-align:right;font-size:10px;color:var(--muted);margin-top:5px;}
.message-compose {padding:20px 24px;}
.message-compose textarea {resize:vertical;min-height:100px;max-height:300px;}
.message-compose-footer {display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:12px;color:var(--muted);margin-top:12px;}
.message-compose-footer small {display:block;margin-top:3px;font-size:11px;}
.message-compose-footer>.primary-button {flex-shrink:0;}
.message-compose .form-help {margin-bottom:0;}
.message-preview {max-width:420px;overflow-wrap:anywhere;white-space:normal;}
@media(max-width:700px){
 .message-thread-bar {padding:12px 16px;font-size:11px;}
 .message-log {padding:16px;max-height:380px;min-height:170px;gap:16px;}
 .message-row {max-width:96%;gap:8px;}
 .message-avatar {width:26px;height:26px;border-radius:9px;font-size:10px;}
 .message-copy p {padding:10px 12px;font-size:13px;}
 .message-meta {font-size:10px;gap:3px 7px;}
 .message-compose {padding:16px;}
 .message-compose-footer {align-items:flex-start;gap:12px;}
 .message-compose-footer small {line-height:1.8;}
 .message-compose-footer .primary-button {padding:10px 14px;min-width:88px;}
 .message-preview {max-width:200px;}
}
.service-form textarea,.message-compose textarea {width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface);color:var(--ink);font:inherit;line-height:1.75;}
.service-form textarea:focus,.message-compose textarea:focus {outline:2px solid var(--green);outline-offset:-2px;border-color:var(--green);}
@media(max-width:700px){.message-log {max-height:min(380px,calc(100dvh - 430px));min-height:170px;}}
@media(max-width:700px){
  form .form-field textarea {font-size:16px;}
}

/* First visit discovery and personal follow-up. */
.bank-preference {display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--green-soft);border:1px solid var(--green-line);border-radius:12px;margin-bottom:16px;}
.bank-preference>div {flex:1;min-width:0;}
.bank-preference strong {font-size:14px;display:block;}
.bank-preference small {display:block;margin-top:5px;line-height:1.5;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bank-preference button {flex-shrink:0;}
.bank-picker {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0;}
.bank-picker label {display:flex;align-items:center;gap:8px;padding:12px 10px;border:1px solid var(--line);border-radius:10px;font-size:13px;cursor:pointer;}
.bank-picker label:has(input:checked) {background:var(--green-soft);border-color:var(--green);color:var(--green);}
.bank-picker input {accent-color:var(--green);width:16px;height:16px;flex-shrink:0;}
.featured-section {margin-bottom:28px;}
.featured-section h2,.weekly-section h2 {margin:4px 0 0;font-size:20px;}
.featured-section .section-title-row {align-items:center;gap:12px;}
.featured-controls {display:flex;align-items:center;gap:4px;flex:none;}
.featured-controls button {width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--green);cursor:pointer;}
.featured-controls button:hover {background:var(--green-soft);}
.featured-controls .icon {width:18px;height:18px;}
.featured-position {font-size:13px;font-weight:600;min-width:40px;text-align:center;}
.featured-position>span {font-weight:400;color:var(--muted);}
.featured-card {width:100%;display:block;padding:20px 22px;background:linear-gradient(120deg,var(--green-soft),var(--surface) 80%);border:1px solid var(--green-line);border-radius:18px;text-align:left;color:var(--ink);font:inherit;cursor:pointer;}
.featured-card-top {display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--green);margin-bottom:12px;}
.featured-deadline {font-size:11px;color:var(--muted);white-space:nowrap;}
.featured-urgent {color:#b36c23;}
.featured-card-title {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:17px;font-weight:600;line-height:1.65;min-height:56px;}
.featured-condition {display:block;font-size:12px;line-height:1.7;color:var(--muted);margin:7px 0 14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.featured-card-bottom {display:flex;justify-content:space-between;align-items:center;gap:12px;}
.featured-reward {color:var(--green);font-size:13px;overflow-wrap:anywhere;}
.featured-reward b {font-size:26px;font-weight:600;}
.featured-open {display:flex;align-items:center;gap:3px;font-size:12px;color:var(--green);white-space:nowrap;flex:none;}
.featured-open .icon {width:14px;height:14px;}
.featured-verification {display:block;font-size:11px;line-height:1.6;color:var(--muted);margin-top:10px;}
.success-nudge {border:1px solid var(--green-line);background:var(--green-soft);padding:18px;border-radius:14px;margin:18px 0;}
.success-nudge strong {font-size:15px;}
.success-nudge p {font-size:13px;color:var(--muted);line-height:1.8;margin:8px 0 14px;}
.nudge-actions {display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
.nudge-actions .primary-button,.nudge-actions .secondary-button {padding:9px 14px;font-size:13px;}
.weekly-section {margin:16px 0;}
.weekly-summary {color:var(--ink);text-decoration:none;cursor:pointer;list-style:none;}
.weekly-summary::-webkit-details-marker {display:none;}
.weekly-summary-copy small {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.weekly-count {font-size:11px;color:var(--green);background:var(--green-soft);padding:2px 6px;border-radius:6px;margin-left:4px;vertical-align:middle;}
.weekly-chevron {display:flex;flex:none;color:var(--muted);transition:transform .15s ease;}
.weekly-section[open] .weekly-chevron {transform:rotate(90deg);}
.weekly-expanded {padding:0 16px 12px;border-top:1px solid var(--line);}
.weekly-section .section-title-row {margin:0 0 18px;}
.weekly-list {display:grid;gap:0;}
.weekly-item {display:flex;gap:14px;align-items:center;width:100%;background:none;border:0;border-bottom:1px solid var(--line);padding:15px 0;color:var(--ink);font:inherit;text-align:left;}
.weekly-item:last-child {border-bottom:0;}
.weekly-date {font-size:12px;color:var(--green);min-width:45px;}
.weekly-item>span:nth-child(2) {flex:1;min-width:0;}
.weekly-item strong {display:block;font-size:14px;line-height:1.6;overflow-wrap:anywhere;}
.weekly-item small {display:block;font-size:12px;color:var(--muted);margin-top:4px;line-height:1.7;}
.weekly-overdue .weekly-date {color:#c14335;font-weight:600;}
.weekly-empty {color:var(--muted);font-size:14px;line-height:1.8;}
.weekly-note {font-size:11px;color:var(--muted);line-height:1.8;margin:14px 0 0;}
.save-site-intro {display:flex;gap:14px;align-items:center;margin:18px 0 24px;}
.save-site-intro strong {font-size:16px;font-weight:600;}
.save-site-intro p {margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.6;}
.save-site-steps {padding:0;list-style:none;counter-reset:save-step;display:grid;gap:12px;margin:0 0 22px;}
.save-site-steps li {counter-increment:save-step;display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--line);border-radius:12px;font-size:14px;line-height:1.8;}
.save-site-steps li::before {content:counter(save-step);display:grid;place-items:center;flex:none;width:24px;height:24px;border-radius:8px;background:var(--green-soft);color:var(--green);font-size:12px;font-weight:600;margin-top:1px;}
.save-site-address {padding:12px 14px;border-radius:10px;background:var(--surface-soft);}
.save-site-address span {font-size:11px;color:var(--muted);}
.save-site-address p {font-size:13px;margin:5px 0 0;line-height:1.6;overflow-wrap:anywhere;user-select:all;}
@media(max-width:700px){
 .bank-preference {padding:10px 12px;gap:10px;flex-wrap:nowrap;}
 .bank-preference>div {flex:1;min-width:0;}
 .bank-preference strong {font-size:13px;}
 .bank-picker {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
 .featured-section {margin-bottom:24px;}
 .featured-section h2,.weekly-section h2 {font-size:18px;}
 .featured-section .subtle {font-size:11px;}
 .weekly-item {gap:10px;}
 .weekly-item strong {font-size:13px;}
 .success-nudge {padding:16px;}
}
.featured-explainer {font-size:12px;line-height:1.6;color:var(--muted);margin:6px 0 0;}

@media(max-width:700px){.featured-card {padding:16px 18px;}.featured-card-title {font-size:16px;min-height:53px;}.featured-controls {gap:0;}.featured-position {min-width:34px;}.featured-section .featured-explainer {font-size:11px;}}

/* Small editable text can cause mobile browsers to zoom on focus. */
@media (max-width: 760px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
    font-size: 16px;
  }
}

.profile-card > div:nth-child(2) {min-width:0;flex:1;}
.profile-card h2 {overflow-wrap:anywhere;}
.profile-user-number {font-variant-numeric:tabular-nums;}
.profile-account-actions {display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:8px;}
.reminder-setting-switch {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;margin-bottom:18px;border-bottom:1px solid var(--line);}
.reminder-setting-switch span {display:grid;gap:6px;}
.reminder-setting-switch small {color:var(--muted);font-size:12px;}
.reminder-setting-switch input {width:20px;height:20px;accent-color:var(--green);flex:none;}

/* Read-only calendar arrangements; editing is a separate step. */
.arrangement-detail { display: grid; gap: 18px; }
.arrangement-detail .service-meta { margin: 0; }
.arrangement-summary { font-size: 28px; font-weight: 700; color: var(--text, #20313b); line-height: 1.3; }
.arrangement-summary small { display: block; font-size: 13px; font-weight: 400; color: #75858a; margin-top: 6px; }
.arrangement-entry { padding: 16px; border-radius: 14px; background: #edf7f3; }
.arrangement-entry h3 { margin: 0 0 8px; font-size: 15px; color: #00836d; }
.arrangement-entry p, .arrangement-entry small { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.arrangement-entry small { display: block; margin-top: 8px; color: #667c76; }
.arrangement-link { justify-self: stretch; text-align: center; }
.arrangement-facts { margin: 0; display: grid; gap: 12px; }
.arrangement-facts > div { display: flex; justify-content: space-between; gap: 20px; }
.arrangement-facts dt { color: #75858a; flex-shrink: 0; }
.arrangement-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.arrangement-notes { margin: 0; font-size: 13px; color: #75858a; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.arrangement-status { margin: 0; color: #00836d; }
.arrangement-status.urgent { color: #ae671f; }
.arrangement-status.overdue { color: #bf3c43; font-weight: 600; }
.arrangement-undo { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--border, #dce6e9); border-radius: 12px; }
.arrangement-undo > span { font-size: 13px; color: var(--muted, #75858a); }
.arrangement-undo .secondary-button { justify-self: start; }

/* 活动分享海报 */
.poster-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0}.poster-preview{padding:16px;background:var(--surface-soft,#f2f7f4);border-radius:16px;text-align:center}.poster-preview img{display:block;width:100%;max-width:340px;height:auto;margin:auto;border-radius:10px;box-shadow:0 8px 30px #163b3214}.poster-status,.poster-save-help{font-size:13px;line-height:1.7;color:var(--muted,#7b8f86)}.poster-status{min-height:22px}.poster-save-help{margin-bottom:0}@media(max-width:600px){.poster-preview{padding:10px}.activity-detail-actions{gap:8px}.activity-detail-actions>button,.activity-detail-actions>a{flex:1 1 calc(50% - 8px)}}

.activity-detail-description,.activity-rule-notes li{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}

/* 详情模式仅展示活动摘要，完整规则在详情弹框阅读 */
.activity-summary{padding:20px}.activity-summary-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}.activity-summary-top>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-summary-kind{flex:none;color:var(--green);background:var(--surface-soft);padding:3px 7px;border-radius:5px;font-size:11px}.activity-summary .activity-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:18px;line-height:1.55;letter-spacing:0;margin:10px 0 12px}.activity-summary-benefit{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px}.activity-summary-benefit strong{font-size:17px;font-weight:600;color:var(--green);overflow-wrap:anywhere}.activity-summary-benefit small{font-size:11px;color:var(--muted)}.activity-summary-threshold{font-size:12px;color:var(--muted);margin:7px 0 0;line-height:1.6}.activity-summary-meta{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;font-size:11px;color:var(--muted);margin-top:12px}.activity-summary .activity-bottom{margin-top:12px;padding-top:10px}.activity-summary .save-button{font-size:12px}.activity-summary .save-button .icon{width:16px;height:16px}@media(max-width:600px){.activity-summary{padding:16px}.activity-summary .activity-title{font-size:16px;margin:9px 0 10px}.activity-summary-benefit strong{font-size:16px}}

/* Activity collections */
.activity-page-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.list-selection-bar{position:sticky;top:90px;z-index:5;display:flex;align-items:center;gap:16px;padding:16px 20px;margin-bottom:20px;background:var(--surface,#fff);border:1px solid var(--border,#e2e8ec);border-radius:16px;box-shadow:0 8px 24px #19392d0d}
.list-selection-bar>div{margin-right:auto;display:grid;gap:4px}.list-selection-bar small{font-size:12px;color:var(--muted)}
.list-pick-row{display:flex;align-items:center;gap:12px;padding:18px}.list-pick-button{flex:1;min-width:0;display:flex;align-items:center;gap:14px;text-align:left;background:none;border:0;color:inherit;padding:0}
.list-pick-button>span:last-child{display:grid;gap:8px;min-width:0}.list-pick-button strong{font-size:16px;line-height:1.5}.list-pick-button small{color:var(--muted);font-size:12px}
.list-check{flex:none;display:grid;place-items:center;width:24px;height:24px;border:1px solid var(--border,#dfe7e3);border-radius:7px;color:white}.list-pick-button[aria-pressed=true] .list-check{background:var(--green);border-color:var(--green)}
.list-editor-caption{display:flex;align-items:center;justify-content:space-between;margin:24px 0 12px;gap:12px}.list-editor-caption span{font-size:12px;color:var(--muted)}
.list-preview{border:1px solid var(--border,#e4e9e7);border-radius:16px;overflow:hidden;background:var(--surface,#fff)}
.list-preview-row{display:flex;align-items:center;gap:14px;padding:18px;border-bottom:1px solid var(--border,#e4e9e7)}.list-preview-row:last-child{border:0}.list-number{color:var(--green);font-size:13px;font-weight:700;flex:none}.list-preview-row>div:not(.list-row-actions){flex:1;min-width:0;display:grid;gap:7px}.list-preview-row strong{font-size:15px;line-height:1.5}.list-preview-row small{color:var(--muted);font-size:12px}.list-preview-row>button{flex:none;font-size:12px}.list-row-actions{display:flex;gap:12px}.list-row-actions button{min-width:28px;min-height:36px}
.list-share-heading h3{margin-bottom:6px}.list-share-heading p{font-size:13px;color:var(--muted)}
.my-share-lists{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.my-share-list{background:var(--surface,#fff);border:1px solid var(--border,#e4e9e7);border-radius:18px;padding:24px}.my-share-list h2{font-size:19px;line-height:1.5}.my-share-list p{color:var(--muted);font-size:13px;line-height:1.6}.list-manage-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.share-list-public{max-width:760px;margin:auto}.share-list-public header{margin:28px 0}.share-list-public h1{line-height:1.4}.share-list-public header p,.share-list-public header small{color:var(--muted)}.list-public-footer{display:grid;justify-items:center;gap:18px;padding:32px 20px;background:var(--surface,#fff);border:1px solid var(--border,#e4e9e7);border-radius:18px;margin-top:24px;text-align:center}
@media(max-width:700px){.activity-page-actions{gap:10px;justify-content:space-between;width:100%}.activity-page-actions .secondary-button{padding:8px 12px;font-size:13px}.list-selection-bar{top:76px;padding:12px;gap:10px}.list-selection-bar small{font-size:11px}.list-selection-bar .primary-button{padding:10px 12px}.list-pick-row{padding:16px}.list-preview-row{padding:15px 12px;gap:10px}.my-share-list{padding:20px}.list-preview-row strong{font-size:14px}}

.list-selection-bar{position:fixed;top:auto;bottom:24px;left:calc(50% + 120px);transform:translateX(-50%);width:min(740px,calc(100% - 300px));margin:0;z-index:15}.content-column:has(.list-selection-bar){padding-bottom:100px}@media(max-width:900px){.list-selection-bar{left:50%;width:calc(100% - 32px);bottom:calc(82px + env(safe-area-inset-bottom))}}
.profile-detail-fields { margin: 22px 0; border-top: 1px solid var(--line); }
.profile-detail-fields > div { display: flex; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.profile-detail-fields dt { flex: 0 0 72px; color: var(--muted); font-size: 13px; }
.profile-detail-fields dd { margin: 0; min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: 14px; }
.profile-detail-fields small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.profile-detail-fields .text-button { margin-left: 10px; color: var(--green); }

.account-profile { max-width: 720px; }
.account-identity { display:flex; align-items:center; gap:18px; padding:26px; margin-bottom:18px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.account-avatar { width:64px; height:64px; display:grid; place-items:center; flex:none; border-radius:20px; background:var(--green-soft); color:var(--green); font-size:27px; font-weight:600; }
.account-avatar svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.account-identity h2 { font-size:22px; font-weight:600; overflow-wrap:anywhere; }
.account-identity p { margin-top:7px; font-size:12px; color:var(--muted); }
.account-identity > div:last-child { min-width:0; }
.account-details, .account-security { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:22px 26px; margin-bottom:18px; }
.account-profile h3 { margin:0 0 8px; font-size:13px; font-weight:600; color:var(--muted); }
.account-details dl { margin:0; }
.account-details dl > div { display:flex; gap:20px; padding:19px 0; border-bottom:1px solid var(--line); }
.account-details dl > div:last-child { border-bottom:0; padding-bottom:2px; }
.account-details dt { flex:0 0 54px; font-size:14px; color:var(--muted); }
.account-details dd { margin:0; display:flex; align-items:flex-start; gap:14px; flex:1; min-width:0; font-size:14px; }
.account-details dd > span { flex:1; min-width:0; overflow-wrap:anywhere; }
.account-details small, .account-security small { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.account-placeholder { color:var(--muted); }
.account-edit { flex:none; color:var(--green); background:var(--green-soft); border-radius:7px; padding:5px 12px; min-height:32px; font-size:12px; margin-top:-5px; }
.account-edit:disabled { color:var(--muted); opacity:.6; }
.account-security-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 0; width:100%; text-align:left; font-size:14px; }
.account-security-row + .account-security-row { border-top:1px solid var(--line); padding-bottom:2px; }
.account-security-row > span:last-child:not(:first-child) { font-size:24px; color:var(--muted); }
.account-logout { display:block; width:100%; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); font-size:14px; }
.account-logout:hover { color:#b45151; border-color:#b4515150; }
@media(max-width:600px) {
  .account-identity { padding:20px; gap:14px; margin-bottom:14px; }
  .account-avatar { width:54px; height:54px; border-radius:17px; font-size:24px; }
  .account-identity h2 { font-size:20px; }
  .account-identity p { font-size:11px; }
  .account-details, .account-security { padding:18px 20px; margin-bottom:14px; }
  .account-details dl > div { gap:12px; padding:18px 0; }
  .account-details dt { flex-basis:40px; }
  .account-edit { min-height:40px; margin-top:-8px; }
  .account-security-row { min-height:52px; }
}


.profile-page-heading { display:flex; align-items:center; gap:8px; max-width:720px; margin-bottom:20px; margin-left:-10px; }
.profile-page-heading h1 { margin:0; font-size:24px; font-weight:600; letter-spacing:-.4px; }
.profile-page-heading p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.profile-back-button { display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:10px; background:transparent; border:0; color:var(--ink); }
.profile-back-button svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.profile-back-button:hover { background:var(--green-soft); color:var(--green); }
.profile-back-button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
@media(max-width:600px) { .profile-page-heading { gap:6px; margin-bottom:16px; } .profile-page-heading h1 { font-size:22px; } }

.account-guest-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px; }
.account-guest-card .account-identity { padding:0; border:0; margin:0 0 22px; border-radius:0; }
.account-guest-card > .primary-button { width:100%; min-height:46px; display:flex; align-items:center; justify-content:center; gap:10px; box-shadow:none; }
.profile-page-heading { gap:2px; margin-left:-8px; }
.profile-page-heading h1 { font-size:21px; }
.profile-back-button { width:36px; height:44px; }
@media(max-width:600px) {
  .account-guest-card { padding:22px; }
  .account-guest-card .account-identity { margin-bottom:20px; }
  .profile-page-heading { gap:2px; margin-bottom:16px; }
  .profile-page-heading h1 { font-size:20px; }
}

.profile-page-heading { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:0; margin-left:0; min-height:48px; margin-bottom:18px; }
.profile-page-heading > div { text-align:center; }
.profile-page-heading h1 { font-size:19px; font-weight:600; letter-spacing:0; }
.profile-back-button { width:44px; height:44px; }
.account-guest-card { padding:30px 24px 24px; }
.account-guest-card .account-identity { flex-direction:column; text-align:center; gap:14px; margin-bottom:24px; }
.account-guest-card .account-avatar { width:64px; height:64px; border-radius:50%; }
.account-guest-card .account-identity h2 { font-size:19px; }
.account-guest-card .account-identity p { font-size:12px; margin-top:8px; }
.account-guest-card > .primary-button { border-radius:10px; font-size:14px; }
@media(max-width:600px) { .profile-page-heading { margin-bottom:16px; } .profile-page-heading h1 { font-size:18px; } .account-guest-card { padding:28px 22px 22px; } }

.activity-list-entry { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:8px 10px; border-radius:8px; background:transparent; color:var(--green); font-size:12px; font-weight:500; white-space:nowrap; }
.activity-list-entry svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.activity-list-entry:hover { background:var(--green-soft); }
.activity-list-entry:focus-visible { outline:2px solid var(--green); outline-offset:2px; }
@media(max-width:700px) { .activity-page-actions { gap:8px; } .activity-list-entry { padding:8px 0 8px 8px; font-size:12px; } }

.activity-list-entry { gap:7px; min-height:36px; padding:7px 13px; border-radius:999px; background:var(--green-soft); border:1px solid var(--green-line); color:var(--green); font-size:12px; font-weight:600; }
.activity-list-entry svg { width:15px; height:15px; }
.activity-list-entry:hover { background:var(--green-soft); border-color:var(--green); }
@media(max-width:700px) { .activity-list-entry { min-height:38px; padding:8px 12px; font-size:12px; } }

.featured-controls { gap:0; padding:0 2px; height:40px; border:1px solid var(--line); border-radius:999px; background:var(--surface); }
.featured-controls button { width:38px; height:38px; border:0; border-radius:50%; background:transparent; color:var(--muted); }
.featured-controls button:hover { color:var(--green); background:var(--green-soft); }
.featured-controls .icon { width:16px; height:16px; }
.featured-position { min-width:40px; font-size:12px; line-height:1; font-weight:500; color:var(--ink); font-variant-numeric:tabular-nums; }
.featured-position > span { font-size:12px; color:var(--muted); font-weight:400; }
@media(max-width:700px) { .featured-controls { gap:0; } .featured-position { min-width:38px; } }

.profile-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:44px; margin-bottom:18px; }
.profile-page-heading h1 { margin:0; font-size:22px; font-weight:600; }
.profile-back-button { display:inline-flex; align-items:center; justify-content:center; gap:4px; width:auto; height:38px; padding:0 12px 0 8px; background:var(--surface); border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:12px; white-space:nowrap; }
.profile-back-button svg { width:16px; height:16px; }
@media(max-width:600px) { .profile-page-heading h1 { font-size:20px; } .profile-back-button { height:40px; } }

.dialog-acknowledge { display:flex; justify-content:center; margin-top:24px; }
.dialog-acknowledge-button { width:100%; max-width:320px; min-height:46px; padding:12px 20px; border:1px solid var(--green-line); border-radius:12px; background:var(--green-soft); color:var(--green); font:inherit; font-size:14px; font-weight:500; cursor:pointer; }
.dialog-acknowledge-button:hover { border-color:var(--green); }
.dialog-acknowledge-button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
@media(max-width:600px) { .dialog-acknowledge { margin-top:20px; } .dialog-acknowledge-button { max-width:none; min-height:48px; } }

.privacy-summary { color:var(--ink); font-size:13px; line-height:1.85; }
.privacy-summary h3 { font-size:14px; font-weight:600; margin:20px 0 6px; }
.privacy-summary p { margin:0; color:var(--muted); }
.privacy-summary a { color:var(--green); text-decoration:underline; text-underline-offset:3px; }
.sponsorship-content { text-align:center; }
.sponsorship-symbol { display:grid; place-items:center; width:44px; height:44px; margin:2px auto 16px; border-radius:15px; color:var(--green); background:var(--green-soft); }
.sponsorship-symbol .icon { width:22px; height:22px; }
.sponsorship-message { margin:0 auto 22px; max-width:330px; color:var(--muted); font-size:14px; line-height:1.8; white-space:pre-line; }
.sponsorship-qr { width:min(264px,100%); padding:16px; margin:auto; border:1px solid var(--line); border-radius:18px; background:#fff; }
.sponsorship-qr img { display:block; width:100%; height:232px; object-fit:contain; user-select:auto; -webkit-touch-callout:default; }
.sponsorship-qr-help { margin:14px 0 0; font-size:12px; color:var(--muted); }
.sponsorship-note { margin:24px 0 0; padding-top:18px; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
