/* Hipocampo 1.7: clear widget hierarchy, editable color and focused motion. */
.app-version {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--ux-accent, #18765f) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ux-accent, #18765f) 9%, transparent);
  color: var(--ux-accent, #18765f);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.setup-identity > div { grid-template-columns: auto max-content; }
.setup-identity > div > span,
.setup-identity > div > small { grid-column: 1 / -1; }
.setup-identity > div > strong { grid-column: 1; }
.setup-identity > div > .app-version { grid-column: 2; grid-row: 2; align-self: center; }

.today-brand .home-version,
.focus-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--ux-accent, #18765f) 42%, transparent);
  border-radius: 999px;
  color: var(--ux-accent, #18765f);
  background: color-mix(in srgb, var(--ux-accent, #18765f) 8%, transparent);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}
.today-brand .home-version { margin-left: 6px; }
.focus-version { margin-left: 7px; border-color: currentColor; color: inherit; background: transparent; }

.ux-v2 .studio-widget {
  --widget-accent: #18765f;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--widget-accent) 48%, var(--line, #d6dfdc)) !important;
  border-top-width: 4px !important;
  background: linear-gradient(145deg, color-mix(in srgb, var(--widget-accent) 10%, var(--panel, #fff)) 0%, var(--panel, #fff) 58%) !important;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--widget-accent) 12%, transparent), 0 2px 5px rgba(15, 31, 25, .08) !important;
}
.ux-v2 .studio-widget:hover,
.ux-v2 .studio-widget:focus-within {
  border-color: color-mix(in srgb, var(--widget-accent) 72%, var(--line, #d6dfdc)) !important;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--widget-accent) 17%, transparent), 0 2px 7px rgba(15, 31, 25, .1) !important;
}
.ux-v2 .studio-widget .panel-kicker,
.ux-v2 .studio-widget .panel-heading span,
.ux-v2 .studio-widget > header > span,
.ux-v2 .studio-widget > span:first-child { color: var(--widget-accent) !important; }

.widget-tray-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 8px; align-items: stretch; }
.widget-tray-row > button { min-width: 0; }
.widget-tray-row > input[type="color"] {
  width: 42px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line, #d6dfdc);
  border-radius: 6px;
  background: var(--panel, #fff);
  cursor: pointer;
}

.dashboard-v14 .secondary-zone-detail > div:not(.multi-clock-list) { min-width: 0; }
.dashboard-v14 .secondary-zone-detail > div:not(.multi-clock-list) > p {
  display: grid !important;
  grid-template-columns: minmax(0, auto) max-content;
  align-items: baseline;
  justify-content: start;
  gap: clamp(7px, 1vw, 14px);
  width: 100%;
  min-width: 0;
  margin: 3px 0 0 !important;
  white-space: nowrap;
}
.dashboard-v14 .secondary-zone-detail #secondaryClockMain {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  line-height: .9;
}
.dashboard-v14 .secondary-zone-detail #secondaryClockSeconds {
  position: static !important;
  align-self: end;
  margin: 0 0 .12em !important;
  color: var(--widget-accent) !important;
  font-size: .46em !important;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.multi-clock-list div { border-left-color: var(--widget-accent) !important; }
.multi-clock-list b { overflow: hidden; font-variant-numeric: tabular-nums; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }

/* Mirrored cutouts had two opaque pixels on one vertical edge. */
.exercise-pose img { clip-path: inset(0 3px 0 3px); }

.exercise-figure.focus-brain {
  position: relative;
  align-self: stretch;
  min-height: min(62vh, 590px);
  overflow: hidden;
  border: 1px solid rgba(118, 220, 231, .28);
  border-radius: 8px;
  background: #02080b;
  box-shadow: 0 22px 70px rgba(0, 113, 142, .2);
}
.focus-cosmic-visual {
  position: absolute;
  inset: -5%;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  animation: cosmic-surge 2.4s cubic-bezier(.42, 0, .58, 1) infinite alternate;
}
.focus-cosmic-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 50%, transparent 0 18%, rgba(0, 0, 0, .46) 72%);
  pointer-events: none;
}
.focus-cosmic-visual img {
  width: 100% !important;
  height: 100%;
  max-height: none !important;
  object-fit: cover;
  filter: saturate(.9) contrast(1.08) !important;
}
@keyframes cosmic-surge {
  0% { transform: scale(1.01) translate3d(-.6%, 0, 0); filter: brightness(.92); }
  100% { transform: scale(1.09) translate3d(.8%, 0, 0); filter: brightness(1.12); }
}

.wellbeing-overlay {
  grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.1fr) !important;
  overflow: hidden;
  background: #050b0e !important;
  color: #f4fbfa !important;
}
.wellbeing-character {
  align-self: stretch;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(109, 213, 226, .24);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 117, 143, .2);
}
.wellbeing-character img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 37% center;
  animation: pause-current 5.5s ease-in-out infinite alternate;
}
@keyframes pause-current { to { transform: scale(1.055); filter: brightness(1.09); } }

.world-headline-copy a { display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; }
.world-headline-copy small { overflow: visible !important; white-space: normal !important; }
.morning-overlay main { overflow: auto !important; }
.morning-overlay main > p:nth-of-type(2) {
  max-width: 66ch !important;
  max-height: 31dvh;
  overflow: auto;
  padding-right: 8px;
  text-wrap: pretty;
}

html[data-theme="dark"] .ux-v2 .studio-widget {
  background: linear-gradient(145deg, color-mix(in srgb, var(--widget-accent) 18%, #111715) 0%, #111715 62%) !important;
}

@media (max-width: 700px) {
  .app-version { min-height: 20px; padding: 0 6px; font-size: 10px; }
  .setup-identity > div { display: grid !important; grid-template-columns: auto max-content !important; column-gap: 7px; }
  .setup-identity > div > .app-version { display: inline-flex !important; }
  .ux-v2 .studio-widget { border-top-width: 3px !important; }
  .dashboard-v14 .secondary-zone-detail > div:not(.multi-clock-list) > p { gap: 6px; }
  .dashboard-v14 .secondary-zone-detail #secondaryClockSeconds { font-size: .42em !important; }
  .wellbeing-overlay { grid-template-columns: 1fr !important; grid-template-rows: minmax(160px, 34vh) auto; }
  .wellbeing-character { min-height: 0; }
  .morning-overlay main > p:nth-of-type(2) { max-height: 25dvh; font-size: 14px !important; }
  .pomodoro-overlay main { width: 100%; min-width: 0; }
  .pomodoro-stage,
  .pomodoro-setup { width: 100% !important; min-width: 0; }
  .pomodoro-stage > * { min-width: 0; }
  .exercise-figure.focus-brain { width: 100%; min-height: min(48vh, 360px); }
}

@media (orientation: landscape) and (max-height: 620px) {
  .exercise-figure.focus-brain { min-height: min(58vh, 360px); }
  .wellbeing-overlay { grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr) !important; }
  .wellbeing-character { min-height: 0; max-height: 68vh; }
  .morning-overlay main > p:nth-of-type(2) { max-height: 22dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .focus-cosmic-visual,
  .wellbeing-character img { animation: none; }
}
