/* Navigation and personal library share the calculator's type, color and spacing. */
.optional-label { margin-left: 5px; font-size: 12px; font-weight: 400; color: #747c8a; }
body .target-card #target-apartment-search { padding-left: 44px; padding-right: 16px; }
body .target-card #target-apartment-search:disabled { background: #edf0f4; border-color: #c2c8d1; }
.header-inner { max-width: 1200px; gap: 24px; }
.desktop-tabs { display: flex; align-self: stretch; align-items: center; gap: 6px; margin: 0 auto; }
.desktop-tabs a { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 16px; border-radius: 12px; color: #667080; text-decoration: none; white-space: nowrap; font-size: 15px; font-weight: 600; transition: background .15s, color .15s; }
.desktop-tabs a:hover { background: #f5f2fc; color: #6041c4; }
.desktop-tabs a.active { background: #f0ebfc; color: #6041c4; }
.desktop-tabs .icon { width: 21px; height: 21px; }
.nav-count { min-width: 21px; height: 21px; display: grid; place-items: center; padding: 0 5px; border-radius: 7px; font-size: 11px; background: #7658df; color: #fff; }
.header-actions { gap: 8px; flex-wrap: nowrap; }
.header-actions .save-pill { display: none; }
.account-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 15px; background: #fff; border: 1px solid #dce0e6; border-radius: 12px; color: #46505f; font-size: 14px; font-weight: 600; cursor: pointer; }
.account-button .google-logo { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.account-button span { white-space: nowrap; }
.account-button.signed-in span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.account-button:hover { background: #fff; border-color: #aeb5c0; }
.account-button.signed-in { background: #f2edff; color: #6041c4; border-color: #d9cff2; }
.header-actions .guide-button { font-size: 13px; }
.mobile-tabs { display: none; }
.sync-notice { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 12px 18px; border: 1px solid #d8cfee; border-radius: 12px; background: #f5f1fd; color: #6041c4; font-size: 14px; }
.sync-notice p { flex: 1; margin: 0; }
.sync-notice > .icon { width: 20px; height: 20px; flex-shrink: 0; }
.sync-notice .text-button { white-space: nowrap; }
.sync-error { background: #fff6ea; border-color: #ecd9b9; color: #785423; }
body[data-view="funds"] .page-intro { padding-top: 32px; }
body[data-view="funds"] .hero-art { opacity: .85; }
.funds-next { margin-top: 24px; display: flex; justify-content: flex-end; }
.funds-next .primary-button { display: flex; align-items: center; gap: 16px; padding: 13px 22px; min-height: 48px; text-decoration: none; font-size: 15px; white-space: nowrap; }
.recap-actions { display: flex; gap: 8px; }
.recap-actions [data-save-property] { display: inline-flex; gap: 7px; align-items: center; color: #6041c4; }
.recap-actions .icon { width: 18px; height: 18px; }
.result-header-actions { display: flex; align-items: center; gap: 8px; }
.result-header-actions [data-save-property] { display: inline-flex; align-items: center; gap: 7px; color: #6041c4; }
.result-header-actions [data-save-property] .icon { width: 18px; height: 18px; }
.properties-intro { display: flex; align-items: center; justify-content: space-between; padding-top: 36px; gap: 24px; }
.properties-intro h1 { display: flex; align-items: center; }
.properties-total { display: inline-grid; place-items: center; min-width: 29px; height: 29px; padding: 0 7px; margin-left: 13px; color: #7658df; background: #eae3fa; border-radius: 10px; font-size: 15px; font-weight: 650; }
.properties-intro > .secondary-button { display: flex; align-items: center; justify-content: center; gap: 7px; background: #fff; white-space: nowrap; text-decoration: none; }
.properties-intro > .secondary-button .icon { width: 18px; height: 18px; }
.properties-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 24px; }
.property-filters { display: flex; gap: 6px; }
.property-filters button { min-width: 62px; min-height: 42px; padding: 9px 16px; background: transparent; border: 1px solid transparent; border-radius: 11px; color: #667080; font-size: 14px; font-weight: 600; cursor: pointer; }
.property-filters button.active { background: #7658df; color: #fff; }
.property-filters button:hover:not(.active) { background: #e9e7ef; }
.property-sort-label select { min-height: 44px; max-width: 140px; border: 0; background: transparent; color: #596273; padding: 10px 2px 10px 10px; font-size: 13px; cursor: pointer; }
.properties-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.property-card { min-width: 0; padding: 24px; border: 1px solid #e1e4e9; border-radius: 16px; background: #fff; }
.property-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.property-home-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #7658df; background: #f1ecfc; }
.property-home-icon .icon { width: 24px; height: 24px; }
.property-rent-badge { padding: 4px 10px; border-radius: 7px; color: #7055b6; background: #f1ecfc; font-size: 12px; font-weight: 600; }
.property-rent-badge.monthly { background: #ebf5ef; color: #48765f; }
.property-card-controls { display: flex; margin-left: auto; }
.property-card h2 { font-size: 21px; line-height: 1.45; letter-spacing: -.035em; font-weight: 700; margin: 0 0 8px; overflow-wrap: anywhere; }
.property-address { color: #5d6574; font-size: 14px; line-height: 1.65; margin: 0; }
.property-location { color: #777e8b; font-size: 12px; line-height: 1.7; margin: 3px 0 0; }
.property-deposit { display: flex; flex-wrap: wrap; gap: 5px 20px; padding: 18px 0; margin-top: 4px; font-size: 13px; color: #6d7482; border-bottom: 1px solid #edf0f3; }
.property-deposit strong { color: #3f4757; margin-left: 7px; font-size: 14px; font-weight: 650; }
.property-monthly { margin-top: 18px; padding: 18px 20px; background: #f7f5fc; border-radius: 14px; }
.property-monthly > span { display: block; color: #78678d; font-size: 12px; }
.property-monthly > strong { display: block; margin: 5px 0 0; color: #6041c4; font-size: 28px; line-height: 1.3; font-weight: 700; letter-spacing: -.035em; }
.property-monthly small { display: block; color: #8a7c99; font-size: 11px; margin-top: 7px; }
.property-memo { margin: 18px 0 0; font-size: 14px; color: #5c6573; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.property-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 14px; margin-top: 16px; border-top: 1px solid #edf0f3; }
.property-card-bottom > span { color: #8a8f9a; font-size: 12px; }
.property-recalculate { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0 8px 12px; background: none; border: 0; color: #6041c4; font-size: 14px; font-weight: 650; cursor: pointer; }
.property-recalculate .icon { width: 18px; height: 18px; }
.properties-empty { display: flex; align-items: center; flex-direction: column; text-align: center; background: #fff; border: 1px solid #e1e4e9; border-radius: 16px; padding: 36px 24px; }
.properties-empty h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.properties-empty p { margin: 10px 0 0; color: #77808e; font-size: 14px; line-height: 1.8; white-space: pre-line; }
.property-estimate-note { color: #7b828e; font-size: 12px; line-height: 1.8; margin: 24px 0 0; }
.dialog-kicker { color: #87759e; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.guide-dialog.account-dialog { width: min(406px, calc(100% - 32px)); max-width: 406px; padding: 28px; text-align: center; }
#account-guest { display: grid; gap: 12px; }
.account-dialog .dialog-copy { font-size: 14px; line-height: 1.6; margin: 0 0 18px; overflow-wrap: anywhere; }
#google-button { display: flex; align-items: center; justify-content: center; min-height: 40px; text-align: center; }
.google-loading-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 16px; border: 1px solid #dadce0; border-radius: 24px; background: #fff; color: #3c4043; font: inherit; font-size: 14px; }
.google-loading-button .google-logo { width: 18px; height: 18px; }
.account-dialog .continue-guest, .account-dialog #logout-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border-radius: 24px; font-size: 14px; line-height: 20px; text-align: center; }
.account-login-status { margin: 0; color: #6b6179; font-size: 13px; line-height: 1.7; }
#property-dialog textarea { width: 100%; border: 1px solid #8792a2; padding: 13px 16px; border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; min-height: 104px; line-height: 1.7; background: #fff; color: #20232b; }
#property-dialog .field-label small { margin-left: 4px; color: #85818d; font-size: 12px; font-weight: 400; }
#property-dialog .input-wrap input { padding-right: 16px; }
.property-save-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; }
.delete-property-actions { display: flex; gap: 12px; margin-top: 28px; }
.delete-property-actions button { flex: 1; }
.danger-button { background: #aa3b4d; }
#sync-conflict-dialog .primary-button { padding: 13px 18px; font-size: 14px; }
@media (max-width: 1000px) {
  .header-inner { gap: 12px; }
  .desktop-tabs { gap: 0; }
  .desktop-tabs a { padding: 12px; font-size: 14px; }
  .header-actions .guide-button { display: none; }
}
@media (max-width: 760px) {
  .desktop-tabs { display: none; }
  .header-inner { justify-content: space-between; padding-left: 24px; padding-right: 24px; }
  .header-actions { margin-left: auto; }
  .header-actions .guide-button { display: inline-flex; }
  .mobile-tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 7px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); background: rgb(255 255 255 / 96%); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid #e6e4ec; box-shadow: 0 -4px 24px #30204205; }
  .mobile-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 4px; color: #81828d; text-decoration: none; font-size: 11px; font-weight: 500; }
  .tab-icon { position: relative; display: grid; place-items: center; min-width: 54px; height: 30px; border-radius: 12px; }
  .mobile-tabs .icon { width: 23px; height: 23px; stroke-width: 1.7; }
  .mobile-tabs a.active { color: #6949cb; font-weight: 650; }
  .mobile-tabs a.active .tab-icon { background: #f0eafd; }
  .tab-badge { position: absolute; top: -1px; right: 2px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 6px; background: #7658df; color: #fff; font-size: 9px; line-height: 1; border: 2px solid #fff; box-sizing: content-box; }
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 70; }
  .funds-next { flex-direction: column; align-items: stretch; }
  .funds-next .primary-button { justify-content: center; }
  .properties-grid { grid-template-columns: 1fr; gap: 18px; }
  .properties-intro { padding-top: 30px; gap: 12px; }
  .properties-intro > .secondary-button { align-self: flex-start; margin-top: 22px; font-size: 12px; padding: 9px 12px; }
  .properties-intro .intro-description { font-size: 14px; }
  .properties-intro h1 { font-size: 29px; }
  .properties-intro .properties-total { font-size: 13px; }
  .properties-toolbar { margin-top: 0; margin-bottom: 18px; }
  .property-card { padding: 22px; }
  .property-monthly > strong { font-size: 27px; }
  .properties-empty { padding: 30px 20px 36px; border-radius: 20px; }
  .properties-empty h2 { font-size: 20px; }
  .sync-notice { flex-wrap: wrap; gap: 8px; padding: 12px 14px; font-size: 13px; }
  .sync-notice p { min-width: 160px; }
  .sync-notice .text-button { padding: 5px 10px; }
}
@media (max-width: 430px) {
  .header-inner { padding-left: 20px; padding-right: 20px; }
  .account-button { padding: 9px 12px; font-size: 12px; }
  .header-actions .guide-button { display: none; }
  .result-intro { flex-wrap: wrap; }
  .result-header-actions { width: 100%; }
  .result-header-actions > button { flex: 1; justify-content: center; }
  .recap-actions { width: 100%; justify-content: flex-end; }
  .property-filters { gap: 2px; }
  .property-filters button { min-width: 54px; padding: 9px 12px; }
  .property-sort-label select { font-size: 12px; }
}

/* Keep one task in view; explanations stay close to the relevant input. */
#target-page { max-width: 760px; margin: 0 auto; }
.target-layout { grid-template-columns: minmax(0,1fr); gap: 14px; }
.target-card { padding: 28px; border-radius: 16px; }
.target-aside { padding: 0; background: none; border: 0; border-radius: 0; }
.target-aside .data-note { font-size: 12px; color: #7b828e; justify-content: center; }
.target-aside .status-dot { display: none; }
.target-rent-type legend, .target-field-heading h2 { font-size: 16px; }
.target-field-heading { margin: 24px 0 12px; padding-top: 24px; }
.location-fields { --location-control-color: #6b7684; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 14px; }
body .target-card .location-fields select,
body .target-card .location-fields .input-wrap input {
  color: var(--location-control-color);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}
body .target-card .location-fields .input-wrap input::placeholder {
  color: var(--location-control-color);
  font: inherit;
  opacity: 1;
}
body .target-card .location-fields select:disabled,
body .target-card .location-fields .input-wrap input:disabled {
  color: var(--location-control-color);
  -webkit-text-fill-color: var(--location-control-color);
  opacity: 1;
}
.apartment-picker { grid-column: 1 / -1; }
.apartment-picker .input-wrap { margin-bottom: 10px; }
.apartment-search > .icon { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; color: var(--location-control-color); transform: translateY(-50%); pointer-events: none; }
.target-money { margin-top: 20px; }
.rent-buttons label > span { min-height: 48px; padding: 12px 16px; }
.rent-buttons input:checked + span { padding: 11px 15px; }
.page-intro { padding-top: 32px; padding-bottom: 24px; }
.page-intro h1 { font-size: 30px; }
.page-intro .intro-description { font-size: 15px; margin-top: 8px; }
.step-nav { margin-top: 20px; margin-bottom: 0; }
.ammo-summary { display: block; min-height: 0; border: 1px solid #e1e4e9; border-radius: 16px; background: #fff; }
.summary-content { padding: 24px 28px; }
.summary-content .total { margin-top: 6px; font-size: 44px; }
.composition-bar { max-width: none; width: 100%; }
.collection-panel { border-radius: 16px; }
.empty-state { min-height: 90px; padding: 20px; }
.empty-state p { margin: 0; }
.dialog-heading > .icon-button { margin-left: auto; }
.account-dialog h2 { font-size: 24px; }
.account-dialog .dialog-copy { margin-bottom: 16px; }
.legal-footer button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .target-card { padding: 22px 20px; }
  .location-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
  .location-fields .city-field { grid-column: 1 / -1; }
  .summary-content { padding: 22px; }
  .summary-content .total { font-size: 38px; }
  .page-intro h1 { font-size: 28px; }
}

.apartment-status:empty { display: none; }
