* { box-sizing: border-box; }
.v-member { margin: 0; background: var(--vaya-sand); min-height: 100dvh; line-height: 1.5; }
.v-member h1, .v-member h2, .v-member h3, .v-member p { margin: 0; }
.v-member h1, .v-member h2, .mp-stat strong { font-family: var(--vaya-serif); font-weight: 400; }
.v-member h1 { font-size: clamp(2.7rem, 5vw, 4.3rem); line-height: .98; letter-spacing: -.025em; }
.v-member h2 { font-size: 2rem; line-height: 1.05; }
.v-member h3 { font-size: .97rem; font-weight: 700; }
.v-member a { color: var(--vaya-accent); }
.v-member button, .v-member input, .v-member select, .v-member textarea { font: inherit; }
.mp-skip { position: fixed; z-index: 100; left: 12px; top: 12px; transform: translateY(-150%); background: white; padding: 12px; }
.mp-skip:focus { transform: none; }
.mp-sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 32px 18px 20px; background: var(--vaya-paper); border-right: 1px solid var(--vaya-line); overflow: auto; display: flex; flex-direction: column; }
.mp-brand { display: inline-flex; min-height: 44px; align-items: center; }
.mp-brand img { display: block; object-fit: contain; object-position: left center; }
.mp-sidebar .mp-brand { margin: 0 14px 30px; }
#sidebar { display: grid; gap: 4px; }
.mp-sidebar-install { margin-top: auto; }
.mp-nav, .mp-avatar, .mp-icon-button { cursor: pointer; color: var(--vaya-ink); background: transparent; border: 0; }
.mp-nav { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 14px; border-radius: 14px; text-align: left; font-weight: 600; }
.mp-nav:hover, .mp-nav[aria-current="page"] { background: var(--vaya-sage); }
.mp-nav svg, .mp-button svg, .mp-quick svg { width: 22px; height: 22px; flex: none; }
.mp-shell { margin-left: 230px; padding: 18px 32px 50px; }
.mp-top, #view { max-width: 1080px; margin-inline: auto; }
.mp-top { min-height: 52px; display: flex; align-items: center; justify-content: flex-end; margin-bottom: 22px; }
.mp-top .mp-brand { display: none; }
.mp-avatar { min-width: 44px; min-height: 44px; border-radius: 100%; background: var(--vaya-sage); font-weight: 700; border: 1px solid var(--vaya-line); }
.mp-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.mp-heading p { margin-top: 8px; color: var(--vaya-muted); }
.mp-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 16px 0; align-items: start; }
.mp-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.mp-card { min-width: 0; border: 1px solid var(--vaya-line); border-radius: var(--vaya-radius); padding: 23px; background: var(--vaya-paper); }
.mp-card > p:not(:first-child), .mp-card > form, .mp-card > .mp-button, .mp-card > .mp-list { margin-top: 12px; }
.mp-card--sage { background: var(--vaya-sage); }
.mp-card--dark { background: var(--vaya-accent-dark); color: #fffdfa; border-color: transparent; }
.mp-card--dark .mp-muted { color: #ccdcd0; }
.mp-stat { display: grid; gap: 2px; }
.mp-stat strong { font-size: clamp(2.1rem,4vw,3.1rem); line-height: 1; overflow-wrap: anywhere; }
.mp-stat span, .mp-muted { color: var(--vaya-muted); font-size: .89rem; }
.mp-card--dark .mp-stat span { color: #ccdcd0; }
.mp-button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; border: 1px solid var(--vaya-accent); background: var(--vaya-accent); color: white; border-radius: 999px; padding: 8px 17px; font-size: .93rem; font-weight: 700; text-decoration: none; cursor: pointer; gap: 7px; }
a.mp-button { color: white; }
.mp-button--quiet, a.mp-button--quiet { border-color: var(--vaya-line); color: var(--vaya-accent); background: var(--vaya-paper); }
.mp-button--danger { color: var(--vaya-error); background: white; border-color: #e0b7b0; }
.mp-button:disabled { opacity: .55; cursor: default; }
.mp-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.mp-heading .mp-buttons { margin: 0; }
.mp-quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.mp-quick { min-height: 75px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 7px; color: var(--vaya-accent); text-align: left; border: 1px solid var(--vaya-line); border-radius: 17px; background: var(--vaya-paper); cursor: pointer; padding: 12px; font-weight: 700; }
.mp-quick:hover { background: var(--vaya-sage); }
.mp-list { display: grid; }
.mp-event { padding: 13px 0; border-bottom: 1px solid var(--vaya-line); display: flex; gap: 10px; align-items: center; justify-content: space-between; overflow-wrap: anywhere; min-width: 0; }
.mp-event:last-child { border-bottom: 0; }
.mp-event > div { min-width: 0; }
.mp-event time, .mp-event small { display: block; color: var(--vaya-muted); }
.mp-event .mp-icon-button { flex: none; }
.mp-icon-button { min-width: 44px; min-height: 44px; border-radius: 50%; font-size: 1.35rem; }
.mp-icon-button:hover { background: var(--vaya-sage); }
.mp-chart { display: block; color: inherit; width: 100%; height: auto; min-height: 110px; margin-top: 11px; }
.mp-chart .grid { stroke: currentColor; opacity: .2; }
.mp-chart .trend { stroke: currentColor; opacity: .58; stroke-dasharray: 5 4; }
.mp-chart text { fill: currentColor; font-size: 12px; font-family: var(--vaya-sans); }
.mp-chart .chart-data { stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.mp-chart circle, .mp-chart rect { fill: currentColor; }
.mp-card--dark .mp-chart { color: #c3e4c9; }
.mp-day { display: flex; gap: 7px; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.mp-day label { display: grid; gap: 3px; }
.mp-pill-bar { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.mp-pill-bar .mp-button[aria-pressed=true] { background: var(--vaya-accent); color: white; }
.mp-target { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 8px 0; font-size: .91rem; }
.v-member progress { width: 100%; height: 8px; accent-color: #37694e; }
.mp-target progress { grid-column: 1/-1; }
.mp-setup { margin-block: 16px; }
.mp-setup progress { margin: 12px 0; }
.mp-setup .mp-nav { margin: 3px 0; }
.mp-setup .mp-nav:disabled { opacity: .7; cursor: default; }
.mp-stack { display: grid; gap: 12px; }
.mp-form { display: grid; gap: 13px; }
.mp-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.mp-field { display: grid; min-width: 0; gap: 5px; font-weight: 600; }
.mp-field input:not([type=checkbox]), .mp-field select, .mp-field textarea, .mp-day input { min-height: 46px; border: 1px solid #aebcb0; border-radius: 12px; background: #fff; padding: 9px 11px; color: var(--vaya-ink); width: 100%; font-size: 16px; }
.mp-field textarea { min-height: 86px; resize: vertical; }
.mp-check { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 8px; }
.mp-check input { height: 19px; width: 19px; margin: 4px 0; accent-color: var(--vaya-accent); }
.mp-status { font-size: .9rem; min-height: 1.3em; }
.mp-status[data-error] { color: var(--vaya-error); }
.mp-dialog { border: 1px solid var(--vaya-line); border-radius: 26px; padding: 22px; color: var(--vaya-ink); background: var(--vaya-paper); width: min(560px,calc(100% - 20px)); max-height: min(85dvh,calc(var(--mp-viewport,100dvh) - 24px)); overflow: auto; overscroll-behavior: contain; }
.mp-dialog::backdrop { background: #10251ccc; }
.v-member:has(dialog[open]) { overflow: hidden; }
.mp-sheet-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-estimate { background: var(--vaya-sage); padding: 12px; border-radius: 12px; }
.mp-estimate summary { min-height: 42px; cursor: pointer; font-weight: 700; }
.mp-estimate .mp-form { margin: 7px 0 12px; }
.mp-toast { position: fixed; right: 16px; bottom: 16px; z-index: 100; border-radius: 18px; background: var(--vaya-accent-dark); color: white; padding: 12px 18px; max-width: min(380px,calc(100vw - 32px)); box-shadow: var(--vaya-shadow); }
.mp-bottom { display: none; }
.mp-loading { padding: 18px; }
.mp-resource { display: block; text-decoration: none; }
.mp-resource:hover h2 { text-decoration: underline; }
.mp-chart-table { margin-top: 10px; font-size: .85rem; }
.mp-chart-table summary { cursor: pointer; }
.mp-chart-table ul { max-height: 200px; overflow: auto; }
.v-member #vaya-chat:not(.active):not(.open):not(.is-open) .vaya-chat-trigger { display: none; }

@media(max-width: 920px) {
  .mp-sidebar { width: 177px; }
  .mp-shell { margin-left: 177px; padding-inline: 22px; }
}
@media(max-width: 720px) {
  .mp-sidebar { display: none; }
  .mp-shell { margin: 0; padding: env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); }
  .mp-top { justify-content: space-between; margin-bottom: 16px; }
  .mp-top .mp-brand { display: inline-flex; }
  .mp-heading { margin-bottom: 16px; align-items: start; }
  .mp-heading .mp-buttons { flex-shrink: 0; }
  .mp-heading h1 { font-size: clamp(2.35rem,10vw,3.7rem); }
  .mp-heading p { font-size: .9rem; }
  .mp-grid { grid-template-columns: 1fr; gap: 10px; margin-block: 10px; }
  .mp-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .mp-grid--three .mp-card { padding: 12px 8px; }
  .mp-grid--three .mp-stat span { font-size: .76rem; }
  .mp-grid--three .mp-stat strong { font-size: clamp(1.47rem,6vw,2.1rem); }
  .mp-card { padding: 16px; border-radius: 20px; }
  .mp-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-block: 12px; }
  .mp-quick { flex-direction: row; justify-content: flex-start; align-items: center; min-height: 53px; }
  .mp-bottom { position: fixed; z-index: 10; inset: auto 0 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: center; padding: 5px max(7px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); background: var(--vaya-paper); border-top: 1px solid var(--vaya-line); box-shadow: 0 -5px 20px #172f2612; }
  .mp-bottom .mp-nav { flex-direction: column; justify-content: center; gap: 2px; min-height: 50px; padding: 3px 0; font-size: .69rem; }
  .mp-bottom .mp-nav[data-log] { background: var(--vaya-accent); color: white; border-radius: 16px; }
  .mp-dialog { position: fixed; inset: auto 0 var(--mp-keyboard,0px); width: 100%; max-width: none; margin: 0; padding: 15px max(14px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); border-radius: 22px 22px 0 0; max-height: min(90dvh,calc(var(--mp-viewport,100dvh) - 12px)); }
  .mp-toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .v-member[data-keyboard] .mp-bottom, .v-member:has(dialog[open]) .mp-bottom { visibility: hidden; }
}

.mp-top { gap: 14px; }
.mp-top > a:not(.mp-brand) { display: inline-flex; min-height: 44px; align-items: center; font-size: .9rem; }
.mp-access { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:var(--vaya-sage); border:1px solid var(--vaya-line); border-radius:18px; padding:16px 18px; margin:12px 0; }
.mp-access p { color:var(--vaya-muted); font-size:.93rem; }
a.mp-nav { text-decoration:none; }
@media(max-width:420px){.mp-top{gap:6px}.mp-top .mp-brand img{width:72px}.mp-top>a:not(.mp-brand){font-size:.82rem;}}
