.ui-icon { display: inline-block; inline-size: 1.25rem; block-size: 1.25rem; vertical-align: -.22em; flex: none; }
.home-nav { isolation: isolate; background: var(--bg-card); }
.home-nav a { position: relative; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav-symbol { display: grid; place-items: center; flex: none; }
.home-nav[data-marker]::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 auto auto 0;
  inline-size: var(--marker-width);
  block-size: var(--marker-height);
  transform: translate(var(--marker-x), var(--marker-y));
  border: 1px solid var(--line-control);
  border-radius: var(--nav-item-radius);
  background: var(--mint);
  pointer-events: none;
  box-sizing: border-box;
}
.home-nav[data-marker] a[aria-current="page"] { background: transparent; border-color: transparent; }
@media (max-width: 1023px) {
  :root { --tab-height: 56px; }
  .home-nav { --nav-item-radius: .75rem; gap: .16rem; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); background: #fffefaf5; }
  .home-nav a { padding-inline: 0; font-size: clamp(.64rem, 3vw, .73rem); }
  .home-nav .nav-caption { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-nav .nav-symbol { inline-size: 1.85rem; block-size: 1.85rem; border-radius: .67rem; }
  .home-nav .nav-icon { inline-size: 1.23rem; block-size: 1.23rem; }
  .home-nav [data-home-panel="hoy"] .nav-symbol { color: var(--forest); background: var(--mint); }
  .home-nav [data-home-panel="hoy"][aria-current="page"] .nav-symbol { color: #fffefa; background: var(--forest); }
}
@media (hover: none), (pointer: coarse) {
  #keyboard-hint { display: none !important; }
}
html[data-touch-device] #keyboard-hint { display: none !important; }
.studio-panel { max-width: 69rem; }
.studio-feature {
  isolation: isolate;
  display: grid;
  gap: 1rem;
  align-items: center;
  color: #fffefa;
  background: radial-gradient(ellipse at 100% 0, #396653, transparent 67%), #153d32;
  border-color: #214738;
}
.studio-feature p { max-width: 41ch; color: #e6eee5; }
.studio-feature .btn-primary { background: #fffefa; color: var(--forest); width: auto; max-width: 100%; }
.studio-feature .btn-primary:hover { background: var(--mint); }
.studio-art {
  display: grid;
  place-items: center;
  position: relative;
  justify-self: center;
  width: clamp(3.5rem, 12vw, 7rem);
  aspect-ratio: 1;
  color: #f4c3ae;
  border-radius: 25%;
  border: 1px solid #ffffff42;
  background: #ffffff14;
}
.studio-art .ui-icon { width: 54%; height: 54%; }
.studio-trace { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .7; }
.studio-settings-link, .streak-more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 660; }
.studio-lock { max-width: 35rem; }
body[data-plan-access="true"] .studio-lock { display: none; }
.studio-lock-icon, .streak-emblem {
  display: grid;
  place-items: center;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: .85rem;
  background: #ebdcd0;
  color: #713e2b;
  margin-bottom: .7rem;
}
.progress-bars { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.progress-bars rect { transform-box: fill-box; transform-origin: center bottom; }
.progress-bars rect:first-child { opacity: .52; }
.progress-bars rect:nth-child(2) { opacity: .74; }
.streak-preview { position: relative; }
.streak-preview .ui-icon { width: 1.65rem; height: 1.65rem; }
.streak-preview::before, .streak-preview::after {
  content: '';
  position: absolute;
  inline-size: .24rem;
  block-size: .24rem;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}
.streak-preview::before { inset: .7rem .7rem auto auto; }
.streak-preview::after { inset: auto auto .75rem .62rem; }
.streak-page-grid { display: grid; gap: .85rem; }
#streak-panel { --dashboard-radius: var(--radius); }
#streak-panel #habit-calendar-slot { margin-top: 0; }
#streak-panel #habit-calendar-slot:empty { display: none; }
.streak-week > #streak-calendar-title + .streak-number {
  margin-bottom: .45rem;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
}
.streak-marker .ui-icon { display: block; width: .8em; height: .8em; }
.streak-legend .ui-icon { width: .95rem; height: .95rem; }
.streak-battery .ui-icon { margin-inline-end: .35rem; }
.battery-card { background: #fbede4; }
.battery-cells { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-block: .9rem; }
.battery-cell { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; gap: .15rem; min-width: 0; padding: .7rem .2rem; border-radius: .8rem; border: 1px solid var(--line-control); background: var(--bg-card); font-size: .875rem; overflow-wrap: anywhere; }
.battery-cell[data-charged="true"] { color: #fffefa; background: var(--forest); border-color: var(--forest); }
.battery-cell .ui-icon { width: clamp(1.6rem, 6vw, 2.65rem); height: auto; }
.battery-meter { margin-bottom: .65rem; }
.battery-card .streak-caption { margin-top: .55rem; }
.streak-result[data-event^="battery"] { background: #f8e8db; color: #6d3527; }
.streak-burst {
  position: relative;
  display: inline-grid;
  place-items: center;
  inline-size: 1.5em;
  block-size: 1.5em;
  vertical-align: middle;
  margin-inline-end: .4em;
  border-radius: 50%;
  background: #ffffffa6;
}
.streak-burst .ui-icon { width: 1em; height: 1em; }
#view-result .result-status .ui-icon { width: 1rem; height: 1rem; }
.reference-back .ui-icon { width: 1rem; height: 1rem; }
@media (min-width: 540px) { .studio-feature { grid-template-columns: minmax(0,1fr) auto; padding: clamp(1.4rem, 4vw, 2.5rem); } }
@media (min-width: 740px) { .streak-page-grid { grid-template-columns: minmax(0,1.2fr) minmax(0,.85fr); } }
@media (prefers-reduced-motion: no-preference) {
  .home-nav[data-marker]::before {
    transition: transform 490ms cubic-bezier(.25,.8,.22,1), inline-size 425ms ease-out, block-size 425ms ease-out;
  }
  .home-nav .nav-symbol { transition: transform 180ms ease-out, background-color 220ms ease-out, color 170ms ease-out; }
  .home-nav a:active .nav-symbol { transform: translateY(2px) scale(.83); }
  .home-nav a[aria-current="page"] .nav-icon { animation: nav-lift 600ms cubic-bezier(.2,.7,.25,1); }
  .home-nav [data-home-panel="practicar"][aria-current="page"] .nav-icon { animation-name: nav-write; }
  .home-nav [data-home-panel="progreso"][aria-current="page"] .nav-icon { animation-name: nav-chart; }
  .home-nav [data-home-panel="racha"][aria-current="page"] .nav-icon { animation-name: nav-flame; }
  .home-nav [data-home-panel="ajustes"][aria-current="page"] .nav-icon { animation-name: nav-gear; }
  .studio-art { animation: studio-art-in 640ms cubic-bezier(.18,.77,.25,1.08); }
  .studio-art .ui-icon { animation: nav-write 760ms ease-out 120ms both; }
  .studio-trace path { stroke-dasharray: 1 1; animation: studio-draw 720ms ease-out 140ms both; }
  .progress-bars rect { animation: bars-rise 580ms cubic-bezier(.23,.78,.29,1) both; }
  .progress-bars rect:nth-child(2) { animation-delay: 90ms; }
  .progress-bars rect:nth-child(3) { animation-delay: 180ms; }
  .streak-preview .ui-icon { animation: nav-flame 730ms ease-out 100ms both; }
  .streak-preview::before { animation: ember-in 720ms ease-out 130ms both; }
  .streak-preview::after { animation: ember-in 680ms ease-out 230ms both; }
  #streak-panel:not([hidden]) .streak-day {
    animation: streak-day-in 260ms cubic-bezier(.2,.75,.26,1) calc(25ms + var(--week-index, 0) * 25ms) both;
  }
  #streak-panel:not([hidden]) .streak-emblem .ui-icon { animation: nav-lift 380ms ease-out; }
  .battery-cell[data-charged="true"]::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(125deg, transparent 28%, #f8e8db42 50%, transparent 72%);
    opacity: 0;
    animation: charge-sweep 560ms ease-out 50ms;
  }
  .battery-cell[data-charged="true"]:nth-child(2)::after { animation-delay: 150ms; }
  .streak-result[data-celebrate="true"] .streak-burst { animation: streak-emblem-in 460ms cubic-bezier(.18,.8,.25,1) both; }
  .streak-result[data-celebrate="true"] .streak-burst::before,
  .streak-result[data-event="battery-combo"] .streak-burst::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: streak-ripple 470ms ease-out 100ms;
  }
  .streak-result[data-event="battery-combo"] .streak-burst::after { animation-delay: 200ms; }
  .streak-result[data-event="battery-protected"] .streak-burst { animation-name: streak-shield-in; }
  .streak-result:is([data-event="battery-recharged"], [data-event="battery-combo"]) .streak-burst { animation-name: streak-charge-in; }
  @keyframes nav-lift {
    0% { opacity: .7; transform: translateY(4px) scale(.75); }
    42% { transform: translateY(-5px) scale(1.18); }
    70% { transform: translateY(1px) scale(.95); }
    100% { opacity: 1; transform: none; }
  }
  @keyframes nav-write { 0% { transform: translate(-4px, 3px) rotate(-19deg) scale(.8); } 56% { transform: translate(2px,-2px) rotate(8deg) scale(1.13); } 100% { transform: none; } }
  @keyframes nav-chart { 0% { transform: translateY(5px) scaleY(.55); opacity: .65; } 56% { transform: translateY(-2px) scaleY(1.22); } 100% { transform: none; opacity: 1; } }
  @keyframes nav-flame { 0% { transform: translateY(3px) scale(.68); opacity: .6; } 50% { transform: translateY(-3px) rotate(-8deg) scale(1.18); } 74% { transform: rotate(4deg) scale(.98); } 100% { transform: none; opacity: 1; } }
  @keyframes nav-gear { 0% { transform: rotate(-48deg) scale(.8); } 66% { transform: rotate(10deg) scale(1.1); } 100% { transform: none; } }
  @keyframes studio-art-in {
    from { opacity: .45; transform: translateY(8px) rotate(-9deg) scale(.84); }
    to { opacity: 1; transform: none; }
  }
  @keyframes studio-draw { from { stroke-dashoffset: 1.01; } to { stroke-dashoffset: 0; } }
  @keyframes bars-rise { 0% { transform: scaleY(.12); } 68% { transform: scaleY(1.08); } 100% { transform: none; } }
  @keyframes ember-in { 0% { opacity: 0; transform: translateY(7px) scale(.2); } 60% { opacity: .8; transform: translateY(-2px) scale(1.4); } }
  @keyframes streak-day-in { from { opacity: .65; transform: translateY(5px) scale(.92); } }
  @keyframes charge-sweep { 0% { opacity: 0; translate: -75% 0; } 40% { opacity: 1; } 100% { opacity: 0; translate: 85% 0; } }
  @keyframes streak-emblem-in { 0% { opacity: .5; transform: translateY(4px) scale(.72); } 55% { transform: translateY(-2px) scale(1.13); } }
  @keyframes streak-shield-in { 0% { opacity: .5; transform: scale(.72) rotate(-16deg); } 65% { transform: scale(1.08) rotate(2deg); } }
  @keyframes streak-charge-in { 0% { opacity: .5; transform: scale(.76); } 45% { transform: scale(1.2); } 72% { transform: scale(.97); } }
  @keyframes streak-ripple { from { opacity: .58; scale: .83; } to { opacity: 0; scale: 1.62; } }
}
details > summary:has(> .ui-icon) { display: flex; align-items: center; justify-content: space-between; gap: .6rem; list-style: none; }
details > summary:has(> .ui-icon)::-webkit-details-marker { display: none; }
details > summary > .ui-icon { color: var(--coral); }
details[open] > summary > .ui-icon { rotate: 180deg; }
.exercise-audio button .ui-icon { width: 1rem; height: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  details > summary > .ui-icon { transition: rotate 190ms ease-out; }
}
