/* Shared component states and motion primitives. */
button,a,summary{ -webkit-tap-highlight-color:transparent }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid #57b89f;
  outline-offset:3px;
}
button,.button-primary,.button-soft,.button-quiet,.button-danger,.go{
  min-height:44px;
  transition:transform var(--motion-fast) var(--ease),background-color var(--motion-fast) ease,border-color var(--motion-fast) ease,box-shadow var(--motion-fast) ease;
}
.button-primary,.go{
  position:relative;
  overflow:hidden;
  background:var(--grad);
  border:1px solid transparent;
  color:#fff;
  box-shadow:0 8px 20px -10px rgba(13,81,78,.75),inset 0 1px 0 #ffffff35;
}
.button-primary:hover,.go:hover{filter:none;transform:translateY(-1px)}
.button-primary:active,.go:active{transform:scale(.985)}
.button-primary:disabled,.button-soft:disabled,.button-quiet:disabled,.button-danger:disabled{filter:none;opacity:.5}
.button-soft{background:var(--accent-soft);border-color:var(--line);color:var(--accent-strong)}
.button-quiet{border:1px solid var(--line);color:var(--ink)}
.button-danger{background:var(--danger-soft);border:1px solid color-mix(in srgb,var(--danger) 30%,var(--line));color:var(--danger)}
.sm{min-height:44px;padding:8px 12px}
.theme-toggle{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  margin-left:12px;
  padding:0;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  color:var(--accent-strong);
}
.theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-sun{display:none}
:root[data-theme-effective="dark"] .theme-icon-moon{display:none}
:root[data-theme-effective="dark"] .theme-icon-sun{display:block}
.panel,.card-surface,.tile,.ex,.pf-card,.consultation-card,.chart-card{
  border-radius:var(--radius);
  border-color:var(--line);
}
.panel{transition:box-shadow var(--motion-base) var(--ease),border-color var(--motion-base) ease}
.badge,.pill-label{
  background:var(--accent-soft);
  color:var(--accent-strong);
  border:1px solid color-mix(in srgb,var(--accent) 10%,transparent);
}
.badge.warn{background:var(--warning-soft);color:var(--warning)}
.badge.neutral{background:var(--surface-strong);color:var(--muted)}
.pf-cycle{background:var(--surface-strong);border:1px solid var(--line)}
.pf-cycle button{min-height:44px;border-radius:12px}
.pf-cycle button[aria-selected="true"]{background:var(--surface);color:var(--accent-strong);box-shadow:var(--shadow-sm)}
.pf-item.locked,.feature-item.off,[data-pf-lock]{
  position:relative;
  cursor:pointer;
  transition:background-color var(--motion-fast) ease,border-color var(--motion-fast) ease;
}
.pf-item.locked:hover,.feature-item.off:hover,[data-pf-lock]:hover{background-color:var(--surface-soft)}
.pf-item.locked:active .pf-mark,.feature-item.off:active .check{animation:pmLockWiggle 360ms ease}
@keyframes pmLockWiggle{25%{transform:rotate(-12deg)}70%{transform:rotate(10deg)}}
.nav-locked{opacity:.62}
.pm-dialog-panel,.pm-toast,.modal .card{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow)}
.pm-dialog-panel{border-radius:24px}
.pm-dialog-primary{background:var(--grad)}
.pm-toast{border-radius:16px}
.modal .card{border-radius:24px}
.pm-skeleton{
  position:relative;
  overflow:hidden;
  min-height:14px;
  border-radius:8px;
  background:var(--surface-strong);
  color:transparent!important;
}
.pm-skeleton::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
  animation:pmSkeletonBreath 1.8s ease-in-out infinite;
}
@keyframes pmSkeletonBreath{50%{opacity:.35}}
.pm-ring,.pm-meter{
  --meter-value:0%;
  --meter-track:var(--surface-strong);
  --meter-fill:var(--accent);
  display:grid;
  place-items:center;
  position:relative;
  width:76px;
  aspect-ratio:1;
  border-radius:50%;
  background:conic-gradient(from -90deg,var(--meter-fill) 0 var(--meter-value),var(--meter-track) var(--meter-value) 100%);
}
.pm-ring::before,.pm-meter::before{
  content:"";
  position:absolute;
  inset:7px;
  border-radius:inherit;
  background:var(--surface);
}
.pm-ring>* ,.pm-meter>*{position:relative;z-index:1}
.loading-state .loader{border-color:var(--surface-strong);border-top-color:var(--accent)}
.empty-state{border:1px dashed var(--line);border-radius:var(--radius)}
@media(prefers-reduced-motion:reduce){.pm-skeleton::after{animation:none}}
@media(max-width:940px){.theme-toggle{margin-left:0}}
